Hardware Reference
In-Depth Information
3. Let's quickly review the Arduino sketch from Adafruit. We will get started by seing
up an LPD8806 object as follows:
//nLEDS refer to number of LEDs in the strip. This cannot exceed
160 LEDs/5m due to current draw.
LPD8806 strip = LPD8806(nLEDs, dataPin, clockPin);
4. In the setup() secion of the Arduino sketch, we will iniialize the RGB strip
as follows:
// Start up the LED strip
strip.begin();
// Update the strip, to start they are all 'off'
strip.show();
5. As soon as we enter the main loop, scripts such as colorChase and rainbow
are executed.
6. We can make use of this Arduino sketch to implement serial port commands to
control the lighing scripts using the Raspberry Pi.
This task merely provides some ideas of connecting and lighting
up the RGB LED strip. You should familiarize yourself with the
working principles of the RGB LED strip.
There are several examples available for controlling the LED strip using the Arduino plaform.
A few are available on the website of this topic.
The Raspberry Pi has an SPI port, and hence, it is possible to
control the RGB strip directly from the Raspberry Pi. Refer to
this topic's website for some examples.
Objective complete - mini debriefing
In this secion, we reviewed opions for decoraive lighing and controlling them using the
Raspberry Pi and Arduino.
 
Search WWH ::




Custom Search