control.ino
1.02 KB
#include "control.h"
void loop_control( int counter ) {
// i'm alive / heartbeat
/* pcf8574.digitalWrite(led, counter % 2); */
if (button1->pressed) {
pump_start(button1);
}
if (button1->released) {
pump_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 */
/* ); */
}