Skip to content

Commit ca9f3ac

Browse files
committed
fix(typo): examples - rgbLed instead of rgbled
1 parent 2948fb3 commit ca9f3ac

File tree

7 files changed

+31
-31
lines changed

7 files changed

+31
-31
lines changed

libraries/ESP32/examples/GPIO/BlinkRGB/BlinkRGB.ino

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Calling digitalWrite(RGB_BUILTIN, HIGH) will use hidden RGB driver.
77
88
RGBLedWrite demonstrates control of each channel:
9-
void rgbledWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val)
9+
void rgbLedWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val)
1010
1111
WARNING: After using digitalWrite to drive RGB LED it will be impossible to drive the same pin
1212
with normal HIGH/LOW level
@@ -27,13 +27,13 @@ void loop() {
2727
digitalWrite(RGB_BUILTIN, LOW); // Turn the RGB LED off
2828
delay(1000);
2929

30-
rgbledWrite(RGB_BUILTIN, RGB_BRIGHTNESS, 0, 0); // Red
30+
rgbLedWrite(RGB_BUILTIN, RGB_BRIGHTNESS, 0, 0); // Red
3131
delay(1000);
32-
rgbledWrite(RGB_BUILTIN, 0, RGB_BRIGHTNESS, 0); // Green
32+
rgbLedWrite(RGB_BUILTIN, 0, RGB_BRIGHTNESS, 0); // Green
3333
delay(1000);
34-
rgbledWrite(RGB_BUILTIN, 0, 0, RGB_BRIGHTNESS); // Blue
34+
rgbLedWrite(RGB_BUILTIN, 0, 0, RGB_BRIGHTNESS); // Blue
3535
delay(1000);
36-
rgbledWrite(RGB_BUILTIN, 0, 0, 0); // Off / black
36+
rgbLedWrite(RGB_BUILTIN, 0, 0, 0); // Off / black
3737
delay(1000);
3838
#endif
3939
}

libraries/ESP32/examples/RMT/Legacy_RMT_Driver_Compatible/Legacy_RMT_Driver_Compatible.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#else
1818

1919
// add the file "build_opt.h" to your Arduino project folder with "-DESP32_ARDUINO_NO_RGB_BUILTIN" to use the RMT Legacy driver
20-
// rgbledWrite() is a function that writes to the RGB LED and it won't be available here
20+
// rgbLedWrite() is a function that writes to the RGB LED and it won't be available here
2121
#include "driver/rmt.h"
2222

2323
bool installed = false;

libraries/ESP32/examples/RMT/RMT_CPUFreq_Test/RMT_CPUFreq_Test.ino

+7-7
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* that RMT works on any CPU/APB Frequency.
1818
*
1919
* It uses an ESP32 Arduino builtin RGB NeoLED function based on RMT:
20-
* void rgbledWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val)
20+
* void rgbLedWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val)
2121
*
2222
* The output is a visual WS2812 RGB LED color change routine using each time a
2323
* different CPU Frequency, just to illustrate how it works. Serial output indicates
@@ -65,22 +65,22 @@ void loop() {
6565
Serial.updateBaudRate(115200);
6666
Serial.printf("\n--changed CPU Frequency to %lu MHz\n", getCpuFrequencyMhz());
6767

68-
rgbledWrite(RGB_LED_GPIO, BRIGHTNESS, BRIGHTNESS, BRIGHTNESS); // White
68+
rgbLedWrite(RGB_LED_GPIO, BRIGHTNESS, BRIGHTNESS, BRIGHTNESS); // White
6969
Serial.println("White");
7070
delay(1000);
71-
rgbledWrite(RGB_LED_GPIO, 0, 0, 0); // Off
71+
rgbLedWrite(RGB_LED_GPIO, 0, 0, 0); // Off
7272
Serial.println("Off");
7373
delay(1000);
74-
rgbledWrite(RGB_LED_GPIO, BRIGHTNESS, 0, 0); // Red
74+
rgbLedWrite(RGB_LED_GPIO, BRIGHTNESS, 0, 0); // Red
7575
Serial.println("Red");
7676
delay(1000);
77-
rgbledWrite(RGB_LED_GPIO, 0, BRIGHTNESS, 0); // Green
77+
rgbLedWrite(RGB_LED_GPIO, 0, BRIGHTNESS, 0); // Green
7878
Serial.println("Green");
7979
delay(1000);
80-
rgbledWrite(RGB_LED_GPIO, 0, 0, BRIGHTNESS); // Blue
80+
rgbLedWrite(RGB_LED_GPIO, 0, 0, BRIGHTNESS); // Blue
8181
Serial.println("Blue");
8282
delay(1000);
83-
rgbledWrite(RGB_LED_GPIO, 0, 0, 0); // Off
83+
rgbLedWrite(RGB_LED_GPIO, 0, 0, 0); // Off
8484
Serial.println("Off");
8585
delay(1000);
8686
}

libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Currently, this example supports the following targets.
2020
### Configure the Project
2121

2222
Set the LED GPIO by changing the `LED_PIN` definition. By default, the LED_PIN is `RGB_BUILTIN`.
23-
By default, the `rgbledWrite` function is used to control the LED. You can change it to digitalWrite to control a simple LED.
23+
By default, the `rgbLedWrite` function is used to control the LED. You can change it to digitalWrite to control a simple LED.
2424

2525
#### Using Arduino IDE
2626

libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/Zigbee_Light_Bulb.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ static esp_err_t zb_attribute_handler(const esp_zb_zcl_set_attr_value_message_t
155155
if (message->attribute.id == ESP_ZB_ZCL_ATTR_ON_OFF_ON_OFF_ID && message->attribute.data.type == ESP_ZB_ZCL_ATTR_TYPE_BOOL) {
156156
light_state = message->attribute.data.value ? *(bool *)message->attribute.data.value : light_state;
157157
log_i("Light sets to %s", light_state ? "On" : "Off");
158-
rgbledWrite(LED_PIN, 255 * light_state, 255 * light_state, 255 * light_state); // Toggle light
158+
rgbLedWrite(LED_PIN, 255 * light_state, 255 * light_state, 255 * light_state); // Toggle light
159159
}
160160
}
161161
}
@@ -172,7 +172,7 @@ void setup() {
172172
ESP_ERROR_CHECK(esp_zb_platform_config(&config));
173173

174174
// Init RMT and leave light OFF
175-
rgbledWrite(LED_PIN, 0, 0, 0);
175+
rgbLedWrite(LED_PIN, 0, 0, 0);
176176

177177
// Start Zigbee task
178178
xTaskCreate(esp_zb_task, "Zigbee_main", 4096, NULL, 5, NULL);

libraries/OpenThread/examples/COAP/coap_lamp/coap_lamp.ino

+9-9
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ bool otDeviceSetup(const char **otSetupCmds, uint8_t nCmds1, const char **otCoap
5555
}
5656
if (i != nCmds1) {
5757
log_e("Sorry, OpenThread Network setup failed!");
58-
rgbledWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
58+
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
5959
return false;
6060
}
6161
Serial.println("OpenThread started.\r\nWaiting for activating correct Device Role.");
@@ -69,7 +69,7 @@ bool otDeviceSetup(const char **otSetupCmds, uint8_t nCmds1, const char **otCoap
6969
Serial.println();
7070
if (!tries) {
7171
log_e("Sorry, Device Role failed by timeout! Current Role: %s.", otGetStringDeviceRole());
72-
rgbledWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
72+
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
7373
return false;
7474
}
7575
Serial.printf("Device is %s.\r\n", otGetStringDeviceRole());
@@ -80,12 +80,12 @@ bool otDeviceSetup(const char **otSetupCmds, uint8_t nCmds1, const char **otCoap
8080
}
8181
if (i != nCmds2) {
8282
log_e("Sorry, OpenThread CoAP setup failed!");
83-
rgbledWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
83+
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
8484
return false;
8585
}
8686
Serial.println("OpenThread setup done. Node is ready.");
8787
// all fine! LED goes Green
88-
rgbledWrite(RGB_BUILTIN, 0, 64, 8); // GREEN ... Lamp is ready!
88+
rgbLedWrite(RGB_BUILTIN, 0, 64, 8); // GREEN ... Lamp is ready!
8989
return true;
9090
}
9191

@@ -118,16 +118,16 @@ void otCOAPListen() {
118118
log_i("CoAP PUT [%s]\r\n", payload == '0' ? "OFF" : "ON");
119119
if (payload == '0') {
120120
for (int16_t c = 248; c > 16; c -= 8) {
121-
rgbledWrite(RGB_BUILTIN, c, c, c); // ramp down
121+
rgbLedWrite(RGB_BUILTIN, c, c, c); // ramp down
122122
delay(5);
123123
}
124-
rgbledWrite(RGB_BUILTIN, 0, 0, 0); // Lamp Off
124+
rgbLedWrite(RGB_BUILTIN, 0, 0, 0); // Lamp Off
125125
} else {
126126
for (int16_t c = 16; c < 248; c += 8) {
127-
rgbledWrite(RGB_BUILTIN, c, c, c); // ramp up
127+
rgbLedWrite(RGB_BUILTIN, c, c, c); // ramp up
128128
delay(5);
129129
}
130-
rgbledWrite(RGB_BUILTIN, 255, 255, 255); // Lamp On
130+
rgbLedWrite(RGB_BUILTIN, 255, 255, 255); // Lamp On
131131
}
132132
}
133133
}
@@ -136,7 +136,7 @@ void otCOAPListen() {
136136
void setup() {
137137
Serial.begin(115200);
138138
// LED starts RED, indicating not connected to Thread network.
139-
rgbledWrite(RGB_BUILTIN, 64, 0, 0);
139+
rgbLedWrite(RGB_BUILTIN, 64, 0, 0);
140140
OThreadCLI.begin(false); // No AutoStart is necessary
141141
OThreadCLI.setTimeout(250); // waits 250ms for the OpenThread CLI response
142142
setupNode();

libraries/OpenThread/examples/COAP/coap_switch/coap_switch.ino

+6-6
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ bool otDeviceSetup(
4949
}
5050
if (i != nCmds1) {
5151
log_e("Sorry, OpenThread Network setup failed!");
52-
rgbledWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
52+
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
5353
return false;
5454
}
5555
Serial.println("OpenThread started.\r\nWaiting for activating correct Device Role.");
@@ -63,7 +63,7 @@ bool otDeviceSetup(
6363
Serial.println();
6464
if (!tries) {
6565
log_e("Sorry, Device Role failed by timeout! Current Role: %s.", otGetStringDeviceRole());
66-
rgbledWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
66+
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
6767
return false;
6868
}
6969
Serial.printf("Device is %s.\r\n", otGetStringDeviceRole());
@@ -74,12 +74,12 @@ bool otDeviceSetup(
7474
}
7575
if (i != nCmds2) {
7676
log_e("Sorry, OpenThread CoAP setup failed!");
77-
rgbledWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
77+
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
7878
return false;
7979
}
8080
Serial.println("OpenThread setup done. Node is ready.");
8181
// all fine! LED goes and stays Blue
82-
rgbledWrite(RGB_BUILTIN, 0, 0, 64); // BLUE ... Swtich is ready!
82+
rgbLedWrite(RGB_BUILTIN, 0, 0, 64); // BLUE ... Swtich is ready!
8383
return true;
8484
}
8585

@@ -149,7 +149,7 @@ void checkUserButton() {
149149
lastLampState = !lastLampState;
150150
if (!otCoapPUT(lastLampState)) { // failed: Lamp Node is not responding due to be off or unreachable
151151
// timeout from the CoAP PUT message... restart the node.
152-
rgbledWrite(RGB_BUILTIN, 255, 0, 0); // RED ... something failed!
152+
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... something failed!
153153
Serial.println("Reseting the Node as Switch... wait.");
154154
// start over...
155155
setupNode();
@@ -161,7 +161,7 @@ void checkUserButton() {
161161
void setup() {
162162
Serial.begin(115200);
163163
// LED starts RED, indicating not connected to Thread network.
164-
rgbledWrite(RGB_BUILTIN, 64, 0, 0);
164+
rgbLedWrite(RGB_BUILTIN, 64, 0, 0);
165165
OThreadCLI.begin(false); // No AutoStart is necessary
166166
OThreadCLI.setTimeout(250); // waits 250ms for the OpenThread CLI response
167167
setupNode();

0 commit comments

Comments
 (0)