comenzando desde cero (Starting from scratch)

What are you working on .... Show off your Rov's Projects here.
Post Reply
asesorplaza1
Posts: 187
Joined: Mar 4th, 2018, 6:11 pm
Location: Valverde de Júcar, Cuenca, España

Re: comenzando desde cero (Starting from scratch)

Post by asesorplaza1 »

Yo he realizado todos los cambios que tu me has dicho, pero esto sigue igual.

En el mando hay un led debajo del botón analog, para poder seleccionar el modo del mando, Analógico, o Digital, que es el que indica que el mando esta funcionando, y de momento no se nciende, ni yo lo puedo cambiar pulsando el botón Analog.

Los motores se encienden solos, sin tocar ningún botón ni joystick del mando, cuando pasa un minuto de encender el Esclavo.

Los focos de iluminación no se encienden, porque no puedo controlar el relé que los activa.

Vamos que el mando no esta haciendo nada.

Un saludo


I've made all the changes you've told me, but this is still the same.

On the controller there is an LED under the analog button, to be able to select the mode of the controller, Analog, or Digital, which indicates that the controller is working, and at the moment it does not turn on, nor can I change it by pressing the Analog button.

The motors turn on on their own, without touching any buttons or joysticks on the controller, when a minute passes to turn on the Slave.

The lighting lights don't turn on, because I can't control the relay that activates them.

Come on, the command isn't doing anything.

A greeting
Attachments
30_26_04_2020.rar
(15.49 KiB) Downloaded 730 times
asesorplaza1
Posts: 187
Joined: Mar 4th, 2018, 6:11 pm
Location: Valverde de Júcar, Cuenca, España

Re: comenzando desde cero (Starting from scratch)

Post by asesorplaza1 »

Si yo no conecto los cables de trasmisión RX y TX, los motores no se disparan solos, y los ESC, están pitando, de vez en cuando, como si ellos tuvieran algún error, no están en espera de ninguna orden.

Entonces yo creo que hay algún problema en el Esclavo, en el control de los ESC.

Si después de un rato, conecto los cables de TX y RX, los ESC, se quedan igual, pitando de vez en cuando como si tuvieran algún error, pero no se disparan los motores.

Pero el mando no hace nada.

Un saludo



If I don't connect the RX and TX transmission cables, the engines don't fire on their own, and the SCs are beeping, from time to time, as if they had any errors, they are not waiting for any order.

So I think there's some problem in the Slave, in control of the ESCs.

If after a while, I connect the TX and RX cables, the ESCs, they stay the same, beeping from time to time as if they had some error, but the engines do not fire.

But the command doesn't do anything.

A greeting
User avatar
bigbadbob
Posts: 272
Joined: Nov 28th, 2011, 10:24 am

Re: comenzando desde cero (Starting from scratch)

Post by bigbadbob »

It sounds like the ESC's need calibrating.
in my code (in setup) I send-
//calibrate ESC's
//0=min,90=neutral,180=max
ESCV.write(90); //set VERTICAL throttle to neutral, this ESC cannot be calibrated, it needs to see 90 at start up.
ESCHL.write(180); //Set the LEFT throttle to the max position.
ESCHR.write(180); //Set the RIGHT throttle to the max position.
delay(2000);
//ESCV.write(0); //set the vertical throttle to the min position. commented out for this ESC
ESCHL.write(0); //Set the left throttle to the min position.
ESCHR.write(0); //Set the RIGHT throttle to the min position
delay(2000);

You might need to do something similar.
Do you know what your ESCs need at startup?
or you might need to fiddle with these values-
ESCVL.attach(8, 600, 2250); // adjunte el ESCVL al pin 8
ESCVR.attach(7, 600, 2250); // adjunte el ESCVR al pin 7
ESCHL.attach(6, 600, 2250); // adjunte el ESCHL al pin 6
ESCHR.attach(5, 600, 2250); // adjunte el ESCHR al pin 5

