Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering

Led blinking In Beaglebone Blank

By Ashish Vara

Led blinking In Beaglebone Blank

Let’s start  with the explanation of various peripheral interfaces with Beaglebone black.  I will  begin with a simple external  LED blinking with BBB for better understanding of  the configuration and usage of GPIO pin. I have  chosen the python scripting language for programming but you can write it in any another language also. I have used adafruit python BBB library to make application.

 

Required Tools:

  • Beaglebone Black
  • Led
  • 330 Ω Resistor
  • Breadboard
  • Female to Female connectors

 

Setup of Software environment

Install the latest python version in BBB as explained in tutorial How to make first python program with Beaglebone Black. Install the adafruit python-GPIO library named adafruit_BBIO.

 

Working

It is a simple learning tutorial of Beaglebone black. Here I connected two  LEDs with GPIO pin of Beaglebone black. When script is running, both  the  LEDs are switched ON and OFF for one second. After executing it  for five times, the pin status and configuration are clear.

 

Description

Let’s first prepare the circuit connection. Take a breadboard and provide VCC and ground from BBB to breadboard line. Connect Supply 3.3 V from pin number 3 of header P9 and ground from pin number 2 of header P8. Connect the negative  and positive terminals of both  LEDs with the ground and 330 OHM resistor respectively. Connect another end of both resistors with pin number 8 and 9 of header P8. Provide the supply to Beaglebone black by connecting it with PC through USB cable. Now your circuit is prepared.



Open the command terminal and take an access of Beaglebone black through SSH as explained in getting started with Beaglebone black. Create a new file using touch command with .py extension. Open the file with any text editor (i.e. nano, vim etc.) and write a code in python language.

 

Configuration of GPIO pin

Import the GPIO library from adafruit Beaglebone black library by calling following line in program:

import Adafruit_BBIO.GPIO as GPIO

You can define the pin number with underscore followed by its number. (i.e. P8_8). Give  it an appropriate name.

i.e. LED1 = “P8_8”

Here, I have assigned the name LED1 to pin number 8th oh header P8.

Next, configure the pin as input or output as following function:

 GPIO.setup (Pin number, output/input)

 

For example, I have declared  LED1 (pin number 8th oh header P8) as an output by following line:

 GPIO.setup (LED1,GPIO.OUT)

 

If you want to declare as an input, you can declare as following:

 

GPIO.setup (LED1,GPIO.IN)

Note: here I have declared  LED as an output. (led is output device)

You can make pin high and low by following function:

GPIO.output (Pin number, High or Low)

For example, I  have made led1 (pin number 8th oh header P8) as High and low by following line:

HIGH : GPIO.output (LED1, GPIO.HIGH)

LOW : GPIO.output (LED1, GPIO.LOW)

 


Filed Under: Tutorials

 

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


Featured Tutorials

  • PS2 Keyboard To Store Text In SD Card Using Arduino Circuit Setup On Breadboard
    How To Use PS2 Keyboard To Store Text In SD Card Using Arduino- (Part 42/49)
  • Wireless Path Tracking System Using Mouse, XBee And Arduino Circuit Setup On Breadboard
    How To Make A Wireless Path Tracking System Using Mouse, XBee And Arduino- (Part 43/49)
  • How to Make a Wireless Keyboard Using Xbee with Arduino- (Part 44/49)
  • Making Phone Call From GSM Module Using Arduino Circuit Setup On Breadboard
    How to Make Phonecall From GSM Module Using Arduino- (Part 45/49)
  • How to Make a Call using Keyboard, GSM Module and Arduino
    How To Make A Call Using Keyboard, GSM Module And Arduino- (Part 46/49)
  • Receiving SMS Using GSM Module With Arduino Prototype
    How to Receive SMS Using GSM Module with Arduino- (Part 47/49)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • What is a low power design?
  • Renesas partners with Tata to accelerate progress in advanced electronics
  • STMicroelectronics’ new touchscreen controller for smartphones enables longer runtime
  • Samsung unveils ISOCELL image sensor with industry’s smallest 0.56μm pixel
  • Renesas and Cyberon to deliver integrated voice-user interface solutions

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr bluetooth dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics renesaselectronicscorporation Research samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • Code Optimization
  • Natural Convection Heatsink for 80W power dissipation?
  • Code Optimization
  • Natural Convection Heatsink for 80W power dissipation?
  • Help identifying drop in ssignal

RSS Electro-Tech-Online.com Discussions

  • intro to PI
  • Lighting a .010 green fiber optic with led
  • Bridge purpose in connecting the two functional circuit
  • ICM7555 IC duty cycle limit at high frequency?
  • How to quickly estimate lead acid battery capacity ?
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering