jward448

I have an Arduino Diecimila. I have a momentary switch on pin 2.I have a servo modified for continuous rotation. The program needs to turn the servo for as period of time, which translates to some number of rotations, each time the button is pressed. Each press results in a different set amount of turns. Example: exact accuracy isn't that imporant. Don't need an encoder wheelPress #1 - Rotate 5 timesPress #2 - Rotate 10 times Press #3 - Rotate 15 timesPress #4 - Rotate 5 timesPress #5 - Rotate in reverse 35 times (reset)Startover

I'm having a problem with the program logic or possibly approach to solving the problem.

jward448

Whoo hoo!! Thank you so much. It works!! Here's my working code. I threw in an LED for testing. I just added the servo stuff after I got the LED behaving like I wanted. Thank you so much for the condensed code. Much easier to see the answer that way.