i'm trying to make the servo work by using 2 buttons (one button at a time, seperatly.). in my program only one button works.
can someone give me some good advice/help?
#include<Servo.h>
const int buttonPin1 =10;
const int buttonPin2 =1;
int buttonState1 = 0;
int buttonState2 = 0;
Servo myservo;
i'm trying to make the servo work by using 2 buttons (one button at a time, seperatly.). in my program only one button works.
can someone give me some good advice/help?
Can you describe the programming logic you want to have, a bit more detailed, please?
Do you want the servo react on button state (pressed or released) while nothing is changing and "steady state"?
Or do you want the servo to act on a "state change" of a button, when the button changes from "released state" to "pressed state"?
Please describe in detail and in plain English words what you want to do, exactly!