The example provided by Adafruit is for the Arduino. Here is a simple example using the BBB.
Schematic of "break beam" demo. |
root@beaglebone:~# cd /sys/class/gpio
root@beaglebone:/sys/class/gpio# echo 115 > export
root@beaglebone:/sys/class/gpio# cd gpio115
root@beaglebone:/sys/class/gpio/gpio115# echo in > direction
root@beaglebone:/sys/class/gpio/gpio115# cat value
1
root@beaglebone:/sys/class/gpio/gpio115# cat value
0
No comments:
Post a Comment