Keyestudio ESP32 Manual page 62

Starter kit
Hide thumbs Also See for ESP32:
Table of Contents

Advertisement

ESP32 Starter Kit
colorWipe(strip.Color(0, 0, 255), 50);
// Send a theater pixel chase in...
theaterChase(strip.Color(127, 127, 127), 50);
theaterChase(strip.Color(127,
theaterChase(strip.Color(
rainbow(20);
rainbowCycle(20);
theaterChaseRainbow(50);
}
// Fill the dots one after the other with a color
void colorWipe(uint32_t
for(uint16_t
i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, c);
strip.show();
delay(wait);
}
}
void rainbow(uint8_t
uint16_t
i, j;
for(j=0; j<256; j++) {
for(i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, Wheel((i+j)
}
strip.show();
delay(wait);
}
}
// Slightly different, this makes the rainbow equally distributed throughout
void rainbowCycle(uint8_t
uint16_t
i, j;
for(j=0; j<256*5; j++) {
for(i=0;
i<
strip.numPixels(); i++) {
strip.setPixelColor(i, Wheel(((i
}
strip.show();
delay(wait);
}
}
//Theatre-style crawling lights.
void theaterChase(uint32_t
for
(int
j=0; j<10; j++) {
for
(int
q=0; q
for
(int
i=0; i
strip.setPixelColor(i+q, c);
}
58
0,
0), 50);
0,
0, 127), 50);
uint8_t
c,
wait) {
wait) {
wait) {
// 5 cycles of all colors on wheel
*
c,
uint8_t
wait) {
//do 10 cycles of chasing
<
3; q++) {
<
strip.numPixels(); i=i+3) {
// Blue
// White
// Red
// Blue
&
255));
256
/
strip.numPixels())
//turn every third pixel on
(continued from previous page)
+
j)
&
255));
(continues on next page)
Chapter 8. Arduino Tutorial

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Related Products for Keyestudio ESP32

Table of Contents

Save PDF