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 #105 background imageLoading...
Page #105 background image
Need support? support@freenove.com
103
Chapter 9 WS2812
www.freenove.com
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
ledConfig_t.b = b;
}
void task_showRGBLeds(void *pvParameters) {
switch (ledConfig_t.mode) {
case LED_MODE_OFF:
if (millis() - lastStripUpdateTime > 500) {
for (int i = 0; i < LEDS_COUNT; i++) {
strip.setLedColorData(i, 0, 0, 0);
}
strip.show();
lastStripUpdateTime = millis();
}
break;
case LED_MODE_RGB:
if (millis() - lastStripUpdateTime > 10) {
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_FOLLOWING:
if (millis() - lastStripUpdateTime > 100) {
followingColorStep += 5;
int j = followingColorStep;
strip.setLedColor(j % 4, strip.Wheel((j / 4 * 86) & 255));
lastStripUpdateTime = millis();
}
break;
case LED_MODE_BLINK:
if (millis() - lastStripUpdateTime > 500) {
if (blinkStateUp) {
blinkStateUp = false;
for (int i = 0; i < LEDS_COUNT; i++) {
strip.setLedColorData(i, ledConfig_t.r, ledConfig_t.g, ledConfig_t.b);
}
strip.show();
} else {
blinkStateUp = true;
for (int i = 0; i < LEDS_COUNT; i++) {
strip.setLedColorData(i, 0, 0, 0);
}

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