With the uno I plugged each wire directly into the uno as in the tutorial. The micro has male headers. I have inserted it into a breadboard. The micro is powered with the usb just as I did for the uno. The lpd8806 is powered with a 5 volt power supply, again just as I did for the uno.. The power goes directly to the LED strip. The ground is plugged into the breadboard adjacent to the ground symbol on the micro. Adjacent to that is another ground wire that goes to the LED strip. The difference here is that the uno has 2 pins for ground while the micro only has one on that side. The clock wire from the strip is plugged adjacent to the 6 pin on the micro. The digital wire from the strip is plugged into the breadboard adjacent to the 5 pin.
I selected micro as the board type. It uploads fine. When the USB is plugged in and the 5 volt power is off, the strip flickers red. When I turn the 5 volt power on the strip glows bright white.
I'm sure I am doing something fundamentally wrong here. I just can't see it. I checked and checked wiring to no avail.
I have not yet tried to use the RF remote as it totally baffled me. A little help with that would be useful too.
. . . . . .. . . .. . .
Code: Select all
#include "LPD8806.h"
#include "SPI.h" // Comment out this line if using Trinket or Gemma
#ifdef __AVR_ATtiny85__
#include <avr/power.h>
#endif
// Example to control LPD8806-based RGB LED Modules in a strip
/*****************************************************************************/
// Number of RGB LEDs in strand:
int nLEDs = 18;
// Chose 2 pins for output; can be any valid output pins:
int dataPin = 5;
int clockPin = 6;
// First parameter is the number of LEDs in the strand. The LED strips
// are 32 LEDs per meter but you can extend or cut the strip. Next two
// parameters are SPI data and clock pins:
LPD8806 strip = LPD8806(nLEDs, dataPin, clockPin);
// You can optionally use hardware SPI for faster writes, just leave out
// the data and clock pin parameters. But this does limit use to very
// specific pins on the Arduino. For "classic" Arduinos (Uno, Duemilanove,
// etc.), data = pin 11, clock = pin 13. For Arduino Mega, data = pin 51,
// clock = pin 52. For 32u4 Breakout Board+ and Teensy, data = pin B2,
// clock = pin B1. For Leonardo, this can ONLY be done on the ICSP pins.
//LPD8806 strip = LPD8806(nLEDs);
void setup() {
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000L)
clock_prescale_set(clock_div_1); // Enable 16 MHz on Trinket
#endif
// Start up the LED strip
strip.begin();
// Update the strip, to start they are all 'off'
strip.show();
}