Tuesday, 12 November 2013

EXPORTING GPIO PINS OF BEAGLEBONE BLACK


How to Use the GPIO Pins

Access to the various pins in the headers on the left and right side of the BBB is done through the Linux kernel using its GPIO Interfaces.

echo 60 > /sys/class/gpio/export      

//now to set the gpio pin we are exporting it,here we are using gpio60

echo "out" > /sys/class/gpio/gpio60/direction    

//give out direction for the gpio60th pin(it will be the pin whr we can see the output).

echo 1 > /sys/class/gpio/gpio60/value          

//now what to show in the gpio60?? so to give output we need to store that in value directory here we are giving a high value (ie 1).

No comments:

Post a Comment