EasyManuals Logo

Freenove ESP32 User Manual

Default Icon
159 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #106 background image
Need support? support@freenove.com
104
Chapter 9 WS2812
www.freenove.com
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
strip.show();
}
lastStripUpdateTime = millis();
}
break;
case LED_MODE_BREATHING:
if (millis() - lastStripUpdateTime > 10) {
if (breathingStateUp) {
breathingStep += 10;
if (breathingStep >= 255) {
breathingStep = 255;
breathingStateUp = false;
}
} else {
breathingStep -= 10;
if (breathingStep <= 0) {
breathingStep = 0;
breathingStateUp = true;
}
}
int j = breathingStep;
strip.setBrightness(j);
for (int i = 0; i < LEDS_COUNT; i++) {
strip.setLedColorData(i, ledConfig_t.r, ledConfig_t.g, ledConfig_t.b);
}
strip.show();
lastStripUpdateTime = millis();
}
break;
case LED_MODE_RAINBOW:
if (millis() - lastStripUpdateTime > 10) {
rainbowStep += 2;
if (rainbowStep >= 255) {
rainbowStep = 0;
}
int j = rainbowStep;
for (int i = 0; i < LEDS_COUNT; i++) {
strip.setLedColorData(i, strip.Wheel((i * 256 / LEDS_COUNT + j) & 255));
}
strip.show();
lastStripUpdateTime = millis();
}
break;
default:

Questions and Answers:

Question and Answer IconNeed help?

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

Freenove ESP32 Specifications

General IconGeneral
BrandFreenove
ModelESP32
CategoryComputer Hardware
LanguageEnglish

Related product manuals