Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Raspberry Pi 3 Cookbook for Python Programmers

You're reading from   Raspberry Pi 3 Cookbook for Python Programmers Unleash the potential of Raspberry Pi 3 with over 100 recipes

Arrow left icon
Product type Paperback
Published in Apr 2018
Publisher
ISBN-13 9781788629874
Length 552 pages
Edition 3rd Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Steven Lawrence Fernandes Steven Lawrence Fernandes
Author Profile Icon Steven Lawrence Fernandes
Steven Lawrence Fernandes
Tim Cox Tim Cox
Author Profile Icon Tim Cox
Tim Cox
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Getting Started with a Raspberry Pi 3 Computer 2. Dividing Text Data and Building Text Classifiers FREE CHAPTER 3. Using Python for Automation and Productivity 4. Predicting Sentiments in Words 5. Creating Games and Graphics 6. Detecting Edges and Contours in Images 7. Creating 3D Graphics 8. Building Face Detector and Face Recognition Applications 9. Using Python to Drive Hardware 10. Sensing and Displaying Real-World Data 11. Building Neural Network Modules for Optical Character Recognition 12. Building Robots 13. Interfacing with Technology 14. Can I Recommend a Movie for You? 15. Hardware and Software List 16. Other Books You May Enjoy

Extending the Raspberry Pi GPIO with an I/O expander


As we have seen, making use of the higher-level bus protocols allows us to connect to more complex hardware quickly and easily. The I2C can be put to great use by using it to expand the available I/O on the Raspberry Pi, as well as providing additional circuit protection (and, in some cases, additional power to drive more hardware).

There are lots of devices available that provide I/O expansion over the I2C bus (and also SPI), but the most commonly used is a 28-pin device, MCP23017, which provides 16 additional digital input/output pins. Being an I2C device, it only requires the two signals (SCL and SDA connections, plus ground, and power) and will happily function with other I2C devices on the same bus.

We shall see how the Adafruit I2C 16x2 RGB LCD Pi Plate makes use of one of these chips to control an LCD alphanumeric display and keypad over the I2C bus (without the I/O expander, this would normally require up to 15 GPIO pins).

Boards...

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 £16.99/month. Cancel anytime