Transistorman
Member
im not too good at programming , because that i ask on this forumFrom you older posts, I understand, you have a continuous rotation servo. And that you need to rotate the shaft 180 degrees to the right and to the left, in a loop.
try this -
1) Write a subroutine to turn the motor to the left - say, goLeft();
2) Write another to turn to right - say goRight();
Find the time for the shaft to reach your 180 degrees. Write a subroutine for the time delay
call goLEft and goRight with the delay subroutine in between, and put the entire thing in a loop.
This is, assuming you know how to turn your motor to the left and to the right. If you have variations in the load at shaft, the time will change. If the positioning is critical, put a sensor at the 180 degree point. Then wait for the shaft to reach that point before you call either of the goLeft or goRight subroutines.
hi allbits
i dont understand what you are saying
i just need the asm/C file
Last edited: