SANTENO / MKL

Motorklappe - an arduino controlled door to let roomba robots out and in a kitchen counter.
GNU General Public License v3.0
0 stars 0 forks source link

MKL: Automatic operation for normal operation to be adjusted, close in either 10 minutes or default time. #7

Closed SANTENO closed 2 years ago

SANTENO commented 2 years ago

When lid is opened by single manual press up- the lid shall close automatically after about 10 minutes if no robot departs in this time.

SANTENO commented 2 years ago
  1. Change manualmode to LOW and include the countdown
    //manual open:
    while (digitalRead(BTN_UP) == 0){
        Maschinenstatus = 3;
        manualmode = HIGH; 
        digitalWrite(REL1,LOW);  // Power Supply einschalten
        delay(BTNTIME);
    }

    geändert in:

    //manual open:
    while (digitalRead(BTN_UP) == 0){
        Maschinenstatus = 3;
        manualmode = HIGH; 
        digitalWrite(REL1,LOW);  // Power Supply einschalten
        delay(BTNTIME);
        countdown = 120*60;    // Isuse#7 countdown reset - for use in mode 4
    }
    //automatic open:
    if (robigone == HIGH){
      Maschinenstatus = 3; //Trigger falls ein Robi wegfährt
      digitalWrite(REL1,LOW);  // Power Supply einschalten
      delay(BTNTIME);
      countdown = 120;    // countdown reset - for use in mode 4
    }
    break;
SANTENO commented 2 years ago

in readparked setting zum Ende der Statemachine jeweils einen reset des countdowns einfügen: Changes the countdown time when one robot leaves the house after manually opening. if (robiWisch.readparked()== LOW) { robigone= HIGH; countdown = 120; //Issue#7 }

SANTENO commented 2 years ago

Also added the countdown for display to appear in top line for > 120.. Below 120, the bar shows up..