Page 8 of 15

Re: comenzando desde cero (Starting from scratch)

Posted: Apr 27th, 2020, 4:43 pm
by asesorplaza1
Muchas gracias por tu tiempo y tu paciencia.

Yo he cambiado todos los signos de == por el signo de > , porque hace unos días me diste que no se debe usar la orden if con el signo =, y ayer me dijiste de cambiar algunos signos de ==, por los signos >, y al final yo me he confundido, y los he cambiado todos, lo siento, ha sido error mio, ya esta corregido.

Ahora el programa si funciona, puedo ver en el Monitor Serie, toda la lista de los sensores con sus datos, y como cambian los datos de valor.

Pero el mando sigue sin hacernos caso, aunque la luz que hay debajo del botón ANALOG, ya se enciende y se apaga cuando le doy al botón.

Un saludo.

Thank you very much for your time and your patience.

I have changed all the signs of == the sign of the > , because a few days ago you gave me that the if command should not be used with the sign =, and yesterday you told me to change some signs of == ,for the signs >, and in the end I confused, and I changed them all, sorry, it was my mistake, it is already corrected.

Now the program if it works, I can see in the Serial Monitor, the whole list of sensors with their data, and how the value data changes.

But the controller still ignores us, although the light under the ANALOG button already turns on and off when I hit the button.

Greetings.

Re: comenzando desde cero (Starting from scratch)

Posted: Apr 28th, 2020, 5:12 am
by bigbadbob
ok. great stuff, we're almost there.
So the ps2 controller works but arduino is not sending the data.
In your master where you define the list of txdata you have a blank line, delete it.
then also in the same section you have a volatile Boolean, this does not need to be volatile as you are not using interrupts. so just make it Boolean.
Then go to slave and make the same changes to where you define rxdata.
master txdata and slave rxdata must be identical with no blank lines.

Re: comenzando desde cero (Starting from scratch)

Posted: Apr 28th, 2020, 11:45 am
by asesorplaza1
Buenos días.
Gracias por su tiempo y su paciencia.

Ya he realizado los cambios que me ha sugerido usted, pero seguimos casi igual. En el mando de la PS2, si aprieto el botón de ANALOG, si se enciende la luz roja que hay debajo, o se apaga si vuelvo a apretar el botón.

Pero en el Monitor Serie del Maestro me dice "Controlador no encontrado".

Si aprieto cualquier botón, el Esclavo sigue sin hacer nada.

En el Monitor Serie del Esclavo, el programa se para después de reconocer los tres sensores DHT22, y parece como si no siguiera ejecutándose el programa, no puedo ver la lista de sensores con sus datos, pero en realidad el programa si funciona, porque en el Monitor Serie del Maestro, si veo como cambian los valores de los datos de los sensores.

Un saludo.


Good morning.

Thank you for your time and patience.

I've already made the changes you've suggested to me, but we're still almost the same.

On the PS2 controller, if I press the ANALOG button, if the red light below is turned on, or turns off if I press the button again.

But on the Master's Serial Monitor he tells me "Controller not found".

If I press any button, the Slave still does nothing.

In the Slave Serial Monitor, the program stops after recognizing the three DHT22 sensors, and it seems as if the program is not still running, I can not see the list of sensors with their data, but actually the program does work, because in the Master Series Monitor, if I see how the values of the sensor data change.

Greetings.

Re: comenzando desde cero (Starting from scratch)

Posted: Apr 29th, 2020, 5:36 am
by bigbadbob
hmmm.... ok....

in master, delete line 220
in slave delete line 205

you are not using the left pad so you don't need those lines and they might be upsetting the code and preventing the master to slave data from being passed.

Re: comenzando desde cero (Starting from scratch)

Posted: Apr 29th, 2020, 8:20 am
by medemt
I HAVE NO IDEA WHAT YOU GUYS ARE TALKING ABOUT BUT IT IS INTERESTING!

Re: comenzando desde cero (Starting from scratch)

Posted: Apr 29th, 2020, 9:06 am
by bigbadbob
medemt wrote:I HAVE NO IDEA WHAT YOU GUYS ARE TALKING ABOUT BUT IT IS INTERESTING!
Neither do we but it keeps us entertained. :lol:

Re: comenzando desde cero (Starting from scratch)

