|
Project Information
Links
|
This library aims to provide an efficient, high performance interface to various led controllers. It will allow developers to choose performance criteria important to them (maximum cpu usage, number of color levels, refresh rates) and calibrate accordingly, and within reason (there are resources limits in a 16Mhz environment!). Initial support:
Note that while many times, you can use struct CRGB { unsigned char r; unsigned char g; unsigned char b; }sometimes the strips from china wire oddly, and it may be something like: struct CRGB { unsigned char b; unsigned char r; unsigned char g; }You may need to do some playing around with it. Also included a new test app that should work better with longer strips and strips that can do > 32 colors. Note for people using sparkfun's ws2801 led strips - you need to call FastSPI_LED.setDataRate(1) before calling init/start. The library defaults to a data rate of 0 for ws2801 strips, which is valid for the chips on the 12v strips, but not on the 5v strips (or, at least, the 12v strips that I have here) - it's too fast and you get weird random flashing occuring. Also - important note for the tm1809 chipset. Unlike the other chipsets, the tm1809 chipset doesn't make use of the SPI core. This means that you can use any of pin 0-13 to drive your leds! Use the FastSPI_LED.setPin(pin); method to set which pin you're driving. A future version of the library will allow you to drive multiple sets of leds off of different pins - but that will require some major re-architecting first. One more note about the tm1809 - because the timing is so tight on it, it only works on 16Mhz arduino systems right now. At some point, i'll work out the nop timings to run it on 8Mhz systems but until then - stick w/16Mhz if you're driving tm1809 strips. The blog for this project, and optimization work in general is at Waiting for O(1). |