Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Programming the BeagleBone

You're reading from  Programming the BeagleBone

Product type Book
Published in Jan 2016
Publisher
ISBN-13 9781784390013
Pages 180 pages
Edition 1st Edition
Languages

Table of Contents (21) Chapters

Programming the BeagleBone
Credits
About the Author
Acknowledgment
About the Reviewers
www.PacktPub.com
Preface
Cloud9 IDE Blinking Onboard LEDs Blinking External LEDs Controlling LED Using a Push Button Reading from Analog Sensors PWM – Writing Analog Information Internet of Things with BeagleBone Physical Computing in Python UART, I2C, and SPI Programming Internet of Things using Python GPIO Control in Bash BeagleBone Capes
Pinmux and the Device Tree Index

Dancing external LEDs circuit setup


Let's write a program to dance LEDs in both directions like we did in the previous chapter. For this exercise, you will need:

  • Seven LEDs: We are using seven LEDs to create a dancing pattern

  • Male-to-male jumper wires: We need jumper wires to connect BeagleBone and components through a breadboard

  • Seven resistor 400Ω–1kΩ: A resistor is needed to limit current flowing through an LED to protect it.

  • Half size breadboard: A breadboard is needed to create a solderless circuit.

Power off the board and disconnect the power and USB cable. Then attach components to BeagleBone as shown in the previous diagram.

Circuit analysis

This circuit is the same as the last circuit repeated seven times. We used seven GPIO pins to connect seven LEDs through resistors. These pins are P8_7, P8_9, P8_11, P8_13, P8_15, P8_17 and P8_19. The negative end of all LEDs is connected to a single column. This column is connected to ground via P8_1 pin on BeagleBone. So, seven different positive...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}