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

Test and debugging examples using the WebIDE


In this example, we will connect the BlinkM to the Raspberry Pi. A BlinkM is an RGB LED that can be connected to your Raspberry Pi via the I2C interface. It is possible to execute light scripts using the port. The connections to the BlinkM are similar to that of the 7-segment backpack.

BlinkM connected to the Cobbler

Note

It is important to pay attention while connecting devices to the GPIO header of the Raspberry Pi. If there are devices that draw a lot of current from the GPIO pins, it may reset the Pi or permanently damage it in the event of a short circuit. It is assumed that you are familiar with basic electronics and capable of handling such devices.

Prepare for lift off

Similar to the previous experiment, we need to determine the bus to which the device is connected using the i2cdetect command. As shown in the following screenshot, the device is connected to bus 1 and the device address is 0x09:

Blinkm connected to bus 1

Engage thrusters

  1. The BlinkM...