iiot2k / gpiox

Raspberry Pi gpiox node.js and C++ library
Apache License 2.0
2 stars 1 forks source link

Cannot setup watch for multiple gpios watch_gpio #3

Closed urbanskimichal closed 1 month ago

urbanskimichal commented 2 months ago

Watching single gpio using watch_gpio works fine, but when I try to setup watch for multiple gpios, like for example:

gpiox.watch_gpio(14, gpiox.GPIO_MODE_INPUT_PULLUP, 100, gpiox.GPIO_EDGE_RISING, (state, edge, pin) => {
    console.log('pressed: ' + pin);
});

gpiox.watch_gpio(15, gpiox.GPIO_MODE_INPUT_PULLUP, 100, gpiox.GPIO_EDGE_RISING, (state, edge, pin) => {
    console.log('pressed: ' + pin);
});

only the callback for the latter is called. Nothing happens when i press a button on pin 14, and when i press a button on pin 15, the callback is executed.

I am using Raspberry Pi 5

iiot2k commented 1 month ago

The problem is described in issue 1.