Turn LED off when rotary button is pressed

This commit is contained in:
sanni 2022-11-01 22:50:14 +01:00
parent d7082a2366
commit 2c95299010

View File

@ -2929,6 +2929,7 @@ int checkButton() {
buttonState = reading; buttonState = reading;
// Button was pressed down // Button was pressed down
if (buttonState == 0) { if (buttonState == 0) {
setColor_RGB(0, 0, 0);
unsigned long pushTime = millis(); unsigned long pushTime = millis();
// Wait until button was let go again // Wait until button was let go again
while ((PING & (1 << PING2)) >> PING2 == 0) { while ((PING & (1 << PING2)) >> PING2 == 0) {