Problems with servos RC simulation?
Quote from Vicent on November 28, 2023, 8:57 pmI'm looking at the simulator may not work correctly with more than one RC servo. The same program fragment, in the short version (Prova_servo_simulator_1), operates correctly, and in the longer program, (Prueba_12_26_11_2023_Simulator) it does not do so well.
It is ok?
Thanks in advance
I'm looking at the simulator may not work correctly with more than one RC servo. The same program fragment, in the short version (Prova_servo_simulator_1), operates correctly, and in the longer program, (Prueba_12_26_11_2023_Simulator) it does not do so well.
It is ok?
Thanks in advance
Uploaded files:
Quote from arcachofo on November 28, 2023, 9:40 pmI don't see the problem:
If I add another servo to Prova_servo_simulator_1 it seems to work ok.Prueba_12_26_11_2023_Simulator seems to be another program and I have no idea how it works and how to reproduce the issue.
But about 1 or 2 servos I don't see any problem.
I don't see the problem:
If I add another servo to Prova_servo_simulator_1 it seems to work ok.
Prueba_12_26_11_2023_Simulator seems to be another program and I have no idea how it works and how to reproduce the issue.
But about 1 or 2 servos I don't see any problem.
Quote from Vicent on November 28, 2023, 9:49 pmThe following code fragment, executed in the program Prova_servo_simulator_1 works fine, but implemented in the other program does not.
canal_9 = pulseIn(8, HIGH, 50000); //Lee posición del canal 9 - movimiento luz búsqueda
if (canal_9 <= 1400) { luz.write (angulo_inicio); }
if (canal_9 > 1400) {
delay (2000);
for (angulo_inicio; angulo< angulo_fin; angulo++){
luz.write(angulo);
delay (50);
}
if ((canal_9 > 1400) && (angulo=angulo_fin)) {
luz.write(angulo_fin);
delay (2000);
}
for (angulo_fin; angulo>angulo_inicio; angulo--){
luz.write(angulo);
delay (50);
}
}
The following code fragment, executed in the program Prova_servo_simulator_1 works fine, but implemented in the other program does not.
canal_9 = pulseIn(8, HIGH, 50000); //Lee posición del canal 9 - movimiento luz búsqueda
if (canal_9 <= 1400) { luz.write (angulo_inicio); }
if (canal_9 > 1400) {
delay (2000);
for (angulo_inicio; angulo< angulo_fin; angulo++){
luz.write(angulo);
delay (50);
}
if ((canal_9 > 1400) && (angulo=angulo_fin)) {
luz.write(angulo_fin);
delay (2000);
}
for (angulo_fin; angulo>angulo_inicio; angulo--){
luz.write(angulo);
delay (50);
}
}
Quote from arcachofo on November 28, 2023, 10:03 pmThe following code fragment, executed in the program Prova_servo_simulator_1 works fine, but implemented in the other program does not.
Ok, I see.
The problem is about connecting Servo V+ to Nano Vin Pin.
Just connect 5 V to the servos and don't connect anything to Vin.
The following code fragment, executed in the program Prova_servo_simulator_1 works fine, but implemented in the other program does not.
Ok, I see.
The problem is about connecting Servo V+ to Nano Vin Pin.
Just connect 5 V to the servos and don't connect anything to Vin.
Quote from Vicent on December 2, 2023, 9:27 amThanks for your answer.
But I see that the program keeps doing strange things.
I have attached a video where you can see it.
Thanks for your answer.
But I see that the program keeps doing strange things.
I have attached a video where you can see it.
Quote from Vicent on December 3, 2023, 3:13 pmSorry, I deleted it. It still has the same behavior.
Would the assembly be good so that it doesn't cause problems?
Sorry, I deleted it. It still has the same behavior.
Would the assembly be good so that it doesn't cause problems?
Uploaded files:Quote from arcachofo on December 4, 2023, 11:08 amSorry, I deleted it. It still has the same behavior.
Ok, nice.
About the behavior I don't know what should it do.
If you can explain what is exactly the problem then I can test it.
Would the assembly be good so that it doesn't cause problems?
I don't understand, which assembly?
Sorry, I deleted it. It still has the same behavior.
Ok, nice.
About the behavior I don't know what should it do.
If you can explain what is exactly the problem then I can test it.
Would the assembly be good so that it doesn't cause problems?
I don't understand, which assembly?
Quote from Vicent on December 4, 2023, 4:53 pm
Would the assembly be good so that it doesn't cause problems?
I don't understand, which assembly?
I wanted to say that the ground is well placed in this way.
I attached a video. The servo "servo luz" can't oscile correctly should do it with the full route. They interfere with inputs that shouldn't. The servos in the upper move randomly and don't follow the program.
Would the assembly be good so that it doesn't cause problems?
I don't understand, which assembly?
I wanted to say that the ground is well placed in this way.
I attached a video. The servo "servo luz" can't oscile correctly should do it with the full route. They interfere with inputs that shouldn't. The servos in the upper move randomly and don't follow the program.
Uploaded files: