Skip to content

Commit

Permalink
Change "neopixel" references to use RGB LED naming (#10225)
Browse files Browse the repository at this point in the history
* fix(rgbled): fixes core rgbledWrite()

* fix(rgbled): fixes examples - rgbledWrite()

* fix(rgbled): fixes variants commetaries - rgbledWrite()

* fix(rgbled): examples and doc - use RGB_LED naming

* fix(rgbled): variants - use RGB_LED naming

* fix(rgbled): other places for RGB LED naming

* fix(typo): cores - rgbLed instead of rgbled

* fix(typo): examples - rgbLed instead of rgbled

* fix(typo): variants commentaties - rgbLed instead of rgbled

* fix(rgbled): bad file name

* fix(typo): typo and commentaries

Co-authored-by: Lucas Saavedra Vaz <[email protected]>

* fix(rgbled): deprecating neopixelWrite()

* fix(rgbled): use RGB LED naming

* fix(rgbled): document formatting

* fix(rgbled): neopixelWrite() is now deprecated

* fix(rgbled): removed attribute in wrong place

* just a git push test

* restart git bash test

* ci(pre-commit): Apply automatic fixes

* removed wrong test file

* fix(rgbled): new Arduino style depreacted attribute

---------

Co-authored-by: Lucas Saavedra Vaz <[email protected]>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 28, 2024
1 parent 0539ebf commit 99e68a0
Show file tree
Hide file tree
Showing 74 changed files with 176 additions and 169 deletions.
2 changes: 1 addition & 1 deletion cores/esp32/esp32-hal-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ extern void ARDUINO_ISR_ATTR __digitalWrite(uint8_t pin, uint8_t val) {
//use RMT to set all channels on/off
RGB_BUILTIN_storage = val;
const uint8_t comm_val = val != 0 ? RGB_BRIGHTNESS : 0;
neopixelWrite(RGB_BUILTIN, comm_val, comm_val, comm_val);
rgbLedWrite(RGB_BUILTIN, comm_val, comm_val, comm_val);
return;
}
#endif // RGB_BUILTIN
Expand Down
6 changes: 6 additions & 0 deletions cores/esp32/esp32-hal-rgb-led.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@

#include "esp32-hal-rgb-led.h"

// Backward compatibility - Deprecated. It will be removed in future releases.
void neopixelWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val) {
log_w("neopixelWrite() is deprecated. Use rgbLedWrite().");
rgbLedWrite(pin, red_val, green_val, blue_val);
}

void rgbLedWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val) {
rgbLedWriteOrdered(pin, RGB_BUILTIN_LED_COLOR_ORDER, red_val, green_val, blue_val);
}
Expand Down
5 changes: 3 additions & 2 deletions cores/esp32/esp32-hal-rgb-led.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ void rgbLedWriteOrdered(uint8_t pin, rgb_led_color_order_t order, uint8_t red_va
// Will use RGB_BUILTIN_LED_COLOR_ORDER
void rgbLedWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val);

// Backward compatibility
#define neopixelWrite(p, r, g, b) rgbLedWrite(p, r, g, b)
// Backward compatibility - Deprecated. It will be removed in future releases.
[[deprecated("Use rgbLedWrite() instead.")]]
void neopixelWrite(uint8_t p, uint8_t r, uint8_t g, uint8_t b);

#ifdef __cplusplus
}
Expand Down
2 changes: 1 addition & 1 deletion cores/esp32/io_pin_remap.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ int8_t gpioNumberToDigitalPin(int8_t gpioNumber);
#define pinMatrixOutDetach(pin, invertOut, invertEnable) pinMatrixOutDetach(digitalPinToGPIONumber(pin), invertOut, invertEnable)

// cores/esp32/esp32-hal-rgb-led.h
#define neopixelWrite(pin, red_val, green_val, blue_val) neopixelWrite(digitalPinToGPIONumber(pin), red_val, green_val, blue_val)
#define rgbLedWrite(pin, red_val, green_val, blue_val) rgbLedWrite(digitalPinToGPIONumber(pin), red_val, green_val, blue_val)

// cores/esp32/esp32-hal-rmt.h
#define rmtInit(pin, channel_direction, memsize, frequency_Hz) rmtInit(digitalPinToGPIONumber(pin), channel_direction, memsize, frequency_Hz)
Expand Down
6 changes: 3 additions & 3 deletions docs/en/api/rmt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Example

To get started with RMT, you can try:

RMT Write Neo Pixel
*******************
RMT Write RGB LED
*****************

.. literalinclude:: ../../../libraries/ESP32/examples/RMT/RMTWriteNeoPixel/RMTWriteNeoPixel.ino
.. literalinclude:: ../../../libraries/ESP32/examples/RMT/RMTWrite_RGB_LED/RMTWrite_RGB_LED.ino
:language: arduino


Expand Down
10 changes: 5 additions & 5 deletions libraries/ESP32/examples/GPIO/BlinkRGB/BlinkRGB.ino
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Calling digitalWrite(RGB_BUILTIN, HIGH) will use hidden RGB driver.
RGBLedWrite demonstrates control of each channel:
void neopixelWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val)
void rgbLedWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val)
WARNING: After using digitalWrite to drive RGB LED it will be impossible to drive the same pin
with normal HIGH/LOW level
Expand All @@ -27,13 +27,13 @@ void loop() {
digitalWrite(RGB_BUILTIN, LOW); // Turn the RGB LED off
delay(1000);

neopixelWrite(RGB_BUILTIN, RGB_BRIGHTNESS, 0, 0); // Red
rgbLedWrite(RGB_BUILTIN, RGB_BRIGHTNESS, 0, 0); // Red
delay(1000);
neopixelWrite(RGB_BUILTIN, 0, RGB_BRIGHTNESS, 0); // Green
rgbLedWrite(RGB_BUILTIN, 0, RGB_BRIGHTNESS, 0); // Green
delay(1000);
neopixelWrite(RGB_BUILTIN, 0, 0, RGB_BRIGHTNESS); // Blue
rgbLedWrite(RGB_BUILTIN, 0, 0, RGB_BRIGHTNESS); // Blue
delay(1000);
neopixelWrite(RGB_BUILTIN, 0, 0, 0); // Off / black
rgbLedWrite(RGB_BUILTIN, 0, 0, 0); // Off / black
delay(1000);
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#else

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

bool installed = false;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 Espressif Systems (Shanghai) PTE LTD
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -20,17 +20,17 @@
*/

// The effect seen in (Espressif devkits) ESP32C6, ESP32H2, ESP32C3, ESP32S2 and ESP32S3 is like a Blink of RGB LED
#ifdef PIN_NEOPIXEL
#define BUILTIN_RGBLED_PIN PIN_NEOPIXEL
#ifdef PIN_LED_RGB
#define BUILTIN_RGBLED_PIN PIN_LED_RGB
#else
#define BUILTIN_RGBLED_PIN 21 // ESP32 has no builtin RGB LED (PIN_NEOPIXEL)
#define BUILTIN_RGBLED_PIN 21 // ESP32 has no builtin RGB LED (PIN_LED_RGB)
#endif

#define NR_OF_LEDS 8 * 4
#define NR_OF_ALL_BITS 24 * NR_OF_LEDS

//
// Note: This example uses Neopixel LED board, 32 LEDs chained one
// Note: This example uses a board with 32 WS2812b LEDs chained one
// after another, each RGB LED has its 24 bit value
// for color configuration (8b for each color)
//
Expand Down
20 changes: 10 additions & 10 deletions libraries/ESP32/examples/RMT/RMT_CPUFreq_Test/RMT_CPUFreq_Test.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* that RMT works on any CPU/APB Frequency.
*
* It uses an ESP32 Arduino builtin RGB NeoLED function based on RMT:
* void neopixelWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val)
* void rgbLedWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val)
*
* The output is a visual WS2812 RGB LED color change routine using each time a
* different CPU Frequency, just to illustrate how it works. Serial output indicates
Expand All @@ -26,10 +26,10 @@

// Default DevKit RGB LED GPIOs:
// The effect seen in (Espressif devkits) ESP32C6, ESP32H2, ESP32C3, ESP32S2 and ESP32S3 is like a Blink of RGB LED
#ifdef PIN_NEOPIXEL
#define MY_LED_GPIO PIN_NEOPIXEL
#ifdef PIN_RGB_LED
#define MY_LED_GPIO PIN_RGB_LED
#else
#define MY_LED_GPIO 21 // ESP32 has no builtin RGB LED (PIN_NEOPIXEL)
#define MY_LED_GPIO 21 // ESP32 has no builtin RGB LED (PIN_RGB_LED)
#endif

// Set the correct GPIO to any necessary by changing RGB_LED_GPIO value
Expand Down Expand Up @@ -65,22 +65,22 @@ void loop() {
Serial.updateBaudRate(115200);
Serial.printf("\n--changed CPU Frequency to %lu MHz\n", getCpuFrequencyMhz());

neopixelWrite(RGB_LED_GPIO, BRIGHTNESS, BRIGHTNESS, BRIGHTNESS); // White
rgbLedWrite(RGB_LED_GPIO, BRIGHTNESS, BRIGHTNESS, BRIGHTNESS); // White
Serial.println("White");
delay(1000);
neopixelWrite(RGB_LED_GPIO, 0, 0, 0); // Off
rgbLedWrite(RGB_LED_GPIO, 0, 0, 0); // Off
Serial.println("Off");
delay(1000);
neopixelWrite(RGB_LED_GPIO, BRIGHTNESS, 0, 0); // Red
rgbLedWrite(RGB_LED_GPIO, BRIGHTNESS, 0, 0); // Red
Serial.println("Red");
delay(1000);
neopixelWrite(RGB_LED_GPIO, 0, BRIGHTNESS, 0); // Green
rgbLedWrite(RGB_LED_GPIO, 0, BRIGHTNESS, 0); // Green
Serial.println("Green");
delay(1000);
neopixelWrite(RGB_LED_GPIO, 0, 0, BRIGHTNESS); // Blue
rgbLedWrite(RGB_LED_GPIO, 0, 0, BRIGHTNESS); // Blue
Serial.println("Blue");
delay(1000);
neopixelWrite(RGB_LED_GPIO, 0, 0, 0); // Off
rgbLedWrite(RGB_LED_GPIO, 0, 0, 0); // Off
Serial.println("Off");
delay(1000);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Currently, this example supports the following targets.
### Configure the Project

Set the LED GPIO by changing the `LED_PIN` definition. By default, the LED_PIN is `RGB_BUILTIN`.
By default, the `neoPixelWrite` function is used to control the LED. You can change it to digitalWrite to control a simple LED.
By default, the `rgbLedWrite` function is used to control the LED. You can change it to digitalWrite to control a simple LED.

#### Using Arduino IDE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static esp_err_t zb_attribute_handler(const esp_zb_zcl_set_attr_value_message_t
if (message->attribute.id == ESP_ZB_ZCL_ATTR_ON_OFF_ON_OFF_ID && message->attribute.data.type == ESP_ZB_ZCL_ATTR_TYPE_BOOL) {
light_state = message->attribute.data.value ? *(bool *)message->attribute.data.value : light_state;
log_i("Light sets to %s", light_state ? "On" : "Off");
neopixelWrite(LED_PIN, 255 * light_state, 255 * light_state, 255 * light_state); // Toggle light
rgbLedWrite(LED_PIN, 255 * light_state, 255 * light_state, 255 * light_state); // Toggle light
}
}
}
Expand All @@ -172,7 +172,7 @@ void setup() {
ESP_ERROR_CHECK(esp_zb_platform_config(&config));

// Init RMT and leave light OFF
neopixelWrite(LED_PIN, 0, 0, 0);
rgbLedWrite(LED_PIN, 0, 0, 0);

// Start Zigbee task
xTaskCreate(esp_zb_task, "Zigbee_main", 4096, NULL, 5, NULL);
Expand Down
18 changes: 9 additions & 9 deletions libraries/OpenThread/examples/COAP/coap_lamp/coap_lamp.ino
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ bool otDeviceSetup(const char **otSetupCmds, uint8_t nCmds1, const char **otCoap
}
if (i != nCmds1) {
log_e("Sorry, OpenThread Network setup failed!");
neopixelWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
return false;
}
Serial.println("OpenThread started.\r\nWaiting for activating correct Device Role.");
Expand All @@ -69,7 +69,7 @@ bool otDeviceSetup(const char **otSetupCmds, uint8_t nCmds1, const char **otCoap
Serial.println();
if (!tries) {
log_e("Sorry, Device Role failed by timeout! Current Role: %s.", otGetStringDeviceRole());
neopixelWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
return false;
}
Serial.printf("Device is %s.\r\n", otGetStringDeviceRole());
Expand All @@ -80,12 +80,12 @@ bool otDeviceSetup(const char **otSetupCmds, uint8_t nCmds1, const char **otCoap
}
if (i != nCmds2) {
log_e("Sorry, OpenThread CoAP setup failed!");
neopixelWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
return false;
}
Serial.println("OpenThread setup done. Node is ready.");
// all fine! LED goes Green
neopixelWrite(RGB_BUILTIN, 0, 64, 8); // GREEN ... Lamp is ready!
rgbLedWrite(RGB_BUILTIN, 0, 64, 8); // GREEN ... Lamp is ready!
return true;
}

Expand Down Expand Up @@ -118,16 +118,16 @@ void otCOAPListen() {
log_i("CoAP PUT [%s]\r\n", payload == '0' ? "OFF" : "ON");
if (payload == '0') {
for (int16_t c = 248; c > 16; c -= 8) {
neopixelWrite(RGB_BUILTIN, c, c, c); // ramp down
rgbLedWrite(RGB_BUILTIN, c, c, c); // ramp down
delay(5);
}
neopixelWrite(RGB_BUILTIN, 0, 0, 0); // Lamp Off
rgbLedWrite(RGB_BUILTIN, 0, 0, 0); // Lamp Off
} else {
for (int16_t c = 16; c < 248; c += 8) {
neopixelWrite(RGB_BUILTIN, c, c, c); // ramp up
rgbLedWrite(RGB_BUILTIN, c, c, c); // ramp up
delay(5);
}
neopixelWrite(RGB_BUILTIN, 255, 255, 255); // Lamp On
rgbLedWrite(RGB_BUILTIN, 255, 255, 255); // Lamp On
}
}
}
Expand All @@ -136,7 +136,7 @@ void otCOAPListen() {
void setup() {
Serial.begin(115200);
// LED starts RED, indicating not connected to Thread network.
neopixelWrite(RGB_BUILTIN, 64, 0, 0);
rgbLedWrite(RGB_BUILTIN, 64, 0, 0);
OThreadCLI.begin(false); // No AutoStart is necessary
OThreadCLI.setTimeout(250); // waits 250ms for the OpenThread CLI response
setupNode();
Expand Down
12 changes: 6 additions & 6 deletions libraries/OpenThread/examples/COAP/coap_switch/coap_switch.ino
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bool otDeviceSetup(
}
if (i != nCmds1) {
log_e("Sorry, OpenThread Network setup failed!");
neopixelWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
return false;
}
Serial.println("OpenThread started.\r\nWaiting for activating correct Device Role.");
Expand All @@ -63,7 +63,7 @@ bool otDeviceSetup(
Serial.println();
if (!tries) {
log_e("Sorry, Device Role failed by timeout! Current Role: %s.", otGetStringDeviceRole());
neopixelWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
return false;
}
Serial.printf("Device is %s.\r\n", otGetStringDeviceRole());
Expand All @@ -74,12 +74,12 @@ bool otDeviceSetup(
}
if (i != nCmds2) {
log_e("Sorry, OpenThread CoAP setup failed!");
neopixelWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
return false;
}
Serial.println("OpenThread setup done. Node is ready.");
// all fine! LED goes and stays Blue
neopixelWrite(RGB_BUILTIN, 0, 0, 64); // BLUE ... Swtich is ready!
rgbLedWrite(RGB_BUILTIN, 0, 0, 64); // BLUE ... Swtich is ready!
return true;
}

Expand Down Expand Up @@ -149,7 +149,7 @@ void checkUserButton() {
lastLampState = !lastLampState;
if (!otCoapPUT(lastLampState)) { // failed: Lamp Node is not responding due to be off or unreachable
// timeout from the CoAP PUT message... restart the node.
neopixelWrite(RGB_BUILTIN, 255, 0, 0); // RED ... something failed!
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... something failed!
Serial.println("Reseting the Node as Switch... wait.");
// start over...
setupNode();
Expand All @@ -161,7 +161,7 @@ void checkUserButton() {
void setup() {
Serial.begin(115200);
// LED starts RED, indicating not connected to Thread network.
neopixelWrite(RGB_BUILTIN, 64, 0, 0);
rgbLedWrite(RGB_BUILTIN, 64, 0, 0);
OThreadCLI.begin(false); // No AutoStart is necessary
OThreadCLI.setTimeout(250); // waits 250ms for the OpenThread CLI response
setupNode();
Expand Down
6 changes: 3 additions & 3 deletions variants/Bee_Data_Logger/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ static const uint8_t LDO2 = 34;
static const uint8_t RGB_DATA = 40;
static const uint8_t RGB_PWR = 34;

#define PIN_NEOPIXEL RGB_DATA
#define PIN_RGB_LED RGB_DATA
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_NEOPIXEL;
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_RGB_LED;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite()
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite()
#define RGB_BUILTIN LED_BUILTIN
#define RGB_BRIGHTNESS 64

Expand Down
6 changes: 3 additions & 3 deletions variants/Bee_Motion_S3/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ static const uint8_t LDO2 = 34;
static const uint8_t RGB_DATA = 40;
static const uint8_t RGB_PWR = 34;

#define PIN_NEOPIXEL RGB_DATA
#define PIN_RGB_LED RGB_DATA
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_NEOPIXEL;
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_RGB_LED;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite()
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite()
#define RGB_BUILTIN LED_BUILTIN
#define RGB_BRIGHTNESS 64

Expand Down
6 changes: 3 additions & 3 deletions variants/Bee_S3/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ static const uint8_t VBAT_VOLTAGE = 1;
static const uint8_t RGB_DATA = 48;
static const uint8_t RGB_PWR = 34;

#define PIN_NEOPIXEL RGB_DATA
#define PIN_RGB_LED RGB_DATA
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_NEOPIXEL;
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_RGB_LED;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite()
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite
#define RGB_BUILTIN LED_BUILTIN
#define RGB_BRIGHTNESS 64

Expand Down
2 changes: 1 addition & 1 deletion variants/adafruit_camera_esp32s3/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static const uint8_t NEOPIXEL_PIN = 1;
static const uint8_t LED_BUILTIN = PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() and digitalWrite() for blinking
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite() and digitalWrite() for blinking
#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT)
#define RGB_BRIGHTNESS 64

Expand Down
2 changes: 1 addition & 1 deletion variants/adafruit_feather_esp32_v2/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static const uint8_t LED_BUILTIN = 13;

// Neopixel
#define PIN_NEOPIXEL 0
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() and digitalWrite() for blinking
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite() and digitalWrite() for blinking
#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT)
#define RGB_BRIGHTNESS 64

Expand Down
2 changes: 1 addition & 1 deletion variants/adafruit_feather_esp32c6/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
static const uint8_t LED_BUILTIN = 15;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite()
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite()
#define RGB_BUILTIN (SOC_GPIO_PIN_COUNT + PIN_NEOPIXEL)
#define RGB_BRIGHTNESS 64

Expand Down
2 changes: 1 addition & 1 deletion variants/adafruit_feather_esp32s2/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

// Neopixel
#define PIN_NEOPIXEL 33
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() and digitalWrite() for blinking
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite() and digitalWrite() for blinking
#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT)
#define RGB_BRIGHTNESS 64

Expand Down
Loading

0 comments on commit 99e68a0

Please sign in to comment.