iiot2k / gpiox

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

Cannot setup watch for multiple gpios watch_gpio #3

Closed urbanskimichal closed 4 months ago

urbanskimichal commented 4 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 4 months ago

The problem is described in issue 1.