Ambilight LPD 6803 Ledstrip Adafruit Problem

Hi all,

I'm trying to work through a tutorial on adafruit for ambilight, but one of the arduino programs does not seem to work.

I'm just using an arduino with this ledstrip: http://www.banggood.com/5M-5050-RGB-Dream-Color-6803-IC-LED-Strip-Light-Waterproof-IP67-12V-DC-p-931386.html

If I run this program: LPD6803-RGB-Pixels/strandtest.pde at master · adafruit/LPD6803-RGB-Pixels · GitHub
Mentioned in this tutorial: Code | 20mm LED Pixels | Adafruit Learning System
I adapt:
int dataPin = 11;
int clockPin = 13;
and I've got no problems at all, rainbows all the way :slight_smile:
The sad thing is: this does not give further instructions in how to make ambilight work.

So when I try the adalight test: Adalight/LEDstream.pde at master · adafruit/Adalight · GitHub
Mentioned in this tutorial: Download & Install | Adalight Project Pack | Adafruit Learning System
it just does'nt work. The ledstrip just stays the same colour as it was before I loaded the program. Now in this program, the data and clockpin should be connected to the same pins I did in the test before. I think this shows the problem has nothing to do with wiring. But I just cant find the method to make this work.

Does anyone have an idea please?

So when I try the adalight test: Adalight/Arduino/LEDstream/LEDstream.pde at master · adafruit/Adalight · GitHub
Mentioned in this tutorial: Download & Install | Adalight Project Pack | Adafruit Learning System
it just does'nt work.

Yes that is correct.

That code is designed for the WS2801 LEDs, this is not what you have. You have the 6803 they are totally different and incompatible.

Okay, that's a pity.

Do you have any suggestions what tutorial would suffice for this ledstrip for Ambilight?

I would google
arduino Ambilight 6803
and see what you get.

Steer clear of any link that says instructables.

Grumpy_Mike:
Steer clear of any link that says "instructables".

Heh, heh. :grinning:

I've searched as much as I could, but I can't find someone who wrote a program for ambilight with a 6803 ledstrip.

I'm about to try and start to write a program of my own now, but I haven't got alot of experience with writing programs. I've just done the basic tutorials in the arduino startup guide book, so this is my first project.

Does anyone know why exactly the programs of the adalight tutorial (either Processing or Arduino) don't work? Then maybe I can use them as a startup and adjust the things in the code that don't work.

Does anyone know why exactly the programs of the adalight tutorial (either Processing or Arduino) don't work?

I told you because they use a type of LED that is not compatible with the type you have.

All you need to do is to replace the LED driving part of the adalight code with code to drive your LEDs. Can you do that?

Ok, that might be doable. I think I only should adapt the arduino file then, because the processing file does not directly control the leds, right?

And I know that in my led strip the leds are controllable in groups of 3. Do you know if that means that 3 leds count for 1 in the program, so in stead of the total 150 leds I should fill in 30 as a total number? Is there something I haven't thought of now? I think the data and clock wire should work the same?

So I've done some more research on how the current program: Adalight/LEDstream.pde at master · adafruit/Adalight · GitHub

works, and I have found I have to do some settings for the SPI aswell: SPI - Arduino Reference

I looked up the data sheet: https://www.adafruit.com/datasheets/LPD6803.pdf
I filled in the 25000000, and I've tried every possible configuration for the other settings just to be sure, but sadly, none of it worked.

Get the LPD6803 working by itself first there should be some example code out their for that.

When you have got this, drop the relevant part into the adafruit code, and remove the code that talks to the other type of LEDs. I suspect that is what the SPI bit is doing, you shouldn't need it.

I already posted here that the strip is working with this program: LPD6803-RGB-Pixels/strandtest.pde at master · adafruit/LPD6803-RGB-Pixels · GitHub

But I cant just paste that into the adafruit code. This strandtest is just executing rainbows in the ledstrip. I need it to execute what Processing tells it to do. So what part of the strandtest exactly could do that?

Thereby the ISP is definitly needed, because this is for the communication through the single data wire in combination with the clock cable as I understand.

So can you explain what I should do exactly? Maybe I'm just too newby to understand.

But I cant just paste that into the adafruit code.

Nobody said you should paste ALL that code into the other program, just replace the bits that talk to the other LEDs.
These are the relevant bits to talk to your LEDs

#include <TimerOne.h>
#include "LPD6803.h"

int dataPin = 2;       // 'yellow' wire
int clockPin = 3;      // 'green' wire
LPD6803 strip = LPD6803(20, dataPin, clockPin); // set to the number of pixels you have


void setup() {
  // include all this in your setup  
  strip.setCPUmax(50);  // start with 50% CPU usage. up this if the strand flickers or is slow  
  // Start up the LED counter
  strip.begin();
  // Update the strip, to start they are all 'off'
  strip.show();
// include the stuff from your other sketch that is NOT to do with lighting up the pixels.
}

/* 
 *  set colours like this only using data from the adifruit example
 *    strip.setPixelColor(i, c); // this sets a colour
 *    then when it is all set up use this to display them
 *    
    strip.show();   // write all the pixels out
 */

 

// usefull function
// fill the dots one after the other with said color
// good for testing purposes
void colorWipe(uint16_t c, uint8_t wait) {
  int i;
  
  for (i=0; i < strip.numPixels(); i++) {
      strip.setPixelColor(i, c);
      strip.show();
      delay(wait);
  }
}

/* Helper functions */

// Create a 15 bit color value from R,G,B
unsigned int Color(byte r, byte g, byte b)
{
  //Take the lowest 5 bits of each value and append them end to end
  return( ((unsigned int)g & 0x1F )<<10 | ((unsigned int)b & 0x1F)<<5 | (unsigned int)r & 0x1F);
}

Maybe I'm just too newby to understand.

Yes that sounds like the problem.
You save money by putting effort into the code to replace the parts that must be changed.
If you do not have the skill to do this you have two choices.

  1. Learn the skills, it is not hard
  2. Buy the components that other people had done and just copy their code, although that is not much of a project is it.