When trying to Watch a pin for a change in its readings, Watch returns a non-nil error:
open /sys/class/gpio/gpio4/edge: no such file or directory
and indeed, /sys/class/gpio/ does not contain the gpio4 folder.
I installed WiringPi and ran gpio export 4 in, which makes /sys/class/gpio/gpio4/edge appear. But then, running my program again, Watch yields:
bad file descriptor
When trying to
Watcha pin for a change in its readings,Watchreturns a non-nil error:open /sys/class/gpio/gpio4/edge: no such file or directoryand indeed,
/sys/class/gpio/does not contain thegpio4folder.I installed WiringPi and ran
gpio export 4 in, which makes/sys/class/gpio/gpio4/edgeappear. But then, running my program again,Watchyields:bad file descriptor