Closed frankalicious closed 2 days ago
By returning in the constructor if the pin number is 255 we prevent the error during setup when calling pinMode with an invalid pin number.
[ 312][E][esp32-hal-gpio.c:107] __pinMode(): Invalid IO 255 selected
By adding (i == 7 && BTN_MODE == 255) to the loop we prevent the error
(i == 7 && BTN_MODE == 255)
[ 2408][E][esp32-hal-periman.c:174] perimanGetPinBus(): Invalid pin: 255 [ 2415][E][esp32-hal-gpio.c:188] __digitalRead(): IO 255 is not set as GPIO.
Fixes #9.
By returning in the constructor if the pin number is 255 we prevent the error during setup when calling pinMode with an invalid pin number.
By adding
(i == 7 && BTN_MODE == 255)
to the loop we prevent the errorFixes #9.