Posted: Apr 29th, 2020, 1:10 pm
by asesorplaza1
Buenos días.

Tienes razón, Bigbadbob, ninguno de los tres sabemos lo que estamos haciendo, ni sabemos de que hablamos, pero por lo menos estamos entretenidos escribiendo.

He realizado los cambios que tu me has dicho.

Pero creo que te has confundido de numero de linea, supongo que lo que pretendías, es que eliminase las lineas que estaban comentadas dentro del Send_Data_Structure, y del Receive_Data_Structure, para que no estorbasen y no hicieran interferencias en el envío del paquete de datos, o por lo menos eso es lo que yo he entendido, y eso es lo que yo he hecho, he eliminado las lineas comentadas.

Porque el palo izquierdo, ahora mismo no lo estoy utilizando, pero es el que se va a encargar de mover el palm y el tilt de la cámara de vídeo.

El que ya esta ocupado es el PSB_PAD_Left, que es el que enciende y apaga los focos, respetando la idea de TechMonkey.

También yo he cambiado los ESC, antes estaban configurados como servos, y ahora, con el enlace que te mande de la calibración de los ESC, les he cambiado la configuración, y en vez de estar como servos, están como ESC.

Esto no cambia nada de lo demás.

Pero seguimos igual, con los fallos del programa Esclavo, y los fallos del dichoso mando.

En el Maestro, si presiono el botón de ANALOG, la luz del mando de la PS2, se enciende o se apaga, si aprieto el botón.

En el Monitor Serie, si puedo ver la lista de sensores y como van cambiando los valores de los datos. En el Monitor Serie del Esclavo, no puedo ver la lista de los sensores, ni los cambios de los valores, se queda parado en el reconocimiento de los sensores DHT22, como si no empezara el void setup, pero eso no es verdad, porque en el maestro si veo como cambian los datos, entonces lo que no va bien es el mandar los datos al Puerto Serie USB del ordenador, que por lo que sea, se para, y no manda los datos.

Un saludo.



Good morning.

You're right, Bigbadbob, none of the three of us know what we're doing, we don't even know what we're talking about, but at least we're entertaining writing.

I've made the changes you've told me.

But I think you've been confused by line number, I guess what you intended, is that I deleted the lines that were commented within the Send_Data_Structure, and the Receive_Data_Structure, so that they don't get in the way and they didn't interfere with the sending of the data package, or at least that's what I understood, and that's what I've done , I have removed the commented lines.

Because the left stick, right now I'm not using it, but it's the one that's going to take care of moving the palm and tilt of the video camera.

The one that is already busy is the PSB_PAD_Left, which is the one that turns on and off the spotlights, respecting the idea of TechMonkey.

I have also changed the ESCs, before they were configured as servos, and now, with the link that commands you from the calibration of the ESCs, I changed the configuration, and instead of being like servos, they are like ESC.

This doesn't change anything else.

But we remain the same, with the failures of the Slave program, and the failures of the blissful command.

On the Master, if I press the ANALOG button, the PS2 controller light turns on or off, if I press the button.

In the Serial Monitor, if I can see the list of sensors and how the data values change.

In the Slave Serial Monitor, I can't see the list of sensors, nor the changes in the values, it stands in the recognition of the DHT22 sensors, as if it did not start the void setup, but that is not true, because in the master if I see how the data changes, then what goes well is the sending the data to the USB Serial Port of the computer , that for whatever it is, stops, and does not send the data.

Greetings.

Re: comenzando desde cero (Starting from scratch)

Posted: Apr 29th, 2020, 2:18 pm
by asesorplaza1
Buenos días.

He visto que en tu proyecto utilizas el modulo RS485, que supongo le dará más estabilidad a las comunicaciones, que dos cables de puente dupont que estoy utilizando yo.

¿Crees que merece la pena que utilice los RS485 en mi proyecto, mejor que los cables?.

Por lo que he podido ver en alguna pagina de Internet, no habría que cambiar nada del código, solo habría que conectar físicamente el RS485.

¿Estoy en lo cierto?.

Muchas gracias.

Un saludo.



Good morning.

I have seen that in your project you use the RS485 module, which I suppose will give more stability to communications, than two dupont bridge cables that I am using.

Do you think it's worth using RS485 in my project better than cables?

