kidoman / embd

Embedded Programming Framework in Go
http://embd.kidoman.io
MIT License
1.28k stars 156 forks source link

Cannot watch a digital pin on Raspberry-Pi 3 #76

Open allezxandre opened 7 years ago

allezxandre commented 7 years ago

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