360 ° servo can't figure it out

I have a 360 servo constant rotation. It needs to work on time. For example, I press the button, it turns to the left for 5 seconds. I press the second button, it turns to the right for 5 seconds. My servo rotates to the left when reading the encoder 0.48 To the right when reading the 0.55. We need a knot so that at the output it is possible to adjust these indicators and the time the signal is fed to the servo. Sorry for my English Google translator. If you already have such nodes, please show an example of controlling such a servo. I will be very happy!

Continuous rotation servos stop with value of 0.5, move one direction for smaller values and the other direction for larger values. The farther the value from 0.5, the faster the servo moves, so 0 will be max speed in one direction and 1 max speed in the other direction. If servo is not perfectly calibrated, you may need to use 0.51 or some other value close to 0.5 to stop the servo.

It sounds like you want the servo to start out stopped. If one button is pushed, you travel in one direction for 5 seconds. If second button is pressed, you travel the other direction for 5 seconds. I assume you stop again after the 5 seconds.

Probably the easiest option is to use select to feed the servo value. On boot or after timers expire, you select the stop value. When button is pushed, you select the appropriate motion value.

You could re-write this to use only one delay node and pulse select from the buttons instead of the delay node.

1 Like

Yes, this is exactly what I wanted! I adjusted the output values a little
and everything works perfectly! Thank you very much for your help and quick response!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.