control.ino
1.03 KB
/* #include "control.h" */
void loop_control( int counter ) {
// i'm alive / heartbeat
/* pcf8574.digitalWrite(led, counter % 2); */
if (button1->pressed) {
rotate_start(button1);
}
if (button1->released) {
device_end(button1);
}
/* unsigned int buttonCondition = buttonHolding; */
/* unsigned int liquid_levelCondition = ( */
/* ( pumpstate == pumpOff */
/* && liquidLevelAvg >= startpumpheight */
/* ) */
/* || */
/* ( pumpstate == pumpOn */
/* && liquidLevelAvg >= stoppumpheight */
/* && !buttonReleased */
/* ) */
/* ); */
/* pumpstate = ( */
/* buttonCondition || liquid_levelCondition */
/* ) ? (pumpOn) : (pumpOff); */
/* pcf8574.digitalWrite(leeren11, */
/* pumpstate */
/* ); */
}