I had to change them to suit my ESCs.
asesorplaza1
Posts: 187
Joined: Mar 4th, 2018, 6:11 pm
Location: Valverde de Júcar, Cuenca, España

Re: comenzando desde cero (Starting from scratch)

Post by asesorplaza1 »

Vale amigo, el problema de los ESC ya esta arreglado, yo he buscado en Internet, un programa para calibrar los ESC, y cambiando el valor máximo del ESC a 1700, ya se quedan callados, con la luz verde encendida, a la espera de órdenes.

https://github.com/lobodol/ESC-calibration

Pero seguimos teniendo problemas con el mando de la PS2.

Un saludo.



Okay friend, the problem of ESCs is already fixed, I have searched the Internet, a program to calibrate the ESCs, and changing the maximum value of the ESC to 1700, they already keep quiet, with the green light on, waiting for orders.

https://github.com/lobodol/ESC-calibration

But we're still having trouble with PS2 command.

Greetings.
User avatar
bigbadbob
Posts: 272
Joined: Nov 28th, 2011, 10:24 am

Re: comenzando desde cero (Starting from scratch)

Post by bigbadbob »

I can't see any problems with the code that would cause the PS2 controller problem.
do you see anything on master debug serial?
is any of this printing on debug?
if (error == 0) {
Serial.println(" \n Controlador encontrado y configurado con exito");
Serial.println(" \n Prueba todos los botones, vibrara el mando mas rapido a medida que presiones mas fuerte");
Serial.println(" \n Mantener L1 o R1 imprimira los valores del stick analogico");
Serial.println(" \n Ir a http://www.billporter.info para actualizaciones y para informar de errores");
}

type = ps2x.readType();
if ( type == 1) {
Serial.println(" \n Hallado controlador DualShock.");
}
if (error == 0) {
Serial.print(" \n Iniciando Sistema: !");
Serial.print(" \n Mando PS2 Preparado: !");
}


if not, I think it must be a hardware/wiring problem.

I just noticed-
in master:
move delay1000; to before serial begin.....
asesorplaza1
Posts: 187
Joined: Mar 4th, 2018, 6:11 pm
Location: Valverde de Júcar, Cuenca, España

Re: comenzando desde cero (Starting from scratch)

Post by asesorplaza1 »

Nada, no hay manera de que funcione.

Esta tarde yo he vuelto a revisar la conexión de los cables, otra vez, y no encuentro ningún fallo en las conexiones, cada uno de los cables del mando está conectado en su sitio.

También he probado a cambiar de placa Arduino, por si ella estuviera mal, y nada.

Yo he hecho el cambio del delay que me has dicho, y no ha cambiado nada, sigue sin funcionar.

Un saludo.


Nothing, there's no way it's going to work.

his afternoon I checked the connection of the cables again, and I find no fault in the connections, each of the controller cables is connected in place.

I've also tried switching Arduino boards, in case she was wrong, and nothing.

I've made the change of the delay you've told me, and nothing's changed, it still doesn't work.

Greetings.
Attachments
31_26_04_2020.rar
(15.57 KiB) Downloaded 610 times
asesorplaza1
Posts: 187
Joined: Mar 4th, 2018, 6:11 pm
Location: Valverde de Júcar, Cuenca, España

Re: comenzando desde cero (Starting from scratch)

Post by asesorplaza1 »

Esta tarde también yo he estado mirando el trozo de código que tienes publicado en tu publicación, para ver si yo veía algún error, y yo no he visto nada, lo tenemos igual.

viewtopic.php?f=18&t=530&start=50

Un saludo.


This afternoon I also have been looking at the piece of code that you have published in your post, to see if I saw any error, and I have not seen anything, we have it the same.

viewtopic.php?f=18&t=530&start=50

Greetings.
User avatar
bigbadbob
Posts: 272
Joined: Nov 28th, 2011, 10:24 am

Re: comenzando desde cero (Starting from scratch)

Post by bigbadbob »

