Book Image

Raspberry Pi Embedded Projects Hotshot

Book Image

Raspberry Pi Embedded Projects Hotshot

Overview of this book

Table of Contents (20 chapters)
Raspberry Pi Mechatronics Projects HOTSHOT
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

I2C Communication using the Arduino (optional)


In this project, there is a 7-Segment display, 8x8 LED matrix, proximity sensor (to determine the home position), and a BlinkM RGB LED that communicates via the I2C interface. We will discuss the application of each component in this project.

Prepare for lift off

The main requirement for this section is the necessary I2C device required to interface with the weather clock.

Engage thrusters

Let us review about the 7-Segment display.

The 7-Segment display

  1. The Adafruit 7-Segment display backpack (reference: the tutorial available at https://learn.adafruit.com/adafruit-led-backpack/0-dot-56-seven-segment-backpack provides instructions on setting up the backpack and testing the backpack with a code sample), which is used to display the current atmospheric temperature obtained via the Raspberry Pi.

  2. Adafruit provides libraries to write to the 7-Segment display. In order to write to the 7-Segment display, we declare a 7-Segment object:

    Adafruit_7segment matrix_7segment...