Software auf HW angepasst, Pin geschaltet ergibt LOW in CPU und umgekehrt,

Fehlerchen entfernt.
This commit is contained in:
sven 2021-04-12 21:42:08 +02:00
parent 8e847d9c3b
commit f792080b8c

View file

@ -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) {