Hard to say exactly without seeing the original code in question. Most likely it's either reading from a table or calculating a sort of sine wave, and then using PWM to drive the single LED.
If you're using our LPD8806 library, this should be a relatively straightforward translation. For example, in the original code, there might be a line that sets the PWM brightness like this (or something similar):
- Code: Select all
ORC2A = table[x];
In your own code, after declaring the LPD8806 strip object and such, somewhere in your loop() function, you could make the first LED breathe white with something like this:
- Code: Select all
strip.setPixelColor(0, table[x], table[x], table[x]);
strip.show();