Pages: [1]   Go Down
Author Topic: Modifying LPD8806 code for WS2801 (yet another LED hula hoop thread)  (Read 2313 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Instead of hijacking the other recent thread that references this guy's hoop project, ( https://github.com/philihp/Jubilee )
I thought I should create a new thread, especially since I'm dealing with a different, much more basic problem.

I unknowingly bought the wrong type of LED strip (because I thought all addressable LEDs were created equal), and as everyone knows, they can be rather pricey.

So instead of dropping another hundred dollars to get the "right" stuff, I was hoping to get a few pointers as to modifying the code to work with a WS2801 strip.

I'm still fairly new to programming, so I apologize in advance. But I did spend a few hours tonight messing with the sketch and the libraries until I stopped getting compiling errors. Unfortunately the farthest along I've gotten is all the LEDs lighting up solid white.

The strip itself is in working condition, as I've tested it with Adafruit's WS2801 strandtest.

Here is a link directly to the pde
https://github.com/philihp/Jubilee/blob/master/jubilee.pde

and the LPD8806 Library
https://github.com/adafruit/LPD8806

and the WS2801 Library
https://github.com/adafruit/Adafruit-WS2801-Library
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

did you ever figure this out? i made the same mistake  smiley-lol

if anyone could give me/us a good starting point like what parts to swap out with the ws2801 library.
I'm not asking for anyone to rewrite it for me just some hints and suggestions as how to go about converting or rewriting a library for my needs
« Last Edit: December 13, 2012, 10:55:49 pm by Jahta » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To the original poster. Since no one wants to help or suggest anything I got a friend helping me convert the jubilee ardunio code to work with the ws2801 I'll post a link when it's ready. It'll hopefully only be a week till it's worked out
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm thinking of getting some strips in the WS2801 form.

Would this not help or work as intended?

http://forums.adafruit.com/viewtopic.php?f=47&t=24256
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

only if you plan on using the led strips for the jubilee.pde for the hula hoop.you have to modify ws2801.h or the jubilee.pde. i had help from a friend that is much much better at programming than me. with his permission i plan on posted the finished program but i'm having trouble getting the sleep mode to turn the lights off right now they just go white
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So here's the folder for the rewritten pde files for the ws2801 strips to work for the hula hoop project. I'm stuck on the issue that the lights won't turn off when sleep mode is triggered. from what i can see the lines of code are the same as the original jubilee.pde file. so i assume the ws2801 isn't reading (0,0,0) as off. i've tried putting a delay right before sleep thinking that the off command wasn't being sent to the ws2801 chip before going into sleep but that didn't seem to work( at least for me). i mean it kind did what it was suppose to.... i get a delay before going into sleep mode but the light still don't turn off.
Another thing i thought of was well the power for the light strips goes straight to 5v. so it does make sense that when the aduino pro mini board goes into sleep that the lights would stay on since they have constant power.

so i guess the big question here is do i have programming issue or a wiring issue and how can i go about fixing this.

Many thanks in advanced and once the sleep mode issue is figured out i'll load this onto github for all to use

PS. Just to clarify the aduino board does go into sleep mode when the "power" ("sleep") button is pushed
Just not the lights

* jubtest2.rar (23.78 KB - downloaded 12 times.)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

well played around and loaded the strandtest.pde from adafruit and the lights do turn off so i can rule out a wiring issue. I'm Very near being finished with this hula hoop. i just want to figure out the whole lights turning off with sleep mode issue without having to just wire up a switch between the lights and the power source.I"m going for as few buttons and switches as i can. which besides the 3 buttons that are inside but will be accessable from outside via somesort of pin. Any kind of help would be awesome thankyou!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This a a complete port from the jubilee.pde that runs the lpd8806. So now all the same functions run on the ws2801 led light strips.
 Me and a friend got together yesterday and finally got everything working correctly.

you need the 4 attatchments.  the spi and sleep library are also needed  but thats included with the arduino ide

* LEDHula.ino (8.67 KB - downloaded 44 times.)
* ws2801.h (2.16 KB - downloaded 38 times.)
* ws2801.cpp (7.52 KB - downloaded 39 times.)
* carrot.h (1.88 KB - downloaded 31 times.)
Logged

Pages: [1]   Go Up
Jump to: