Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LPD8806 not working
#11
No problem Smile

Only thing I would try is to take the Pi out of the picture and try with an Arduino (or our AllPixel). If you go the arduino route, I highly recommend the FastLED library.
This is always my last debugging step since it takes out most of the variables. Well, short of breaking out the oscilloscope Tongue

If you do have to get a new strip, I also highly recommend ditching LPD8806 and go for the APA102. Same two wire SPI interface, we support it in BiblioPixel (DriverAPA102), and it's WAY more robust than the LPD8806. Also, usually a decent amount cheaper. Adafruit carries them as the "DotStar" strips, but they are expensive there. I generally recommend buying on eBay since it will be a ton cheaper.
#12
Funny thing is that this is exactly what I was thinking of today, buying an Arduino, since I was already planning on getting one, just not this soon.
Well, I'll wait for my Arduino and then I'll test the strip.
Not sure if it would be easier for it to just be broken and get a new one. If it isn't, then I have no clue what the issue is with RPI...

I'd like to use PI4j, since I have an app already built on java and I'm not sure if I can use the APA102 with PI4j, though in theory it should work, just that i don't know if I'm up for that.
I'll check APA102 out anyway, together with AllPixel.

Thanks for your time, Adam!
#13
No problem, happy to help Smile
#14
Got the Arduino and found the time to do some tests.
This is the sketch:

Code:
#include "FastLED.h"

// How many leds in your strip?
#define NUM_LEDS 60

// For led chips like Neopixels, which have a data line, ground, and power, you just
// need to define DATA_PIN.  For led chipsets that are SPI based (four wires - data, clock,
// ground, and power), like the LPD8806, define both DATA_PIN and CLOCK_PIN
#define DATA_PIN 2
#define CLOCK_PIN 3

// Define the array of leds
CRGB leds[NUM_LEDS];

void setup() {
    Serial.begin(57600);
    Serial.println("resetting");
    FastLED.addLeds<LPD8806, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
    LEDS.setBrightness(84);
}

void fadeall() { for(int i = 0; i < NUM_LEDS; i++) { leds[i].nscale8(250); } }

void loop() {
// Turn the LED on, then pause
  leds[0] = CRGB::Red;
  FastLED.show();
  delay(500);
  // Now turn the LED off, then pause
  leds[0] = CRGB::Black;
  FastLED.show();
  delay(500);
    
}

And unfortunately, this is the output, dunno if it is my fault or otherwise, ain't got time at the moment to research Sad

Code:
Sketch uses 4,634 bytes (14%) of program storage space. Maximum is 32,256 bytes.
Global variables use 453 bytes (22%) of dynamic memory, leaving 1,595 bytes for local variables. Maximum is 2,048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x77
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x77
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x77
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x77
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x77
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x77
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x77
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x77
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x77
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x77
#15
What arduino board is that? Very weird...
#16
Arduino Uno with ATMEGA328P

Got it working.
Weird, at first I tried with some adafruit library of sorts and it gave me the before mentioned errors.
After that, any sketch that I uploaded gave me the same error, with no results on the Led Strip.

This morning, since I closed my PC last night and the USB connection died, It kind of restarted and running the sketch I posted, it worked.
Reproduced this right now, if I upload the adafruit sketch that gives the error, any sketch uploaded after that will give an error.

Anyway, it now works.
The only issue is that all colors have a blueish tint on the first LED, even the black has some faded blue.
My red is in fact a bit pinker than it should because of that blue pollution.
All other LEDs on the strip are fine though.

Anway, this proves that the LPD8806 is fine, even with the weird first LED.
I'll do a clean Wheezy install and setup Biblio Pixel and try again.
Back to troubleshooting, damn Sad

I ordered a 144 leds APA102, it should arrive in 2-3 weeks(ebay, china)..I really hope it will work on my RPI.
#17
UPDATE: Wheezy and Biblio Pixel clean installs, rewired everything and now it is working.

Unfortunately pi4j with wiringPi still ain't working so my android(remote) and java apps are useless Sad

Anyway, thanks, Adam. Great library and great work!


Forum Jump:


Users browsing this thread: 1 Guest(s)