fix
This commit is contained in:
@ -73,18 +73,19 @@ int currentStateLeftButton = digitalRead(leftButton);
|
||||
int currentStateRightButton = digitalRead(rightButton);
|
||||
int currentStateArmTwo = ServoArmTwo.read();
|
||||
Serial.print("button: ");
|
||||
Serial.print(leftButton);
|
||||
Serial.print(rightButton);
|
||||
Serial.print(currentStateLeftButton);
|
||||
Serial.print(currentStateRightButton);
|
||||
Serial.print("\n");
|
||||
|
||||
while (leftButton == HIGH) {
|
||||
if (currentStateLeftButton == HIGH) {
|
||||
Serial.print("test");
|
||||
|
||||
int newStateArmTwo = currentStateArmTwo + 1;
|
||||
ServoArmTwo.write(newStateArmTwo);
|
||||
delay(15);
|
||||
}
|
||||
|
||||
while (rightButton == HIGH) {
|
||||
if (currentStateRightButton == HIGH) {
|
||||
int newStateArmTwo = currentStateArmTwo - 1;
|
||||
ServoArmTwo.write(newStateArmTwo);
|
||||
delay(15);
|
||||
|
||||
Reference in New Issue
Block a user