int setRed(string str){
int pix = str.toInt();
uint32_t redC = strip.Color(pix,0,0);
for(unit16_t i = 0; i<strip.numPixels();i++){
strip.setPixelColor(i, redC);
strip.show();
delay(200);
}
return -1;
}
int setGreen(string str){
int pix = str.toInt();
uint32_t greenC = strip.Color(0,pix,0);
for(unit16_t i = 0; i<strip.numPixels();i++){
strip.setPixelColor(i, greenC);
strip.show();
delay(200);
}
return -1;
}
int setBlue(string str){
int pix = str.toInt();
uint32_t BlueC = strip.Color(0,0,pix);
for(unit16_t i = 0; i<strip.numPixels();i++){
strip.setPixelColor(i, BlueC);
strip.show();
delay(200);
}
return -1;
}
Click to Expand
Content Rating
Is this a good/useful/informative piece of content to include in the project? Have your say!
You must login before you can post a comment. .