From what I have seen on some internet page, you would not have to change anything of the code, you would just have to physically connect the RS485.

Im I right?.

Thanks a lot.

Greetings.

Re: comenzando desde cero (Starting from scratch)

Posted: Apr 29th, 2020, 3:46 pm
by bigbadbob
yes, for long cables rs485 is less susceptible to noise. but for testing on the bench ttl serial is fine.

for debugging your PS2 problem try this from Bill Porter's example.-

if(error == 0){
Serial.println("Found Controller, configured successful");
Serial.println("Try out all the buttons, X will vibrate the controller, faster as you press harder;");
Serial.println("holding L1 or R1 will print out the analog stick values.");
Serial.println("Go to http://www.billporter.info for updates and to report bugs.");
}

else if(error == 1)
Serial.println("No controller found, check wiring, see readme.txt to enable debug. visit http://www.billporter.info for troubleshooting tips");

else if(error == 2)
Serial.println("Controller found but not accepting commands. see readme.txt to enable debug. Visit http://www.billporter.info for troubleshooting tips");

else if(error == 3)
Serial.println("Controller refusing to enter Pressures mode, may not support it. ");
http://www.billporter.info/2011/03/27/a ... nt-page-6/

also I would not bother checking the controller type, you know what type it is, you plugged it in. hahahaha....

Re: comenzando desde cero (Starting from scratch)

Posted: Apr 29th, 2020, 5:10 pm
by asesorplaza1
Buenos días.

El mando que tengo conectado ahora, es un mando compatible, negro, con cable, y puerto ancho de 9 pines, de la marca Pacifico.

Tengo otro mando compatible, negro, sin marca, inalámbrico, con un receptor de 9 pines.

Tengo un sombrero para el mando, sin marca, que en la parte de abajo pone.
PS2X & Motor Shield v1.1.
Control de 4 motor DC or.
2 steppers motors via I2c.
Pins used: SDA/SCL.

Tengo otro mando compatible, negro, con cable de 9 pines, sin marca.

Tengo otro sombrero para mando, que en la parte de abajo pone.
MotorDriverBoard V5.0.

Tengo otro mando compatible, transparente marca BOYU, inalámbrico.

Tengo otro mando compatible, con puerto USB.

¿Será por mandos?

Ya he probado a pinchar todos los mandos, menos el USB, y con todos obtengo la misma respuesta, con suerte, puedo encender y apagar la luz que hay debajo del botón ANALOG.

Bueno, en cuanto al programa del ROV, parece que el mando quiere comunicarse con nosotros, parece que el error es el 1, en el Monitor Serie del maestro, me ha salido un mensaje que dice.
No se encontró controlador, verifique el cableado, consulte readme.txt para habilitar la depuración. Visite http://www.billporter.info
Error controlador no detectado

He verificado otra vez las conexiones y no veo donde está el fallo.

Me hice una hoja de Excel incluso para comprobar que conectaba cada cable en su sitio, te adjunto la hoja de Excel, y el programa Maestro, con las últimas modificaciones.

Un saludo



Good morning.

The controller I have connected now, is a compatible controller, black, wired, and 9-pin wide port, of the Pacific brand.

I have another compatible controller, black, unmarked, wireless, with a 9-pin receiver.

I have a hat for the controller, unmarked, which on the bottom puts.
PS2X & Shield Engine v1.1.
4 motor CONTROL DC or.
2 steppers motors via I2c.
Pins used: SDA/SCL.

I have another compatible controller, black, with 9-pin cable, unmarked.

I have another hat for command, which at the bottom it puts.
MotorDriverBoard V5.0.

I have another compatible controller, transparent BOYU brand, wireless.

I have another compatible controller, with USB port.

Will it be by command?

I have already tried to play all the controllers, except the USB, and with all I get the same answer, hopefully I can turn on and off the light under the ANALOG button.

Well, as for the ROV program, it looks like the controller wants to contact us, it looks like the error is 1, in the Master Series Monitor, I got a message that says.
No driver found, verify cabling, see readme.txt to enable debugging. Visit http://www.billporter.info
Driver error not detected

I've checked the connections again, and I don't see where the fault is.

I made an Excel sheet even to check that I connected each cable in its place, I attached the Excel sheet, and the Master program, with the latest modifications.

A greeting