Tonight I pulled out my LPD8806 project and started working on it again

Tonight I pulled out my LPD8806 project and started working on it again. I hadn’t done anything with it for quite a while (over a month) and after I uploaded new code to the Teensy, everything was acting very oddly. At first I thought I might have a loose wire or something. Then I remembered that the last time I was using the LPD8806 strips, I still had FastLED 2.0 installed. I had recently upgraded to 2.1.

To test things, I went back to 2.0 and uploaded the same code. Now everything is happy again. It seems something is amiss with 2.1 and LPD8806 support. If there is anything I can do to help troubleshoot, let me know.

As an additional point of information, I was doing the 8806 2.1 testing using the latest available branch.

What in particular was happening? Simply saying ‘was acting oddly’ doesn’t really help. FYI, I’m running 2.1 with LPD8806 without any issues.

Sorry about that. There were lots of odd things. The colors were wrong, all of the LEDs in the strip that should have been off/black were instead lit a pale blue all of the time, and the patterns looked nothing like they should. Rather than a slow-moving color chaser in a single saturated color, it was very random flashing and all the colors looked a bit pastel - a bit hard to describe really.

FWIW, I’m using a Teensy 3.1 to drive this. Maybe that’s part of the puzzle?

Hrm, I haven’t had a chance to fiddle with my Teensy yet and mine’s only a 3.0. But if I understand you correctly, when you ran your code with 2.0 everything’s fine, but with 2.1 things go haywire? Dumb test, have you tried turning off dithering? I only say that because I do notice a difference when I leave it on or turn it off.

Yep - that’s correct. I have not tried turning off dithering. I’m quite tired so I’m done playing for the evening, but I’ll give that a try tomorrow night.

On your controller definition line, add .setDither(0):

LEDS.addLeds<LPD8806, …>(leds, NUM_LEDS).setDither(0);

Or you can just do it on a separate line too: LEDS.setDither(0);

Ok - thanks Ashley! :slight_smile:

Are you using the hardware SPI pins or software pins? I recently redid the hardware SPI code and put a call out asking people to poke a testing it, but I haven’t had a chance to run it on a rig here yet.

Also the 2.0 branch doesn’t support the teensy 3 at all - if anything, it would be punting back to using bit banging with digitalRead/digitalWrite

I thought 2.0 supported T3.0 but not T3.1, the doc page says “T3.1 is supported in the 2.1 branch” but doesn’t say anything about the T3.0

@Daniel_Garcia I forgot about the timeline for Teensy 3.1. Now that I think about it, I had been using a build that you had asked for help testing back in late January. Looking at the post, it looks like it was actually a 2.1 build rather than 2.0. Sorry for the confusion.

And yes, I’m using hardware SPI (pins 11 and 13). Given the way it was behaving, an SPI issue seems like a definite possibility.

When I get some more time (possibly not until Saturday) I’ll do more thorough testing to characterize the behavior with the different versions and post the results here.

I did some more testing tonight, and here is what I learned. I have two different projects I’m currently working on. Both are driven with Teensy 3.1 controllers, and both are using hardware SPI. One uses P9813 pixels and the other one uses LPD8806 strips.

I’ve mainly been using two different builds of FastLED - one dated 1/21/2014, and one dated 4/17/2014 - both from the 2.1 branch.

The P9813 project works as expected with either version of the FastLED library. The LPD8806 project works correctly on the older library, but has the issues noted above when using the newer library. From my admittedly limited experience, it really does look like an SPI issue.

Do a pull and try now - it may actually have been an LPD8806 specific issue. I just realized a place where my math was wrong on doing the 7 bit adjustment the lpd8806 does.

Thanks Daniel. Unfortunately, I won’t be able to test this tonight, but I’ll grab it as soon as I get home from work tomorrow and let you know what I find.

That fixed it. Thanks Daniel! :slight_smile:

It appears that I spoke too quickly. It’s mostly fixed now, but I’m still seeing the issue where LEDs that should be black are instead a pale blue (or maybe just a very dim white?).

I think I know what that last one is and will fix it when I get home on Sunday.

Ok - no hurry on my end. I’m just sticking to the older build for now. Enjoy your weekend! :slight_smile: