Quick Question - How do I stop digitalRead()?
janunezc opened this issue · 1 comments
janunezc commented
In the Readme file it states that digitalRead and analogRead functions work by setting up some sort of callback event handler that is constantly called for reading an specific GPIO pin.
I would like to stop the reading after, say 100 samples...
Is that possible?
rwaldron commented
This is the undocumented way:
board.removeAllListeners("digital-read-#");
Where #
is the pin number.