See my other forum post for background...
I've finally got the Advanced Belt Kit from the LBD8806 examples, not only running on the Arduino Due but also with the superior WS2801 pixels!
https://github.com/MarkEMarkEMark/WS2801MEO
My changes to Adafruit's code is a bit messy - but I was trying all sorts to get it working and lost any methodical-ness.
I've had it up to 240 frames per second - and it's still silky smooth during the fades with 100 bulbs!
**It would be great if someone could get the timer working again***
I did it!! Advanced Belt Kit running on Due with WS2801 pixels
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 33
- Joined: Thu Dec 20, 2012 9:33 am
-
- Posts: 33
- Joined: Thu Dec 20, 2012 9:33 am
Re: I did it!! Advanced Belt Kit running on Due with WS2801 pixels
I'm not feeling the love here! I gather not many people have Arduino Dues. I can't recommend it enough - it' so fast.
Anyway - I've added some more programs to the Advanced Belt Kit.
I'd really like to be able to get the Sine table / fixSin / fixCos code working for 255 levels, as the flag looks a bit rubbish now. I've fixed the sine wave function by replacing it with the in-built sin function. I don't think it would work very fast on a standard Ardunino, though
(see my other post for more info on this issue: http://forums.adafruit.com/viewtopic.php?f=47&t=36249)
I hope pburgess is listening...
Anyway - I've added some more programs to the Advanced Belt Kit.
I'd really like to be able to get the Sine table / fixSin / fixCos code working for 255 levels, as the flag looks a bit rubbish now. I've fixed the sine wave function by replacing it with the in-built sin function. I don't think it would work very fast on a standard Ardunino, though
(see my other post for more info on this issue: http://forums.adafruit.com/viewtopic.php?f=47&t=36249)
I hope pburgess is listening...
- bonnette_l
- Posts: 6
- Joined: Mon Jan 21, 2013 1:01 pm
Re: I did it!! Advanced Belt Kit running on Due with WS2801 pixels
I down loaded your code and tried it on a "Teensy" and a 25 LED WS2801 string.
It looks great.
Thanks for your work
Larry
It looks great.
Thanks for your work
Larry
-
- Posts: 33
- Joined: Thu Dec 20, 2012 9:33 am
Re: I did it!! Advanced Belt Kit running on Due with WS2801 pixels
Thank you!
I'm currently working on getting the Due interrupts working. So the code isn't working at the moment. Use the previous version, if you want a working version.
I'm currently working on getting the Due interrupts working. So the code isn't working at the moment. Use the previous version, if you want a working version.
-
- Posts: 33
- Joined: Thu Dec 20, 2012 9:33 am
Re: I did it!! Advanced Belt Kit running on Due with WS2801 pixels
I've now added a proper Larson scanner with proper fade trails.
Also added another random strobe, but with the fade written for the Larson scanner. Looks much prettier and natural.
Fixed the 127 instead of 255 level problem of the Simplex Noise
Added a frame delay on some programs - this will eventually be on all of them. The reason for this is that a fixed frame rate can be too fast for some programs, so skipping frames is needed.
Still required: a fix to pburgess sin maths, so that it can once again reach the 'blacks' of the troughs - this affects the WavyFlag and SineWave programs. (I've temporarily fixed the SineWave by using a proper sine, but this will be slow for non-Due)
I hope that more of you get Dues and WS2801s and can get your heads around the advanced belt code, as I'd really like to share programs. I've now added 8 new programs to Pburgess original 4. I'd love to know what he thinks!.
Also added another random strobe, but with the fade written for the Larson scanner. Looks much prettier and natural.
Fixed the 127 instead of 255 level problem of the Simplex Noise
Added a frame delay on some programs - this will eventually be on all of them. The reason for this is that a fixed frame rate can be too fast for some programs, so skipping frames is needed.
Still required: a fix to pburgess sin maths, so that it can once again reach the 'blacks' of the troughs - this affects the WavyFlag and SineWave programs. (I've temporarily fixed the SineWave by using a proper sine, but this will be slow for non-Due)
I hope that more of you get Dues and WS2801s and can get your heads around the advanced belt code, as I'd really like to share programs. I've now added 8 new programs to Pburgess original 4. I'd love to know what he thinks!.
-
- Posts: 33
- Joined: Thu Dec 20, 2012 9:33 am
Re: I did it!! Advanced Belt Kit running on Due with WS2801 pixels
I've added a new program type, and done a few bug fixes and streamlining
https://github.com/MarkEMarkEMark/WS2801MEO
https://github.com/MarkEMarkEMark/WS2801MEO
-
- Posts: 33
- Joined: Thu Dec 20, 2012 9:33 am
Re: I did it!! Advanced Belt Kit running on Due with WS2801 pixels
I've finally got interrupts working on the Due (i.e. replaced the unusable Timer1).
What I've learned is that you should not put any 'Delay' commands in any Due interrupt code. I've had to remove the 'Delay(1);' from Adafruit's driver code. I debugged this by chipping away at the driver to get to the basics, and after I worked out that it was the 'Delay', I saw that my chipping away had saved a bit of memory, so I've left it like that. The driver code is now significantly different from the Adafruit original, and is SPI only - the slower user-defined pins will no longer work.
There are also several other improvements and bug fixes.
Now that I've finally got the interrupt issue sorted, the next stage is put some kind of user-interface into it, so that it's no longer just randomly changing programs. I want to be able to select the program I want from my phone, or something like that.
What I've learned is that you should not put any 'Delay' commands in any Due interrupt code. I've had to remove the 'Delay(1);' from Adafruit's driver code. I debugged this by chipping away at the driver to get to the basics, and after I worked out that it was the 'Delay', I saw that my chipping away had saved a bit of memory, so I've left it like that. The driver code is now significantly different from the Adafruit original, and is SPI only - the slower user-defined pins will no longer work.
There are also several other improvements and bug fixes.
Now that I've finally got the interrupt issue sorted, the next stage is put some kind of user-interface into it, so that it's no longer just randomly changing programs. I want to be able to select the program I want from my phone, or something like that.
- slurry bowl
- Posts: 156
- Joined: Sun Nov 11, 2012 6:37 pm
Re: I did it!! Advanced Belt Kit running on Due with WS2801 pixels
so am i right that only strandtest works on Uno/Duemilanovea ?
Cant wait to get a Duo !
Cant wait to get a Duo !
-
- Posts: 33
- Joined: Thu Dec 20, 2012 9:33 am
Re: I did it!! Advanced Belt Kit running on Due with WS2801 pixels
I don't know. I've only every had a Mega and a Due. I can't see why the normal belt wouldn't work on and Uno.
I hope you get your Due soon. Not many people seem to be using them yet.
I hope you get your Due soon. Not many people seem to be using them yet.
-
- Posts: 33
- Joined: Thu Dec 20, 2012 9:33 am
Re: I did it!! Advanced Belt Kit running on Due with WS2801 pixels
I've added an on/off switch (but it fades up/down to keep in spirit of the original code)
- I've also included examples of just interrupts and also the button code. The button code is based on Adafruit's original debouncing code that used a timer that is no longer used by the Due(http://www.adafruit.com/blog/2009/10/20 ... ebouncing/). I've updated it to use the new interrupts.
- I've also included examples of just interrupts and also the button code. The button code is based on Adafruit's original debouncing code that used a timer that is no longer used by the Due(http://www.adafruit.com/blog/2009/10/20 ... ebouncing/). I've updated it to use the new interrupts.
Please be positive and constructive with your questions and comments.