From 99e68a0518f454d0a9769d1da4f95900700228b2 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Wed, 28 Aug 2024 03:53:24 -0300 Subject: [PATCH] Change "neopixel" references to use RGB LED naming (#10225) * 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 <32426024+lucasssvaz@users.noreply.github.com> * 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 <32426024+lucasssvaz@users.noreply.github.com> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> --- cores/esp32/esp32-hal-gpio.c | 2 +- cores/esp32/esp32-hal-rgb-led.c | 6 ++++++ cores/esp32/esp32-hal-rgb-led.h | 5 +++-- cores/esp32/io_pin_remap.h | 2 +- docs/en/api/rmt.rst | 6 +++--- .../ESP32/examples/GPIO/BlinkRGB/BlinkRGB.ino | 10 +++++----- .../Legacy_RMT_Driver_Compatible.ino | 2 +- .../RMTWrite_RGB_LED.ino} | 10 +++++----- .../RMT/RMT_CPUFreq_Test/RMT_CPUFreq_Test.ino | 20 +++++++++---------- .../Zigbee/Zigbee_Light_Bulb/README.md | 2 +- .../Zigbee_Light_Bulb/Zigbee_Light_Bulb.ino | 4 ++-- .../examples/COAP/coap_lamp/coap_lamp.ino | 18 ++++++++--------- .../examples/COAP/coap_switch/coap_switch.ino | 12 +++++------ variants/Bee_Data_Logger/pins_arduino.h | 6 +++--- variants/Bee_Motion_S3/pins_arduino.h | 6 +++--- variants/Bee_S3/pins_arduino.h | 6 +++--- .../adafruit_camera_esp32s3/pins_arduino.h | 2 +- .../adafruit_feather_esp32_v2/pins_arduino.h | 2 +- .../adafruit_feather_esp32c6/pins_arduino.h | 2 +- .../adafruit_feather_esp32s2/pins_arduino.h | 2 +- .../pins_arduino.h | 2 +- .../pins_arduino.h | 2 +- .../adafruit_feather_esp32s3/pins_arduino.h | 2 +- .../pins_arduino.h | 2 +- .../pins_arduino.h | 2 +- .../pins_arduino.h | 2 +- .../adafruit_itsybitsy_esp32/pins_arduino.h | 2 +- .../adafruit_magtag29_esp32s2/pins_arduino.h | 2 +- .../pins_arduino.h | 2 +- .../adafruit_metro_esp32s2/pins_arduino.h | 2 +- .../adafruit_metro_esp32s3/pins_arduino.h | 2 +- variants/adafruit_qtpy_esp32/pins_arduino.h | 2 +- variants/adafruit_qtpy_esp32c3/pins_arduino.h | 2 +- variants/adafruit_qtpy_esp32s2/pins_arduino.h | 2 +- .../adafruit_qtpy_esp32s3_n4r2/pins_arduino.h | 2 +- .../pins_arduino.h | 2 +- variants/atmegazero_esp32s2/pins_arduino.h | 6 +++--- variants/bpi-bit/pins_arduino.h | 4 ++-- variants/bpi_leaf_s3/pins_arduino.h | 6 +++--- variants/circuitart_zero_s3/pins_arduino.h | 10 +++++----- .../pins_arduino.h | 2 +- .../pins_arduino.h | 14 ++++++------- .../variant.cpp | 6 +++--- variants/esp32c3/pins_arduino.h | 6 +++--- variants/esp32c6/pins_arduino.h | 6 +++--- variants/esp32h2-devkit-lipo/pins_arduino.h | 6 +++--- variants/esp32h2/pins_arduino.h | 6 +++--- .../esp32s2-devkit-lipo-usb/pins_arduino.h | 4 ++-- variants/esp32s2-devkit-lipo/pins_arduino.h | 4 ++-- variants/esp32s2/pins_arduino.h | 8 ++++---- variants/esp32s3/pins_arduino.h | 6 +++--- variants/esp32thing_plus_c/pins_arduino.h | 2 +- .../franzininho_wifi_esp32s2/pins_arduino.h | 6 +++--- .../pins_arduino.h | 6 +++--- variants/gpy/pins_arduino.h | 8 ++++---- variants/lopy/pins_arduino.h | 8 ++++---- variants/lopy4/pins_arduino.h | 8 ++++---- variants/micro_s2/pins_arduino.h | 2 +- variants/sensebox_mcu_esp32s2/pins_arduino.h | 6 +++--- variants/sensebox_mcu_esp32s2/variant.cpp | 4 ++-- .../pins_arduino.h | 4 ++-- .../pins_arduino.h | 6 +++--- .../pins_arduino.h | 6 +++--- variants/uPesy_esp32s3_basic/pins_arduino.h | 2 +- variants/um_bling/pins_arduino.h | 2 +- variants/um_feathers2neo/pins_arduino.h | 2 +- variants/um_feathers3/pins_arduino.h | 2 +- variants/um_feathers3neo/pins_arduino.h | 2 +- variants/um_nanos3/pins_arduino.h | 2 +- variants/um_pros3/pins_arduino.h | 2 +- variants/um_tinyc6/pins_arduino.h | 2 +- variants/um_tinys2/pins_arduino.h | 2 +- variants/um_tinys3/pins_arduino.h | 2 +- variants/wipy3/pins_arduino.h | 8 ++++---- 74 files changed, 176 insertions(+), 169 deletions(-) rename libraries/ESP32/examples/RMT/{RMTWriteNeoPixel/RMTWriteNeoPixel.ino => RMTWrite_RGB_LED/RMTWrite_RGB_LED.ino} (93%) diff --git a/cores/esp32/esp32-hal-gpio.c b/cores/esp32/esp32-hal-gpio.c index 98dc26599..b11636daf 100644 --- a/cores/esp32/esp32-hal-gpio.c +++ b/cores/esp32/esp32-hal-gpio.c @@ -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 diff --git a/cores/esp32/esp32-hal-rgb-led.c b/cores/esp32/esp32-hal-rgb-led.c index 5afec10f8..d47dde536 100644 --- a/cores/esp32/esp32-hal-rgb-led.c +++ b/cores/esp32/esp32-hal-rgb-led.c @@ -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); } diff --git a/cores/esp32/esp32-hal-rgb-led.h b/cores/esp32/esp32-hal-rgb-led.h index 84e5498ab..b151732e5 100644 --- a/cores/esp32/esp32-hal-rgb-led.h +++ b/cores/esp32/esp32-hal-rgb-led.h @@ -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 } diff --git a/cores/esp32/io_pin_remap.h b/cores/esp32/io_pin_remap.h index 4e422632e..73789a585 100644 --- a/cores/esp32/io_pin_remap.h +++ b/cores/esp32/io_pin_remap.h @@ -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) diff --git a/docs/en/api/rmt.rst b/docs/en/api/rmt.rst index 0a3485927..6f87054a9 100644 --- a/docs/en/api/rmt.rst +++ b/docs/en/api/rmt.rst @@ -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 diff --git a/libraries/ESP32/examples/GPIO/BlinkRGB/BlinkRGB.ino b/libraries/ESP32/examples/GPIO/BlinkRGB/BlinkRGB.ino index fa4e75960..9544ce7cc 100644 --- a/libraries/ESP32/examples/GPIO/BlinkRGB/BlinkRGB.ino +++ b/libraries/ESP32/examples/GPIO/BlinkRGB/BlinkRGB.ino @@ -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 @@ -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 } diff --git a/libraries/ESP32/examples/RMT/Legacy_RMT_Driver_Compatible/Legacy_RMT_Driver_Compatible.ino b/libraries/ESP32/examples/RMT/Legacy_RMT_Driver_Compatible/Legacy_RMT_Driver_Compatible.ino index 74578f755..f00e1dce9 100644 --- a/libraries/ESP32/examples/RMT/Legacy_RMT_Driver_Compatible/Legacy_RMT_Driver_Compatible.ino +++ b/libraries/ESP32/examples/RMT/Legacy_RMT_Driver_Compatible/Legacy_RMT_Driver_Compatible.ino @@ -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; diff --git a/libraries/ESP32/examples/RMT/RMTWriteNeoPixel/RMTWriteNeoPixel.ino b/libraries/ESP32/examples/RMT/RMTWrite_RGB_LED/RMTWrite_RGB_LED.ino similarity index 93% rename from libraries/ESP32/examples/RMT/RMTWriteNeoPixel/RMTWriteNeoPixel.ino rename to libraries/ESP32/examples/RMT/RMTWrite_RGB_LED/RMTWrite_RGB_LED.ino index 0a8b8b826..74f0ac4f6 100644 --- a/libraries/ESP32/examples/RMT/RMTWriteNeoPixel/RMTWriteNeoPixel.ino +++ b/libraries/ESP32/examples/RMT/RMTWrite_RGB_LED/RMTWrite_RGB_LED.ino @@ -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. @@ -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) // diff --git a/libraries/ESP32/examples/RMT/RMT_CPUFreq_Test/RMT_CPUFreq_Test.ino b/libraries/ESP32/examples/RMT/RMT_CPUFreq_Test/RMT_CPUFreq_Test.ino index 93ab01828..900f0f064 100644 --- a/libraries/ESP32/examples/RMT/RMT_CPUFreq_Test/RMT_CPUFreq_Test.ino +++ b/libraries/ESP32/examples/RMT/RMT_CPUFreq_Test/RMT_CPUFreq_Test.ino @@ -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 @@ -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 @@ -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); } diff --git a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/README.md b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/README.md index cccc97aec..d3441c352 100644 --- a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/README.md +++ b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/README.md @@ -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 diff --git a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/Zigbee_Light_Bulb.ino b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/Zigbee_Light_Bulb.ino index 67b9123c9..b98b67cb4 100644 --- a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/Zigbee_Light_Bulb.ino +++ b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/Zigbee_Light_Bulb.ino @@ -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 } } } @@ -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); diff --git a/libraries/OpenThread/examples/COAP/coap_lamp/coap_lamp.ino b/libraries/OpenThread/examples/COAP/coap_lamp/coap_lamp.ino index 81d9b35e4..0e6504757 100644 --- a/libraries/OpenThread/examples/COAP/coap_lamp/coap_lamp.ino +++ b/libraries/OpenThread/examples/COAP/coap_lamp/coap_lamp.ino @@ -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."); @@ -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()); @@ -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; } @@ -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 } } } @@ -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(); diff --git a/libraries/OpenThread/examples/COAP/coap_switch/coap_switch.ino b/libraries/OpenThread/examples/COAP/coap_switch/coap_switch.ino index 37942dcf5..37e5baa67 100644 --- a/libraries/OpenThread/examples/COAP/coap_switch/coap_switch.ino +++ b/libraries/OpenThread/examples/COAP/coap_switch/coap_switch.ino @@ -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."); @@ -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()); @@ -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; } @@ -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(); @@ -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(); diff --git a/variants/Bee_Data_Logger/pins_arduino.h b/variants/Bee_Data_Logger/pins_arduino.h index 9924e2eb3..1114ff0bd 100644 --- a/variants/Bee_Data_Logger/pins_arduino.h +++ b/variants/Bee_Data_Logger/pins_arduino.h @@ -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 diff --git a/variants/Bee_Motion_S3/pins_arduino.h b/variants/Bee_Motion_S3/pins_arduino.h index a319f5ec1..45f73b56b 100644 --- a/variants/Bee_Motion_S3/pins_arduino.h +++ b/variants/Bee_Motion_S3/pins_arduino.h @@ -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 diff --git a/variants/Bee_S3/pins_arduino.h b/variants/Bee_S3/pins_arduino.h index b8bdd7f1d..9e76fff80 100644 --- a/variants/Bee_S3/pins_arduino.h +++ b/variants/Bee_S3/pins_arduino.h @@ -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 diff --git a/variants/adafruit_camera_esp32s3/pins_arduino.h b/variants/adafruit_camera_esp32s3/pins_arduino.h index 8560b44f4..447204f73 100644 --- a/variants/adafruit_camera_esp32s3/pins_arduino.h +++ b/variants/adafruit_camera_esp32s3/pins_arduino.h @@ -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 diff --git a/variants/adafruit_feather_esp32_v2/pins_arduino.h b/variants/adafruit_feather_esp32_v2/pins_arduino.h index 89bd844e3..f4af72aa9 100644 --- a/variants/adafruit_feather_esp32_v2/pins_arduino.h +++ b/variants/adafruit_feather_esp32_v2/pins_arduino.h @@ -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 diff --git a/variants/adafruit_feather_esp32c6/pins_arduino.h b/variants/adafruit_feather_esp32c6/pins_arduino.h index f8a7b1121..c4ae4bab3 100644 --- a/variants/adafruit_feather_esp32c6/pins_arduino.h +++ b/variants/adafruit_feather_esp32c6/pins_arduino.h @@ -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 diff --git a/variants/adafruit_feather_esp32s2/pins_arduino.h b/variants/adafruit_feather_esp32s2/pins_arduino.h index 2e04e95e6..72ab65a8d 100644 --- a/variants/adafruit_feather_esp32s2/pins_arduino.h +++ b/variants/adafruit_feather_esp32s2/pins_arduino.h @@ -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 diff --git a/variants/adafruit_feather_esp32s2_reversetft/pins_arduino.h b/variants/adafruit_feather_esp32s2_reversetft/pins_arduino.h index 22c9e9380..92902cc16 100644 --- a/variants/adafruit_feather_esp32s2_reversetft/pins_arduino.h +++ b/variants/adafruit_feather_esp32s2_reversetft/pins_arduino.h @@ -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 diff --git a/variants/adafruit_feather_esp32s2_tft/pins_arduino.h b/variants/adafruit_feather_esp32s2_tft/pins_arduino.h index 2717d441f..8c3059acb 100644 --- a/variants/adafruit_feather_esp32s2_tft/pins_arduino.h +++ b/variants/adafruit_feather_esp32s2_tft/pins_arduino.h @@ -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 diff --git a/variants/adafruit_feather_esp32s3/pins_arduino.h b/variants/adafruit_feather_esp32s3/pins_arduino.h index 679014b4d..991a57c9e 100644 --- a/variants/adafruit_feather_esp32s3/pins_arduino.h +++ b/variants/adafruit_feather_esp32s3/pins_arduino.h @@ -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 diff --git a/variants/adafruit_feather_esp32s3_nopsram/pins_arduino.h b/variants/adafruit_feather_esp32s3_nopsram/pins_arduino.h index 0fd8b1e91..34fe2ebae 100644 --- a/variants/adafruit_feather_esp32s3_nopsram/pins_arduino.h +++ b/variants/adafruit_feather_esp32s3_nopsram/pins_arduino.h @@ -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 diff --git a/variants/adafruit_feather_esp32s3_reversetft/pins_arduino.h b/variants/adafruit_feather_esp32s3_reversetft/pins_arduino.h index 4f76626a5..ea955ff54 100644 --- a/variants/adafruit_feather_esp32s3_reversetft/pins_arduino.h +++ b/variants/adafruit_feather_esp32s3_reversetft/pins_arduino.h @@ -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 diff --git a/variants/adafruit_feather_esp32s3_tft/pins_arduino.h b/variants/adafruit_feather_esp32s3_tft/pins_arduino.h index 25cc9f785..3e007c770 100644 --- a/variants/adafruit_feather_esp32s3_tft/pins_arduino.h +++ b/variants/adafruit_feather_esp32s3_tft/pins_arduino.h @@ -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 diff --git a/variants/adafruit_itsybitsy_esp32/pins_arduino.h b/variants/adafruit_itsybitsy_esp32/pins_arduino.h index bd7a09562..801dc15da 100644 --- a/variants/adafruit_itsybitsy_esp32/pins_arduino.h +++ b/variants/adafruit_itsybitsy_esp32/pins_arduino.h @@ -11,7 +11,7 @@ static const uint8_t LED_BUILTIN = 13; // Neopixel static const uint8_t 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 diff --git a/variants/adafruit_magtag29_esp32s2/pins_arduino.h b/variants/adafruit_magtag29_esp32s2/pins_arduino.h index 97977a0a6..197f2e4c1 100644 --- a/variants/adafruit_magtag29_esp32s2/pins_arduino.h +++ b/variants/adafruit_magtag29_esp32s2/pins_arduino.h @@ -16,7 +16,7 @@ // Neopixel #define PIN_NEOPIXEL 1 // D1 -// 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 diff --git a/variants/adafruit_matrixportal_esp32s3/pins_arduino.h b/variants/adafruit_matrixportal_esp32s3/pins_arduino.h index 9d5dd018b..9843c54c1 100644 --- a/variants/adafruit_matrixportal_esp32s3/pins_arduino.h +++ b/variants/adafruit_matrixportal_esp32s3/pins_arduino.h @@ -16,7 +16,7 @@ #define PIN_NEOPIXEL 4 #define NEOPIXEL_PIN 4 -// 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 diff --git a/variants/adafruit_metro_esp32s2/pins_arduino.h b/variants/adafruit_metro_esp32s2/pins_arduino.h index 89235f5ab..cef937d36 100644 --- a/variants/adafruit_metro_esp32s2/pins_arduino.h +++ b/variants/adafruit_metro_esp32s2/pins_arduino.h @@ -15,7 +15,7 @@ // Neopixel #define PIN_NEOPIXEL 45 -// 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 diff --git a/variants/adafruit_metro_esp32s3/pins_arduino.h b/variants/adafruit_metro_esp32s3/pins_arduino.h index 80beb123e..9e2cff7e6 100644 --- a/variants/adafruit_metro_esp32s3/pins_arduino.h +++ b/variants/adafruit_metro_esp32s3/pins_arduino.h @@ -15,7 +15,7 @@ // Neopixel #define PIN_NEOPIXEL 46 -// 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 diff --git a/variants/adafruit_qtpy_esp32/pins_arduino.h b/variants/adafruit_qtpy_esp32/pins_arduino.h index 6080527cd..b422377d9 100644 --- a/variants/adafruit_qtpy_esp32/pins_arduino.h +++ b/variants/adafruit_qtpy_esp32/pins_arduino.h @@ -11,7 +11,7 @@ static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_NEOPIXEL; #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 diff --git a/variants/adafruit_qtpy_esp32c3/pins_arduino.h b/variants/adafruit_qtpy_esp32c3/pins_arduino.h index 71affaad7..92d2591a8 100644 --- a/variants/adafruit_qtpy_esp32c3/pins_arduino.h +++ b/variants/adafruit_qtpy_esp32c3/pins_arduino.h @@ -13,7 +13,7 @@ static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_NEOPIXEL; #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 diff --git a/variants/adafruit_qtpy_esp32s2/pins_arduino.h b/variants/adafruit_qtpy_esp32s2/pins_arduino.h index 9eb04c704..3baf0808d 100644 --- a/variants/adafruit_qtpy_esp32s2/pins_arduino.h +++ b/variants/adafruit_qtpy_esp32s2/pins_arduino.h @@ -15,7 +15,7 @@ static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_NEOPIXEL; #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 diff --git a/variants/adafruit_qtpy_esp32s3_n4r2/pins_arduino.h b/variants/adafruit_qtpy_esp32s3_n4r2/pins_arduino.h index dc68c1f69..1202ad1ca 100644 --- a/variants/adafruit_qtpy_esp32s3_n4r2/pins_arduino.h +++ b/variants/adafruit_qtpy_esp32s3_n4r2/pins_arduino.h @@ -18,7 +18,7 @@ static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_NEOPIXEL; #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 diff --git a/variants/adafruit_qtpy_esp32s3_nopsram/pins_arduino.h b/variants/adafruit_qtpy_esp32s3_nopsram/pins_arduino.h index 2c42f8c8d..55b4f4355 100644 --- a/variants/adafruit_qtpy_esp32s3_nopsram/pins_arduino.h +++ b/variants/adafruit_qtpy_esp32s3_nopsram/pins_arduino.h @@ -18,7 +18,7 @@ static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_NEOPIXEL; #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 diff --git a/variants/atmegazero_esp32s2/pins_arduino.h b/variants/atmegazero_esp32s2/pins_arduino.h index c28126dd3..dda442c20 100644 --- a/variants/atmegazero_esp32s2/pins_arduino.h +++ b/variants/atmegazero_esp32s2/pins_arduino.h @@ -10,12 +10,12 @@ #define USB_PRODUCT "ATMZ-ESP32S2" #define USB_SERIAL "" -static const uint8_t NEOPIXEL = 40; +static const uint8_t RGB_LED_PIN = 40; // BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino -static const uint8_t LED_BUILTIN = (NEOPIXEL + SOC_GPIO_PIN_COUNT); +static const uint8_t LED_BUILTIN = (RGB_LED_PIN + 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() +// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite() #define RGB_BUILTIN LED_BUILTIN #define RGB_BRIGHTNESS 64 diff --git a/variants/bpi-bit/pins_arduino.h b/variants/bpi-bit/pins_arduino.h index b6247c12a..42a820a0b 100644 --- a/variants/bpi-bit/pins_arduino.h +++ b/variants/bpi-bit/pins_arduino.h @@ -9,13 +9,13 @@ static const uint8_t BUZZER = 25; static const uint8_t BUTTON_A = 35; static const uint8_t BUTTON_B = 27; -// NeoPixel Matrix 5 x 5 +// RGB LED Matrix 5 x 5 static const uint8_t RGB_LED = 4; // BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino #define LED_BUILTIN (RGB_LED + SOC_GPIO_PIN_COUNT) // Just a single LED in the Matrix #define BUILTIN_LED LED_BUILTIN // backward compatibility -// 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 static const uint8_t LIGHT_SENSOR1 = 36; diff --git a/variants/bpi_leaf_s3/pins_arduino.h b/variants/bpi_leaf_s3/pins_arduino.h index 68083e2e1..3a22a46bf 100644 --- a/variants/bpi_leaf_s3/pins_arduino.h +++ b/variants/bpi_leaf_s3/pins_arduino.h @@ -13,12 +13,12 @@ // Some boards have too low voltage on this pin (board design bug) // Use different pin with 3V and connect with 48 // and change this setup for the chosen pin (for example 38) -#define PIN_NEOPIXEL 48 +#define PIN_RGB_LED 48 // 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 25 diff --git a/variants/circuitart_zero_s3/pins_arduino.h b/variants/circuitart_zero_s3/pins_arduino.h index 6de73a7ae..930a081e0 100644 --- a/variants/circuitart_zero_s3/pins_arduino.h +++ b/variants/circuitart_zero_s3/pins_arduino.h @@ -13,12 +13,12 @@ #define LED_BUILTIN 46 #define BUILTIN_LED LED_BUILTIN // backward compatibility -// Neopixel -#define PIN_NEOPIXEL 47 -// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() and digitalWrite() for blinking -#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT) +// RGB LED +#define PIN_RGB_LED 47 +// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite() and digitalWrite() for blinking +#define RGB_BUILTIN (PIN_RGB_LED + SOC_GPIO_PIN_COUNT) #define RGB_BRIGHTNESS 64 -#define NEOPIXEL_NUM 1 // number of neopixels +#define RGBLED_NUM 1 // number of RGB LEDs static const uint8_t KEY_BUILTIN = 0; diff --git a/variants/cytron_maker_feather_aiot_s3/pins_arduino.h b/variants/cytron_maker_feather_aiot_s3/pins_arduino.h index 9f27ff8ec..9f7475294 100644 --- a/variants/cytron_maker_feather_aiot_s3/pins_arduino.h +++ b/variants/cytron_maker_feather_aiot_s3/pins_arduino.h @@ -19,7 +19,7 @@ static const uint8_t RGB_BUILTIN = SOC_GPIO_PIN_COUNT + 46; // RGB LED. #define LED LED_BUILTIN #define RGB RGB_BUILTIN -#define NEOPIXEL RGB_BUILTIN +#define RGB_LED_PIN RGB_BUILTIN #define RGB_BRIGHTNESS 65 #define VP_EN 11 // V Peripheral Enable. diff --git a/variants/department_of_alchemy_minimain_esp32s2/pins_arduino.h b/variants/department_of_alchemy_minimain_esp32s2/pins_arduino.h index c7ce982ff..7f053b3f6 100644 --- a/variants/department_of_alchemy_minimain_esp32s2/pins_arduino.h +++ b/variants/department_of_alchemy_minimain_esp32s2/pins_arduino.h @@ -14,15 +14,15 @@ #define LED_BUILTIN 13 #define BUILTIN_LED LED_BUILTIN // backward compatibility -// Neopixel -#define PIN_NEOPIXEL 33 -// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() and digitalWrite() for blinking -#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT) +// RGB LED +#define PIN_RGB_LED 33 +// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWritee() for blinking +#define RGB_BUILTIN (PIN_RGB_LED + SOC_GPIO_PIN_COUNT) #define RGB_BRIGHTNESS 64 -#define NEOPIXEL_NUM 1 // number of neopixels -#define NEOPIXEL_POWER 21 // power pin -#define NEOPIXEL_POWER_ON HIGH // power pin state when on +#define RGBLED_NUM 1 // number of RGB LEDs +#define RGBLED_POWER 21 // power pin +#define RGBLED_POWER_ON HIGH // power pin state when on #define PIN_SERVO 2 // servo pin #define PIN_ISOLATED_INPUT 40 // optocoupled input diff --git a/variants/department_of_alchemy_minimain_esp32s2/variant.cpp b/variants/department_of_alchemy_minimain_esp32s2/variant.cpp index 7809ec26f..ee4eaa8df 100644 --- a/variants/department_of_alchemy_minimain_esp32s2/variant.cpp +++ b/variants/department_of_alchemy_minimain_esp32s2/variant.cpp @@ -30,8 +30,8 @@ extern "C" { // Initialize variant/board, called before setup() void initVariant(void) { // This board has a power control pin, and we must set it to output and high - // in order to enable the NeoPixels. - pinMode(NEOPIXEL_POWER, OUTPUT); - digitalWrite(NEOPIXEL_POWER, HIGH); + // in order to enable the RGB LEDs. + pinMode(RGBLED_POWER, OUTPUT); + digitalWrite(RGBLED_POWER, HIGH); } } diff --git a/variants/esp32c3/pins_arduino.h b/variants/esp32c3/pins_arduino.h index 9ad210295..179ce636e 100644 --- a/variants/esp32c3/pins_arduino.h +++ b/variants/esp32c3/pins_arduino.h @@ -4,12 +4,12 @@ #include #include "soc/soc_caps.h" -#define PIN_NEOPIXEL 8 +#define PIN_RGB_LED 8 // 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 diff --git a/variants/esp32c6/pins_arduino.h b/variants/esp32c6/pins_arduino.h index 705c2b4d9..55afea915 100644 --- a/variants/esp32c6/pins_arduino.h +++ b/variants/esp32c6/pins_arduino.h @@ -4,12 +4,12 @@ #include #include "soc/soc_caps.h" -#define PIN_NEOPIXEL 8 +#define PIN_RGB_LED 8 // 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 diff --git a/variants/esp32h2-devkit-lipo/pins_arduino.h b/variants/esp32h2-devkit-lipo/pins_arduino.h index 534b6d64f..bb15be3e8 100644 --- a/variants/esp32h2-devkit-lipo/pins_arduino.h +++ b/variants/esp32h2-devkit-lipo/pins_arduino.h @@ -4,12 +4,12 @@ #include #include "soc/soc_caps.h" -#define PIN_NEOPIXEL 8 +#define PIN_RGB_LED 8 // 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 diff --git a/variants/esp32h2/pins_arduino.h b/variants/esp32h2/pins_arduino.h index 99a6b1152..108d87469 100644 --- a/variants/esp32h2/pins_arduino.h +++ b/variants/esp32h2/pins_arduino.h @@ -4,12 +4,12 @@ #include #include "soc/soc_caps.h" -#define PIN_NEOPIXEL 8 +#define PIN_RGB_LED 8 // 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 diff --git a/variants/esp32s2-devkit-lipo-usb/pins_arduino.h b/variants/esp32s2-devkit-lipo-usb/pins_arduino.h index 3d5f92aa4..6dba09dbe 100644 --- a/variants/esp32s2-devkit-lipo-usb/pins_arduino.h +++ b/variants/esp32s2-devkit-lipo-usb/pins_arduino.h @@ -4,8 +4,8 @@ #include #include "soc/soc_caps.h" -#define PIN_NEOPIXEL 18 -#define RGB_BUILTIN PIN_NEOPIXEL +#define PIN_RGB_LED 18 +#define RGB_BUILTIN PIN_RGB_LED #define RGB_BRIGHTNESS 64 static const uint8_t BUT_BUILTIN = 0; diff --git a/variants/esp32s2-devkit-lipo/pins_arduino.h b/variants/esp32s2-devkit-lipo/pins_arduino.h index 04c89f4d5..98116754f 100644 --- a/variants/esp32s2-devkit-lipo/pins_arduino.h +++ b/variants/esp32s2-devkit-lipo/pins_arduino.h @@ -4,8 +4,8 @@ #include #include "soc/soc_caps.h" -#define PIN_NEOPIXEL 18 -#define RGB_BUILTIN PIN_NEOPIXEL +#define PIN_RGB_LED 18 +#define RGB_BUILTIN PIN_RGB_LED #define RGB_BRIGHTNESS 64 static const uint8_t BUT_BUILTIN = 0; diff --git a/variants/esp32s2/pins_arduino.h b/variants/esp32s2/pins_arduino.h index 95ece4649..27391ef22 100644 --- a/variants/esp32s2/pins_arduino.h +++ b/variants/esp32s2/pins_arduino.h @@ -5,14 +5,14 @@ #include "soc/soc_caps.h" // GPIO pin for Saola-1 & DevKitM-1 = 18 -#define PIN_NEOPIXEL 18 +#define PIN_RGB_LED 18 // GPIO pin for Kaluga = 45 -//#define PIN_NEOPIXEL 45 +//#define PIN_RGB_LED 45 // 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 diff --git a/variants/esp32s3/pins_arduino.h b/variants/esp32s3/pins_arduino.h index de3a6f975..623d684e2 100644 --- a/variants/esp32s3/pins_arduino.h +++ b/variants/esp32s3/pins_arduino.h @@ -10,12 +10,12 @@ // Some boards have too low voltage on this pin (board design bug) // Use different pin with 3V and connect with 48 // and change this setup for the chosen pin (for example 38) -#define PIN_NEOPIXEL 48 +#define PIN_RGB_LED 48 // 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 diff --git a/variants/esp32thing_plus_c/pins_arduino.h b/variants/esp32thing_plus_c/pins_arduino.h index 6d154a402..ca7b6c65d 100644 --- a/variants/esp32thing_plus_c/pins_arduino.h +++ b/variants/esp32thing_plus_c/pins_arduino.h @@ -8,7 +8,7 @@ static const uint8_t LED_BUILTIN = 13; #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() static const uint8_t RGB_BUILTIN = SOC_GPIO_PIN_COUNT + 2; #define RGB_BUILTIN RGB_BUILTIN // necessary to make digitalWrite/digitalMode find it #define RGB_BRIGHTNESS 64 diff --git a/variants/franzininho_wifi_esp32s2/pins_arduino.h b/variants/franzininho_wifi_esp32s2/pins_arduino.h index 94d64aa18..b75fcc768 100644 --- a/variants/franzininho_wifi_esp32s2/pins_arduino.h +++ b/variants/franzininho_wifi_esp32s2/pins_arduino.h @@ -11,12 +11,12 @@ #define USB_SERIAL "0" #define USB_WEBUSB_ENABLED false -static const uint8_t PIN_NEOPIXEL = 18; +static const uint8_t PIN_RGB_LED = 18; // BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino -static const uint8_t LED_BUILTIN = (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT); +static const uint8_t LED_BUILTIN = (PIN_RGB_LED + 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() +// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite() #define RGB_BUILTIN LED_BUILTIN #define RGB_BRIGHTNESS 64 diff --git a/variants/franzininho_wifi_msc_esp32s2/pins_arduino.h b/variants/franzininho_wifi_msc_esp32s2/pins_arduino.h index 5e301876c..db213cb97 100644 --- a/variants/franzininho_wifi_msc_esp32s2/pins_arduino.h +++ b/variants/franzininho_wifi_msc_esp32s2/pins_arduino.h @@ -18,12 +18,12 @@ #define USB_FW_MSC_VOLUME_NAME "S2-Firmware" //max 11 chars #define USB_FW_MSC_SERIAL_NUMBER 0x00000000 -static const uint8_t PIN_NEOPIXEL = 18; +static const uint8_t PIN_RGB_LED = 18; // BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino -static const uint8_t LED_BUILTIN = (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT); +static const uint8_t LED_BUILTIN = (PIN_RGB_LED + 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() +// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite() #define RGB_BUILTIN LED_BUILTIN #define RGB_BRIGHTNESS 64 diff --git a/variants/gpy/pins_arduino.h b/variants/gpy/pins_arduino.h index 02ee758e1..93d3e5bfa 100644 --- a/variants/gpy/pins_arduino.h +++ b/variants/gpy/pins_arduino.h @@ -15,12 +15,12 @@ #define LTE_WAKE 27 // GPIO27 - Sequans modem wake-up interrupt #define LTE_BAUD 921600 -// Neopixel -#define PIN_NEOPIXEL 0 // ->2812 RGB !!! -static const uint8_t LED_BUILTIN = PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT; +// RGB LED +#define PIN_RGB_LED 0 // ->2812 RGB !!! +static const uint8_t LED_BUILTIN = PIN_RGB_LED + 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() +// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite() #define RGB_BUILTIN LED_BUILTIN #define RGB_BRIGHTNESS 64 diff --git a/variants/lopy/pins_arduino.h b/variants/lopy/pins_arduino.h index a648c529c..f7e2ee024 100644 --- a/variants/lopy/pins_arduino.h +++ b/variants/lopy/pins_arduino.h @@ -15,12 +15,12 @@ #define LORA_IO1 LORA_IRQ // tied by diode to IO0 #define LORA_IO2 LORA_IRQ // tied by diode to IO0 -// Neopixel -#define PIN_NEOPIXEL 0 // ->2812 RGB !!! -static const uint8_t LED_BUILTIN = PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT; +// RGB LED +#define PIN_RGB_LED 0 // ->2812 RGB !!! +static const uint8_t LED_BUILTIN = PIN_RGB_LED + 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() +// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite() #define RGB_BUILTIN LED_BUILTIN #define RGB_BRIGHTNESS 64 diff --git a/variants/lopy4/pins_arduino.h b/variants/lopy4/pins_arduino.h index 4ac91267e..eb36b3008 100644 --- a/variants/lopy4/pins_arduino.h +++ b/variants/lopy4/pins_arduino.h @@ -15,12 +15,12 @@ #define LORA_IO2 LORA_IRQ // tied by diode to IO0 #define LORA_RST NOT_A_PIN -// Neopixel -#define PIN_NEOPIXEL 0 // ->2812 RGB !!! -static const uint8_t LED_BUILTIN = PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT; +// RGB LED +#define PIN_RGB_LED 0 // ->2812 RGB !!! +static const uint8_t LED_BUILTIN = PIN_RGB_LED + 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() +// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite() #define RGB_BUILTIN LED_BUILTIN #define RGB_BRIGHTNESS 64 diff --git a/variants/micro_s2/pins_arduino.h b/variants/micro_s2/pins_arduino.h index 5b3d39649..422799478 100644 --- a/variants/micro_s2/pins_arduino.h +++ b/variants/micro_s2/pins_arduino.h @@ -66,7 +66,7 @@ static const uint8_t LED_BUILTIN = 21; #define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN static const uint8_t PIXEL_BUILTIN = 33; -// 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 (PIXEL_BUILTIN + SOC_GPIO_PIN_COUNT) #define RGB_BRIGHTNESS 64 diff --git a/variants/sensebox_mcu_esp32s2/pins_arduino.h b/variants/sensebox_mcu_esp32s2/pins_arduino.h index c3d037849..62acb6a13 100644 --- a/variants/sensebox_mcu_esp32s2/pins_arduino.h +++ b/variants/sensebox_mcu_esp32s2/pins_arduino.h @@ -16,9 +16,9 @@ #define USB_FW_MSC_VOLUME_NAME "senseBox" // max 11 chars #define USB_FW_MSC_SERIAL_NUMBER 0x00000000 -#define PIN_NEOPIXEL 1 // NeoPixel LED -#define NEOPIXEL_PIN 1 // NeoPixel LED -#define NEOPIXEL_NUM 1 // number of neopixels +#define PIN_RGB_LED 1 // RGB LED +#define RGBLED_PIN 1 // RGB LED +#define RGBLED_NUM 1 // number of RGB LEDs // Default I2C QWIIC-Ports static const uint8_t SDA = 39; diff --git a/variants/sensebox_mcu_esp32s2/variant.cpp b/variants/sensebox_mcu_esp32s2/variant.cpp index 59e187b2a..0c58ef2cb 100644 --- a/variants/sensebox_mcu_esp32s2/variant.cpp +++ b/variants/sensebox_mcu_esp32s2/variant.cpp @@ -34,8 +34,8 @@ void initVariant(void) { digitalWrite(IO_ENABLE, LOW); //reset RGB - pinMode(PIN_NEOPIXEL, OUTPUT); - digitalWrite(PIN_NEOPIXEL, LOW); + pinMode(PIN_RGB_LED, OUTPUT); + digitalWrite(PIN_RGB_LED, LOW); //enable XBEE by default pinMode(PIN_XB1_ENABLE, OUTPUT); diff --git a/variants/sparkfun_esp32_iot_redboard/pins_arduino.h b/variants/sparkfun_esp32_iot_redboard/pins_arduino.h index 3c84fa89d..f6226fdf2 100644 --- a/variants/sparkfun_esp32_iot_redboard/pins_arduino.h +++ b/variants/sparkfun_esp32_iot_redboard/pins_arduino.h @@ -8,8 +8,8 @@ static const uint8_t LED_BUILTIN = 18; #define BUILTIN_LED LED_BUILTIN // backward compatibility #define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN -#define NEO_PIXEL 2 //WS2812 LED -static const uint8_t RGB_BUILTIN = (SOC_GPIO_PIN_COUNT + NEO_PIXEL); +#define RGB_LED_PIN 2 //WS2812 LED +static const uint8_t RGB_BUILTIN = (SOC_GPIO_PIN_COUNT + RGB_LED_PIN); #define RGB_BUILTIN RGB_BUILTIN // necessary to make digitalWrite/digitalMode find it #define RGB_BRIGHTNESS 64 diff --git a/variants/sparkfun_esp32c6_thing_plus/pins_arduino.h b/variants/sparkfun_esp32c6_thing_plus/pins_arduino.h index 53724f067..61c939a32 100644 --- a/variants/sparkfun_esp32c6_thing_plus/pins_arduino.h +++ b/variants/sparkfun_esp32c6_thing_plus/pins_arduino.h @@ -4,12 +4,12 @@ #include #include "soc/soc_caps.h" -#define PIN_NEOPIXEL 23 +#define PIN_RGB_LED 23 // 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 diff --git a/variants/thingpulse_epulse_feather_c6/pins_arduino.h b/variants/thingpulse_epulse_feather_c6/pins_arduino.h index 705c2b4d9..55afea915 100644 --- a/variants/thingpulse_epulse_feather_c6/pins_arduino.h +++ b/variants/thingpulse_epulse_feather_c6/pins_arduino.h @@ -4,12 +4,12 @@ #include #include "soc/soc_caps.h" -#define PIN_NEOPIXEL 8 +#define PIN_RGB_LED 8 // 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 diff --git a/variants/uPesy_esp32s3_basic/pins_arduino.h b/variants/uPesy_esp32s3_basic/pins_arduino.h index f25664442..85d9c2ccb 100644 --- a/variants/uPesy_esp32s3_basic/pins_arduino.h +++ b/variants/uPesy_esp32s3_basic/pins_arduino.h @@ -11,7 +11,7 @@ #define USB_SERIAL "" static const uint8_t RGB_DATA = 38; -// 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 (RGB_DATA + SOC_GPIO_PIN_COUNT) #define RGB_BRIGHTNESS 64 diff --git a/variants/um_bling/pins_arduino.h b/variants/um_bling/pins_arduino.h index bd5b4a07b..590eec5ef 100644 --- a/variants/um_bling/pins_arduino.h +++ b/variants/um_bling/pins_arduino.h @@ -67,7 +67,7 @@ static const uint8_t I2S_AMP_WS = 1; static const uint8_t RTC_INT = 7; static const uint8_t RGB_DATA = 18; -// 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 (RGB_DATA + SOC_GPIO_PIN_COUNT) #define RGB_BRIGHTNESS 64 // BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino diff --git a/variants/um_feathers2neo/pins_arduino.h b/variants/um_feathers2neo/pins_arduino.h index ff3398de9..92c9cd1a0 100644 --- a/variants/um_feathers2neo/pins_arduino.h +++ b/variants/um_feathers2neo/pins_arduino.h @@ -54,7 +54,7 @@ static const uint8_t NEOPIXEL_MATRIX_DATA = 21; static const uint8_t NEOPIXEL_MATRIX_PWR = 4; static const uint8_t NEOPIXEL_DATA = 40; -// 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 (NEOPIXEL_DATA + SOC_GPIO_PIN_COUNT) #define RGB_BRIGHTNESS 64 // BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino diff --git a/variants/um_feathers3/pins_arduino.h b/variants/um_feathers3/pins_arduino.h index 4d68148ac..8de87c688 100644 --- a/variants/um_feathers3/pins_arduino.h +++ b/variants/um_feathers3/pins_arduino.h @@ -57,7 +57,7 @@ static const uint8_t VBUS_SENSE = 34; #define BUILTIN_LED LED_BUILTIN // backward compatibility static const uint8_t RGB_DATA = 40; -// 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 (RGB_DATA + SOC_GPIO_PIN_COUNT) #define RGB_BRIGHTNESS 64 diff --git a/variants/um_feathers3neo/pins_arduino.h b/variants/um_feathers3neo/pins_arduino.h index c0a1aae86..94d546d22 100644 --- a/variants/um_feathers3neo/pins_arduino.h +++ b/variants/um_feathers3neo/pins_arduino.h @@ -57,7 +57,7 @@ static const uint8_t VBUS_SENSE = 15; #define BUILTIN_LED LED_BUILTIN // backward compatibility static const uint8_t RGB_DATA = 40; -// 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 (RGB_DATA + SOC_GPIO_PIN_COUNT) #define RGB_BRIGHTNESS 64 diff --git a/variants/um_nanos3/pins_arduino.h b/variants/um_nanos3/pins_arduino.h index 0db14ebf7..66aef214c 100644 --- a/variants/um_nanos3/pins_arduino.h +++ b/variants/um_nanos3/pins_arduino.h @@ -44,7 +44,7 @@ static const uint8_t T8 = 8; static const uint8_t T9 = 9; static const uint8_t RGB_DATA = 41; -// 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 (RGB_DATA + SOC_GPIO_PIN_COUNT) #define RGB_BRIGHTNESS 64 // BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino diff --git a/variants/um_pros3/pins_arduino.h b/variants/um_pros3/pins_arduino.h index 7a8921bac..4b9bc8de6 100644 --- a/variants/um_pros3/pins_arduino.h +++ b/variants/um_pros3/pins_arduino.h @@ -55,7 +55,7 @@ static const uint8_t VBAT_SENSE = 10; static const uint8_t VBUS_SENSE = 33; static const uint8_t RGB_DATA = 18; -// 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 (RGB_DATA + SOC_GPIO_PIN_COUNT) #define RGB_BRIGHTNESS 64 // BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino diff --git a/variants/um_tinyc6/pins_arduino.h b/variants/um_tinyc6/pins_arduino.h index 1afb1d5cc..6505e1ed5 100644 --- a/variants/um_tinyc6/pins_arduino.h +++ b/variants/um_tinyc6/pins_arduino.h @@ -47,7 +47,7 @@ static const uint8_t VBAT_SENSE = 4; static const uint8_t VBUS_SENSE = 10; static const uint8_t RGB_DATA = 23; -// 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 (RGB_DATA + SOC_GPIO_PIN_COUNT) #define RGB_BRIGHTNESS 64 // BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino diff --git a/variants/um_tinys2/pins_arduino.h b/variants/um_tinys2/pins_arduino.h index 1a725f586..2a6e03aa0 100644 --- a/variants/um_tinys2/pins_arduino.h +++ b/variants/um_tinys2/pins_arduino.h @@ -66,7 +66,7 @@ static const uint8_t VBAT_SENSE = 3; static const uint8_t VBUS_SENSE = 21; static const uint8_t RGB_DATA = 1; -// 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 (RGB_DATA + SOC_GPIO_PIN_COUNT) #define RGB_BRIGHTNESS 64 // BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino diff --git a/variants/um_tinys3/pins_arduino.h b/variants/um_tinys3/pins_arduino.h index 7168669ca..24742781d 100644 --- a/variants/um_tinys3/pins_arduino.h +++ b/variants/um_tinys3/pins_arduino.h @@ -47,7 +47,7 @@ static const uint8_t VBAT_SENSE = 10; static const uint8_t VBUS_SENSE = 33; static const uint8_t RGB_DATA = 18; -// 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 (RGB_DATA + SOC_GPIO_PIN_COUNT) #define RGB_BRIGHTNESS 64 // BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino diff --git a/variants/wipy3/pins_arduino.h b/variants/wipy3/pins_arduino.h index 54e565d86..a9fda1eca 100644 --- a/variants/wipy3/pins_arduino.h +++ b/variants/wipy3/pins_arduino.h @@ -4,13 +4,13 @@ #include #include "soc/soc_caps.h" -// Neopixel -#define PIN_NEOPIXEL 0 // ->2812 RGB !!! +// RGB LED +#define PIN_RGB_LED 0 // ->2812 RGB !!! // BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino -static const uint8_t LED_BUILTIN = (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT); +static const uint8_t LED_BUILTIN = (PIN_RGB_LED + 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() +// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite() #define RGB_BUILTIN LED_BUILTIN #define RGB_BRIGHTNESS 64