element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
BeagleBoard
  • Products
  • Dev Tools
  • Single-Board Computers
  • BeagleBoard
  • More
  • Cancel
BeagleBoard
Blog Interfacing BeagleBone Black with Adafruit 7-segment LED display
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join BeagleBoard to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fustini
  • Date Created: 4 Nov 2013 4:31 PM Date Created
  • Views 2435 views
  • Likes 1 like
  • Comments 1 comment
  • maker
  • python
  • i2c
  • beaglebone_black
  • oshw
  • 7_segment_display
  • beagleboard.org
  • make
  • beagleboneblack
  • diy
  • leddisplaych
  • bbb
  • BeagleBone
  • 7_segment
  • open_hardware
  • bb_black
  • adafruit
  • open_source_hardware
Related
Recommended

Interfacing BeagleBone Black with Adafruit 7-segment LED display

fustini
fustini
4 Nov 2013

image

Adafruit's 7-segement LED "Backpack" display turned out to be quite easy to interface with the BeagleBone Black (aka BBB) .  "Backpack" means the 7-segment display has a chip on the back side which allows it to be controlled via I2C.  The display just needs power (3.3V) and ground along with the 2 pins on the BBB for I2C data and clock signals.  Here's how I have it wired up on top of an Adadfruit BeagleBone Black prototyping plate :

image

image

To get the software installed, I started with these Raspberry Pi instructions:

Matrix and 7-Segment LED Backpack with the Raspberry Pi:Configuring your Pi for I2C
http://learn.adafruit.com/matrix-7-segment-led-backpack-with-the-raspberry-pi/configuring-your-pi-for-i2c


and then I looked at instructions to install Adafruit's Python library for the BeagleBone Black:

 

I2C | Setting up IO Python Library on BeagleBone Black | Adafruit Learning System

http://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/i2c

The Adafruit_I2C.py module is now included in the Adafruit_BBIO library as a top-level module. This means that many of the popular Python libraries built for the Raspberry Pi, will now just work on the BeagleBone Black if they are using I2C

 

Here's actual commands I ran on my BeagleBone Black running Angstrom Linux.  First, make sure the current date & time is set:

 

root@beaglebone:~# /usr/bin/ntpdate -b -s -u pool.ntp.org

 

Install the packages and modules needed:

 

root@beaglebone:~# opkg update && opkg install python-pip python-setuptools python-smbus
root@beaglebone:~# pip install Adafruit_BBIO

 

Then test if the Adafruit BeagleBone Python library is installed ok:

 

root@beaglebone:~# python -c "import Adafruit_BBIO.GPIO as GPIO; print GPIO"
<module 'Adafruit_BBIO.GPIO' from '/usr/lib/python2.7/site-packages/Adafruit_BBIO/GPIO.so'>
root@beaglebone:~# python
Python 2.7.3 (default, May 20 2013, 12:03:28) 
[GCC 4.7.3 20130205 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Adafruit_BBIO.GPIO as GPIO; print GPIO
<module 'Adafruit_BBIO.GPIO' from '/usr/lib/python2.7/site-packages/Adafruit_BBIO/GPIO.so'>

 

Next download the Adafruit Python Raspberry Pi library via git.  This library includes Python modules for their products like the 7-segment backpack

 

root@beaglebone:~# git clone https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code.git

 

Before running the demo Python program, make sure the Linux can "see" your 7-segment module on the I2C bus.  It is configured to have an address of 0x70 so you should see that address in the "map" of the I2C bus that i2cdetect prints out:

 

root@beaglebone:~/Adafruit-Raspberry-Pi-Python-Code/Adafruit_LEDBackpack# i2cdetect -y -r 1
  0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: 70 -- -- -- -- -- -- -- 

 

Finally, run the demo Python program for the 7-segment display:

 

root@beaglebone:~/Adafruit-Raspberry-Pi-Python-Code/Adafruit_LEDBackpack# python ex_8x8_pixels.py

 

Here is a video I recorded of it running on my BeagleBone Black:

 

Adafruit 7 segment connected to BeagleBone Black - YouTube

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image



Cheers,

fustini

http://twitter.com/pdp7

  • Sign in to reply
  • fustini
    fustini over 11 years ago

    I've started working on a Python script to display my current number of unseen Facebook notifications (that white number in the redbox in the upper right of Facebook):

    image

    image

    Here is the code so far (a work in progress):

    https://gist.github.com/pdp7/7359910

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube