From f792080b8cb6988fa8ed5d05d859795596e5b2db Mon Sep 17 00:00:00 2001 From: sven Date: Mon, 12 Apr 2021 21:42:08 +0200 Subject: [PATCH] Software auf HW angepasst, Pin geschaltet ergibt LOW in CPU und umgekehrt, Fehlerchen entfernt. --- Arduino/etima/etima.ino | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Arduino/etima/etima.ino b/Arduino/etima/etima.ino index bce04c4..ffa8be8 100644 --- a/Arduino/etima/etima.ino +++ b/Arduino/etima/etima.ino @@ -158,8 +158,8 @@ void loop() { } unsigned long currentMillisEti = millis(); - Motor = MotorDelay * 100; - if (digitalRead(11) == HIGH && run == 0 && finish == 1){ + Motor = MotorDelay * 20; + if (digitalRead(11) == LOW && run == 0 && finish == 1){ run = 1; finish = 0; } @@ -167,8 +167,8 @@ void loop() { digitalWrite(12, HIGH); if (digitalRead(7) == HIGH){ gapDetected = 1; - } - if(gapDetected = 1) { + } + if(gapDetected == 1) { if (currentMillisEti - previousMillisEti >= Motor) { previousMillisEti = currentMillisEti; run = 0; @@ -182,14 +182,16 @@ void loop() { digitalWrite(12, LOW); previousMillisEti = currentMillisEti; } - if (run == 0 && digitalRead(11) == 0){ + if (run == 0 && digitalRead(11) == HIGH){ finish = 1; + gapDetected = 0; } UP_OLD = UP; DOWN_OLD = DOWN; ENTER_OLD = ENTER; + } void testdrawbitmap(void) {