PiPHP / GPIO

A PHP library for accessing the GPIO pins on a Raspberry Pi.
MIT License
425 stars 43 forks source link

Initial Interrupt #6

Closed AndrewCarterUK closed 8 years ago

AndrewCarterUK commented 8 years ago

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.

colinodell commented 8 years ago

:+1: I think that's a valid solution.