Upon registering the pin with the interrupt watcher there is data available to read in the stream. This causes the watch() method to trigger the callback on the first run of every newly registered pin.
Solution: read pin value file after registering the pin and then add it to the event loop.
Upon registering the pin with the interrupt watcher there is data available to read in the stream. This causes the
watch()
method to trigger the callback on the first run of every newly registered pin.Solution: read pin value file after registering the pin and then add it to the event loop.