What's up, People Who Are Way Smarter Than I'll Ever Be?
I'm building a PCA9685-controlled Nerf target range, and I've got the code all set up to rotate each servo the correct number of degrees.
The problem is, the servos just do it on a loop. I want to trigger the process with a button, have it run through each servo once, and then stop until I press the button again.
Can't seem to figure out how!! Any help would be massively appreciated!
#define SERVOMIN 150 // This is the ‘minimum’ pulse length count (out of 4096) #define SERVOMAX 600 // This is the ‘maximum’ pulse length count (out of 4096) #define SERVO_FREQ 60 // Analog servos run at ~60 Hz updates
#define SERVOMIN 150 // This is the ‘minimum’ pulse length count (out of 4096) #define SERVOMAX 600 // This is the ‘maximum’ pulse length count (out of 4096) #define SERVO_FREQ 60 // Analog servos run at ~60 Hz updates
No it actually says "While was not....." and that's because it should be spelled "while". C++ is case sensitive but even the experts have typo problems from time to time.
slipstick:
No it actually says "While was not....." and that's because it should be spelled "while". C++ is case sensitive but even the experts have typo problems from time to time.
Steve
Good god, what use are my meager skills in the face of such pedantic code requirements!?!