Sorry : my mistake. Change the line
bool StateB2 = digitalRead(PIN_BUTTON1);
to
bool StateB2 = digitalRead(PIN_BUTTON2);(PIN_BUTTON2 instead of PIN_BUTTON1).
It should be OK now (fingers crossed)
Sorry : my mistake. Change the line
bool StateB2 = digitalRead(PIN_BUTTON1);
to
bool StateB2 = digitalRead(PIN_BUTTON2);(PIN_BUTTON2 instead of PIN_BUTTON1).
It should be OK now (fingers crossed)