if ((v>=0) && (v<256))
{r=255;g=v;b=0;}
if ((v>256) && (v<512))
{r=512-v;g=255;b=0;}
if ((v>512) && (v<768))
{r=0;g=255;b=v-512;}
if ((v>768) && (v<=1024))
{r=0;g=1024-v;b=255;}
// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
for(uint16_t i=0; i<strip.numpixels(); i++)="" {
strip.setPixelColor(i, c);
strip.show();
delay(wait);
}
}
void nextRGB() {
if ( r == 255 && g < 255 && b == 0 ) { g++; }
if ( g == 255 && r > 0 && b == 0 ) { r--; }
if ( g == 255 && b < 255 && r == 0 ) { b++; }
if ( b == 255 && g > 0 && r == 0 ) { g--; }
if ( b == 255 && r < 255 && g == 0 ) { r++; }
if ( r == 255 && b > 0 && g == 0 ) { b--; }
}
6.可通過USB電源插口和無線充電兩種方式充電,正在給電池充電時電位器附近的紅色LED燈“亮”,電池充滿后綠色LED燈“亮”。