Reader small image

You're reading from  Raspberry Pi LED Blueprints

Product typeBook
Published inSep 2015
Publisher
ISBN-139781782175759
Edition1st Edition
Right arrow
Author (1)
Agus Kurniawan
Agus Kurniawan
author image
Agus Kurniawan

Agus Kurniawan is an independent technology consultant, author, and lecturer. He has over 18 years' experience working on various software development projects, including delivering training courses and workshops, and delivering technical writing. He has done a few research activities related to wireless networking, software, and security in multiple universities. Currently, he is pursuing a Ph.D. program in Computer Science in Germany. He has previously written five books for Packt.
Read more about Agus Kurniawan

Right arrow

Cascading traffic light controllers


You may want to control many traffic light controllers via one board, that is, Raspberry Pi 2. It's possible. You just expand Raspberry Pi GPIO according to your needs. In the previous section, we already learned how to expand Raspberry Pi GPIO using the IC MCP23017. How to work with more than one IC MCP23017?

You can implement it with the following configuration:

  • You can connect the SCL and SDA pins to the same pin for I2C

  • Set the module address (A0, A1, and A2) with different address, for instance, IC1 000 and IC2 111

Now, you can connect the lamps to the IC MCP23017 output pins as usual. The following is a sample of the wiring implementation:

From the preceding figure, you can do construct the following wiring:

  • All IC MCP23017 SDA pins are connected to Raspberry Pi SDA

  • All IC MCP23017 SCL pins are connected to Raspberry Pi SCL

  • All IC MCP23017 VCC pins are connected to Raspberry Pi +5 V

  • All IC MCP23017 GND pins are connected to Raspberry Pi GND

The following...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Raspberry Pi LED Blueprints
Published in: Sep 2015Publisher: ISBN-13: 9781782175759

Author (1)

author image
Agus Kurniawan

Agus Kurniawan is an independent technology consultant, author, and lecturer. He has over 18 years' experience working on various software development projects, including delivering training courses and workshops, and delivering technical writing. He has done a few research activities related to wireless networking, software, and security in multiple universities. Currently, he is pursuing a Ph.D. program in Computer Science in Germany. He has previously written five books for Packt.
Read more about Agus Kurniawan