NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Microcontroller Programming » Problems programming continuous servo
June 15, 2012 by Jacp ![]() |
Hello, I'm challenging myself with this little summer project of mine. My goal is to make an automated curtain opener/closer by using a servo(that I have fixed for continuous rotation), some line and a pulley. I used a normal pushbutton(see overview) and connected it to my mikrocontroller(uC). I programmed the uC so that the servo should rotate one way at the same speed while holding button down. Not holding button down was supposed to keep the servo still. What really happened was that pressing the button down during different times would make the servo rotate in different speeds. Not holding the pushbutton down worked as it should. Anyone got any ideas of what might be the solution or problem in code? Code is as follows:
Here are some pictures to get an understanding of my project. |
---|---|
July 04, 2012 by Jacp ![]() |
Fixed after calibrating servo properly! |
Please log in to post a reply.
Did you know that interrupts can be used to trigger pieces of code when events happen? Learn more...
|