LPD 8806

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
hankhudson
 
Posts: 11
Joined: Mon Jun 23, 2014 9:08 pm

Re: LPD 8806

Post by hankhudson »

The code below is the first part of the code that I uploaded to the micro. The rest is the same as the code for the uno downloaded from the link included in your excellent tutorial "Digital RGB LED Strip". The only changes I have made are the number of LEDs and the digital and clock pin numbers. It worked fine with my uno.

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();
}
de]
Last edited by hankhudson on Fri Jul 18, 2014 3:56 pm, edited 1 time in total.

hankhudson
 
Posts: 11
Joined: Mon Jun 23, 2014 9:08 pm

Re: LPD 8806

Post by hankhudson »

I've attached a photo of the micro set up to go with the description in the previous post in case the description was not clear. Thanks
Attachments
RE PREVIOUS POST
RE PREVIOUS POST
lpd8806 ard micro probs.gif (690.79 KiB) Viewed 211 times

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”