LEDs and buttons working

This commit is contained in:
Djuri 2023-11-08 12:18:59 +01:00
parent 4f2fbd8a36
commit 91fd921e2e
33 changed files with 3877 additions and 136 deletions

View file

@ -18,22 +18,21 @@ void buttonTask(void *parameter)
{
uint pin = mcp.getLastInterruptPin();
Serial.printf("Button pressed: %d", pin);
// switch (pin)
// {
// case 3:
// toggleScreenTimer();
// break;
// case 2:
// nextScreen();
// break;
// case 1:
// previousScreen();
// break;
// case 0:
// showNetworkSettings();
// break;
// }
switch (pin)
{
case 3:
toggleTimerActive();
break;
case 2:
nextScreen();
break;
case 1:
previousScreen();
break;
case 0:
showSystemStatusScreen();
break;
}
}
mcp.clearInterrupts();
// Very ugly, but for some reason this is necessary