I got the new flora (wearable technology similar to the lilypad) by adafruit and I am having trouble writing the code to cross-fade colors. I'm new to electronics and don't really know how to write code. I've started with the basic "test" code (the floratest). I am looking to have blue and white slowly fade into each other. I was also wondering how to program each light separate. Example, while one is fading from blue to white, another is fading the opposite (white to blue). I was able to get it to blink blue and white from the test code:

for (j=0; j < 256 * 5; j++) { // 5 cycles of all 25 colors in the wheel for (i=0; i < strip.numPixels(); i++) { // tricky math! we use each pixel as a fraction of the full 96-color wheel // (thats the i / strip.numPixels() part) // Then add in j which makes the colors go around per pixel // the % 96 is to make the wheel cycle around strip.setPixelColor(i, Wheel( ((i * 256 / strip.numPixels()) + j) % 256) ); } strip.show(); // write all the pixels out delay(wait); }}*/// fill the dots one after the other with said color// good for testing purposesvoid colorWipe(RGBPixel c, uint8_t wait) { int i;

for (j=0; j < 256 * 5; j++) { // 5 cycles of all 25 colors in the wheel for (i=0; i < strip.numPixels(); i++) { // tricky math! we use each pixel as a fraction of the full 96-color wheel // (thats the i / strip.numPixels() part) // Then add in j which makes the colors go around per pixel // the % 96 is to make the wheel cycle around strip.setPixelColor(i, Wheel( ((i * 256 / strip.numPixels()) + j) % 256) ); } strip.show(); // write all the pixels out delay(wait); }}*/// fill the dots one after the other with said color// good for testing purposesvoid colorWipe(RGBPixel c, uint8_t wait) { int i;

Thanks for posting correctly although you could have modified the original post.

Fading is just changing the RGB values from one set to another. Look at some pages on colour theory. Treat RGB numbers like coordnates in three dimensional space.

But most importantly of all learn how to read the code and what those statements actually do. That code is example code that shows you how to drive the hardware, can you seprate out what functions do what? I am sure you are not expecting other people to write your code for you, so look at the tutorials and especially the blink without delay technique, you will need this to do two or more things seemingly independently.