ok, to help with debug-

if (error == 0) {
Serial.print(" \n Iniciando Sistema: !");
Serial.print(" \n Mando PS2 Preparado: !");
}
else if (error > 0)
{
Serial.print(" \n error. controlador no detectado.");
}

and in void loop()

void loop()
{
if (error > 0)
{
txdata.HLraw = 180;
ETout.sendData();
delay (200);
return;
}

if (error == 0)
{////////////////////////////////////////

try this and see if it prints the error to debug serial monitor ok and runs the left motor. ;-)

EDIT- oooohhh.... I just spotted a problem.
in master, at line 473- change it to-
while (!ETin.receiveData()){return;}
that way if you do not receive any data from the ROV the code will not stop and wait for it but will catch it next time round.

it is very hard to debug from such a distance without being able to get my hands on the hardware. :|
asesorplaza1
Posts: 187
Joined: Mar 4th, 2018, 6:11 pm
Location: Valverde de Júcar, Cuenca, España

Re: comenzando desde cero (Starting from scratch)

Post by asesorplaza1 »

Buenos días.

Bueno, yo ya he realizado los cambios en el programa que has comentado, pero parece que no estamos consiguiendo mucho.

Ahora en el Monitor Serie del Maestro, me aparece lo siguiente


Controlador encontrado y configurado con éxito
Prueba todos los botones, vibrara el mando más rápido a medida que presiones más fuerte
Mantener L1 o R1 imprimirá los valores del stick analógico
Ir a www.billporter.info para actualizaciones y para informar de errores
Iniciando sistema: !
Mando PS2 preparado: !


Pero el programa se queda aquí parado, no me sale la lista de los sensores con sus datos, y el mando no hace nada, no se enciende el LED que hay debajo del botón ANALOG, no se encienden los LED que tengo pinchados en la placa de pruebas, como testigos de haber presionado los botones del mando, y el Esclavo no hace nada, no se enciende el foco de iluminación, no se ponen en marcha los motores, vamos que el mando sigue sin hacer nada.

Un saludo


Good morning.

Well, I've already made the changes to the program you've commented on, but it looks like we're not getting much.

Now in the Master Series Monitor, the following appears to me

Driver found and configured successfully
Try all the buttons, vibrate the controller faster as you press harder
Keeping L1 or R1 will print the values of the analog stick
Go to www.billporter.info for updates and to report bugs
Starting system: !
PS2 controller ready: !

But the program stands here, I do not get the list of the sensors with their data, and the controller does nothing, does not turn on the LED under the ANALOG button, do not turn on the LEDs that I have clicked on the test plate, as witnesses of having pressed the buttons of the controller, and the Slave does nothing , the lighting light is not turned on, the engines are not started, we go that the controller still does nothing.

A greeting
Attachments
32_27_04_2020.rar
(15.61 KiB) Downloaded 632 times
User avatar
bigbadbob
Posts: 272
Joined: Nov 28th, 2011, 10:24 am

Re: comenzando desde cero (Starting from scratch)

Post by bigbadbob »

in master you changed too many things-
if (error > 0) Should be if (error== 0)
{
Serial.println(" \n Controlador encontrado y configurado con exito");
Serial.println(" \n Prueba todos los botones, vibrara el mando mas rapido a medida que presiones mas fuerte");
Serial.println(" \n Mantener L1 o R1 imprimira los valores del stick analogico");
Serial.println(" \n Ir a www.billporter.info para actualizaciones y para informar de errores");
}

type = ps2x.readType();

if ( type > 1) Should be if (type== 1)
{
Serial.println(" \n Hallado controlador DualShock.");
}
if (error > 0) Should be if (error== 0)
{
Serial.print(" \n Iniciando Sistema: !");
Serial.print(" \n Mando PS2 Preparado: !");
}
else if (error > 0) This is correct
{
Serial.print ("\n error Controlador no detectado");
}

then in line 298 you need to put back in
if (error== 0)
Post Reply