Hello, I am quite new to programming. I would need help programming a 360 degree servo motor. I need it to rotate to the right 10s and stop after clicking V1, and to turn left after pressing V2 and stop after 10s.
I need only the part of the program where it determines the rotation and not the connection.
no, this is not help full.
my servo just rtate in one deraction and do not stop.
can you look in code and corect thet when I press V1 go up for 10s and then stop avtomaticli. And down on V2 for 10s and stop avtomaticli. Or maybe anather button for stop, this will be good too.
A continuous rotation servo motor can be controlled by calling the servo.writeMicroseconds() function, which typically accepts values from 1000-2000. A value of 1000 should rotate the motor counter-clockwise at full speed. A value of 2000 should rotate the motor clockwise at full speed. A value of 1500 should cause the motor to stop rotating (and without any vibration). Intermediate values can be used to change the speed of the rotation.
In the 4 months since your last post in this topic you could have taught yourself to be quite a proficient C++ programmer.
The forum isn’t a code factory, and whilst forum members might give you snippets of code or point you in the right direction, ultimately it is you that will need to take ownership of writing and maintaining your code.