You are on page 1of 6

2013

Accessing GPIO in BeagleBone Black

Author: Praveen Kumar R Email:praveen@tenettech.com

#9/3,Shree Lakshmi complex,2 Floor,Opp,To Vivekananda Park,Girinagar,Bangalore-560085.www.tenettech.com


nd

This week we are going to see how to control GPIO on BeagleBone Black.This is a quick start guide for accessing GPIOs.Two examples ,one for output(Blinking an LED) and one for input(Pushbutton).Here the instructions are given for Debian and Ubuntu Operating System.Steps for installing Debian Operating System on Black click here. These steps will work for Ubuntu also. Step 1: Initially we have to update the system and install the dependencies for the python library. $ sudo apt-get update $ sudo apt-get install build-essential python-setuptools python-smbus y $ sudo apt-get install python-dev $ sudo apt-get install python-pip Step 2: Install the python library pip command. $ sudo pip install Adafruit_BBIO Alternative method Download the following script file run it in your black ,it will automatically install all the necessary dependencies as well as the GPIO library. Click here to download the script file.Then make the file as a executable and run the script. $ sudo chmod a+x gpio.s $ sudo ./gpio.sh

#9/3,Shree Lakshmi complex,2 Floor,Opp,To Vivekananda Park,Girinagar,Bangalore-560085.www.tenettech.com


nd

Example for Output BeagleBone Black GPIO Pinout

Pin Details 7 Analog Pins 65 Digital Pins at 3.3V 2x I2C 2x SPI 2x CAN Bus 4 Timers 4x UART 8x PWM A/D Converter

#9/3,Shree Lakshmi complex,2 Floor,Opp,To Vivekananda Park,Girinagar,Bangalore-560085.www.tenettech.com


nd

Blingking an LED Circuit Connection

P8

P9

Coding

#9/3,Shree Lakshmi complex,2 Floor,Opp,To Vivekananda Park,Girinagar,Bangalore-560085.www.tenettech.com


nd

Example for Input Controlling Led using PushButton Circuit Connection

#9/3,Shree Lakshmi complex,2 Floor,Opp,To Vivekananda Park,Girinagar,Bangalore-560085.www.tenettech.com


nd

Coding

If you want buy Beaglebone Black For training clich here For more queries mailto:info@tenettech.com Website www.tenettech.com Blogspot blogspot.tenettech.com Training http://varsity.tenettech.com/ Daily Deal http://www.ideal4day.com/ YouTube Channel www.youtube.com/tenetworld

#9/3,Shree Lakshmi complex,2 Floor,Opp,To Vivekananda Park,Girinagar,Bangalore-560085.www.tenettech.com


nd

You might also like