From f80e6e92243deed22038a8a49d3cda89df5fd5d7 Mon Sep 17 00:00:00 2001 From: adrian Date: Wed, 28 Jan 2026 21:45:11 +0100 Subject: [PATCH] fix --- roboterarm/roboterarm.ino | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/roboterarm/roboterarm.ino b/roboterarm/roboterarm.ino index 6a718aa..03fa574 100644 --- a/roboterarm/roboterarm.ino +++ b/roboterarm/roboterarm.ino @@ -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);