From b4f1487d157aa96792f30e830a8a7a60b84e0bb2 Mon Sep 17 00:00:00 2001 From: HollowPurity Date: Wed, 19 Jul 2023 14:43:27 +0200 Subject: [PATCH] fixed weird servo behaviour --- servo.ino | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/servo.ino b/servo.ino index a242cc8..2f7b480 100644 --- a/servo.ino +++ b/servo.ino @@ -29,14 +29,19 @@ void setup() { void loop() { if (istTasterGedrueckt(D2)) { - linkeAugenbraue.write(90); - rechteAugenbraue.write(90); + for(int i = 0; i<= 90; i++){ + rechteAugenbraue.write(i); + linkeAugenbraue.write(i); + } + Serial.println("Vorwärts"); debug(); } if (istTasterGedrueckt(D3)) { - linkeAugenbraue.write(0); - rechteAugenbraue.write(0); + for(int i = 90; i>= 0; i--){ + rechteAugenbraue.write(i); + linkeAugenbraue.write(i); + } Serial.println("Rückwärts"); debug(); }