Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing Code for 6803 Ledstrip #6

Open
Petoodle opened this issue Feb 27, 2016 · 0 comments
Open

Writing Code for 6803 Ledstrip #6

Petoodle opened this issue Feb 27, 2016 · 0 comments

Comments

@Petoodle
Copy link

I have been trying to make the Adafruit for a few weeks. What I found out so far:
I've got another kind of ledstrip than advised. I have the 6803 (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), while adafruit works with WS2801 ledstrips. The differences are: the microcontrollers are different. So the SPI settings don't work for me. I have also tried adapting these settings, but no possible combination is working. And three LEDS are handled per one microcontroller.

If I run this program: https://github.com/adafruit/LPD6803-RGB-Pixels/blob/master/examples/strandtest/strandtest.pde
Mentioned in this tutorial: https://learn.adafruit.com/20mm-led-pixels/code
I adapt:
int dataPin = 11;
int clockPin = 13;
and I've got no problems at all, rainbows all the way :)
The sad thing is: this does not give further instructions in how to make ambilight work.

So when I try the adalight test: https://github.com/adafruit/Adalight/blob/master/Arduino/LEDstream/LEDstream.pde
Mentioned in this tutorial: https://learn.adafruit.com/adalight-diy-ambient-tv-lighting/download-and-install
it just does'nt work. The ledstrip just stays the same colour as it was before I loaded the program.

The strandtest I mentioned, is perfectly working. Now I have adapted the LEDstream file for on the arduino. It gives no errors, and my inbedded tiny strandtest works so far.
https://github.com/tvdzwan/hyperion/files/149536/LEDstream6803.zip

The sad thing is: I found out the problem is probably in the Processing files. The working strandtest (Arduino) has a tiny section in which it transfers the RGB numbers to bytes:

// 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);
}

Now it seems the RGB values are not converted to bytes in the Ledstream (Arduino) file I edited, but in the ColorSwirl and Adafruit (Processing) files: https://github.com/adafruit/Adalight

Now I have totally no clue how to adapt the Processing files so it sends the bytes in the correct sequence to the ledstrip. If it was an arduino file it would be easier: I would just copy the code above and try things. But I have no clue how to rewrite it to the Processing language, and when i found that out: which values in the Processing code I should transfer to bytes.

I would be so grateful if someone would help me! I've been on this for weeks (because I have very little experience with writing codes). Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant