The pin numbering is a bit weird. On the Pi5 enter this command You will see So we use 573 for GPIO2
Code:
cat /sys/kernel/debug/gpioCode:
...gpiochip0: GPIOs 571-624, parent: platform/1f000d0000.gpio, pinctrl-rp1: gpio-571 (ID_SDA ) gpio-572 (ID_SCL ) gpio-573 (GPIO2 ) gpio-574 (GPIO3 )...Code:
const button = new Gpio(573, 'in', 'both');Statistics: Posted by neilgl — Mon Feb 24, 2025 2:00 pm