diff --git a/variants/Dongle_nRF52840-pca10059-v1/variant.cpp b/variants/Dongle_nRF52840-pca10059-v1/variant.cpp index 8c6bf039c..2fc87c718 100644 --- a/variants/Dongle_nRF52840-pca10059-v1/variant.cpp +++ b/variants/Dongle_nRF52840-pca10059-v1/variant.cpp @@ -29,10 +29,7 @@ const uint32_t g_ADigitalPinMap[] = { void initVariant() { - // LED1 & LED2 + // LED1 pinMode(PIN_LED1, OUTPUT); ledOff(PIN_LED1); - - pinMode(PIN_LED2, OUTPUT); - ledOff(PIN_LED2); -} +} \ No newline at end of file diff --git a/variants/Dongle_nRF52840-pca10059-v1/variant.h b/variants/Dongle_nRF52840-pca10059-v1/variant.h index 533367a30..aef702c7c 100644 --- a/variants/Dongle_nRF52840-pca10059-v1/variant.h +++ b/variants/Dongle_nRF52840-pca10059-v1/variant.h @@ -43,24 +43,13 @@ extern "C" { #define NUM_ANALOG_OUTPUTS (0) // LEDs -#define PIN_LED1 (0 + 12) // Blue LED P1.12 -#define PIN_LED2 (0 + 6) // Built in Green P0.06 - -// Green Built in LED1 -// #define PIN_LED1 (0 + 6) // LED1 P1.15 - -// RGB NeoPixel LED2 -// #define PIN_LED1 (0 + 8) Red -// #define PIN_LED1 (32 + 9) Green -// #define PIN_LED1 (0 + 12) Blue +#define PIN_LED1 (0 + 6) // Built in Green P0.06 +#define RGBLED_RED (0 + 8) // Red of RGB P0.08 +#define RGBLED_GREEN (32 + 9) // Green of RGB P1.09 +#define RGBLED_BLUE (0 + 12) // Blue of RGB P0.12 +#define RGBLED_CA // comment out this line if you have a common cathode type, as defined use common anode logic #define LED_BUILTIN PIN_LED1 -#define LED_CONN PIN_LED2 - -#define LED_GREEN PIN_LED1 -#define LED_BLUE PIN_LED2 - -#define LED_STATE_ON 0 // State when LED is litted /* * Buttons diff --git a/variants/betafpv_2400_tx_micro/platformio.ini b/variants/betafpv_2400_tx_micro/platformio.ini index 82fe2a9e4..531e8532d 100644 --- a/variants/betafpv_2400_tx_micro/platformio.ini +++ b/variants/betafpv_2400_tx_micro/platformio.ini @@ -15,4 +15,4 @@ upload_protocol = esptool upload_speed = 460800 lib_deps = ${esp32_base.lib_deps} - makuna/NeoPixelBus@^2.7.1 + adafruit/Adafruit NeoPixel @ ^1.12.0 \ No newline at end of file diff --git a/variants/betafpv_2400_tx_micro/variant.h b/variants/betafpv_2400_tx_micro/variant.h index 8c615d168..fd06183ee 100644 --- a/variants/betafpv_2400_tx_micro/variant.h +++ b/variants/betafpv_2400_tx_micro/variant.h @@ -1,5 +1,4 @@ // https://betafpv.com/products/elrs-micro-tx-module -#include // 0.96" OLED #define I2C_SDA 22 @@ -15,7 +14,11 @@ #define LORA_CS 5 #define RF95_FAN_EN 17 -#define LED_PIN 16 // This is a LED_WS2812 not a standard LED +// #define LED_PIN 16 // This is a LED_WS2812 not a standard LED +#define HAS_NEOPIXEL // Enable the use of neopixels +#define NEOPIXEL_COUNT 1 // How many neopixels are connected +#define NEOPIXEL_DATA 16 // gpio pin used to send data to the neopixels +#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use #define BUTTON_PIN 25 #define BUTTON_NEED_PULLUP @@ -31,4 +34,4 @@ #define SX128X_TXEN 26 #define SX128X_RXEN 27 #define SX128X_RESET LORA_RESET -#define SX128X_MAX_POWER 13 +#define SX128X_MAX_POWER 13 \ No newline at end of file diff --git a/variants/esp32-s3-pico/platformio.ini b/variants/esp32-s3-pico/platformio.ini index ef737d98a..ff77c30e0 100644 --- a/variants/esp32-s3-pico/platformio.ini +++ b/variants/esp32-s3-pico/platformio.ini @@ -22,4 +22,4 @@ build_flags = ${esp32_base.build_flags} lib_deps = ${esp32s3_base.lib_deps} zinggjm/GxEPD2@^1.5.3 - ;adafruit/Adafruit NeoPixel@^1.10.7 + adafruit/Adafruit NeoPixel @ ^1.12.0 \ No newline at end of file diff --git a/variants/esp32-s3-pico/variant.h b/variants/esp32-s3-pico/variant.h index 87378d378..bfcb6059d 100644 --- a/variants/esp32-s3-pico/variant.h +++ b/variants/esp32-s3-pico/variant.h @@ -10,6 +10,10 @@ // #define LED_PIN PIN_LED // Board has RGB LED 21 +#define HAS_NEOPIXEL // Enable the use of neopixels +#define NEOPIXEL_COUNT 1 // How many neopixels are connected +#define NEOPIXEL_DATA 21 // gpio pin used to send data to the neopixels +#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use // The usbPower state is revered ? // DEBUG | ??:??:?? 365 [Power] Battery: usbPower=0, isCharging=0, batMv=4116, batPct=90 diff --git a/variants/lora_relay_v1/platformio.ini b/variants/lora_relay_v1/platformio.ini index 77402aadc..8660bf64a 100644 --- a/variants/lora_relay_v1/platformio.ini +++ b/variants/lora_relay_v1/platformio.ini @@ -20,4 +20,5 @@ build_src_filter = ${nrf52_base.build_src_filter} +<../variants/lora_relay_v1> lib_deps = ${nrf52840_base.lib_deps} sparkfun/SparkFun BQ27441 LiPo Fuel Gauge Arduino Library@^1.1.0 - bodmer/TFT_eSPI@^2.4.76 \ No newline at end of file + bodmer/TFT_eSPI@^2.4.76 + adafruit/Adafruit NeoPixel @ ^1.12.0 \ No newline at end of file diff --git a/variants/lora_relay_v1/variant.h b/variants/lora_relay_v1/variant.h index 9cfb69337..29fb4cb84 100644 --- a/variants/lora_relay_v1/variant.h +++ b/variants/lora_relay_v1/variant.h @@ -44,15 +44,19 @@ extern "C" { // LEDs #define PIN_LED1 (3) #define PIN_LED2 (4) -#define PIN_NEOPIXEL (8) +// #define PIN_NEOPIXEL (8) +#define HAS_NEOPIXEL // Enable the use of neopixels +#define NEOPIXEL_COUNT 1 // How many neopixels are connected +#define NEOPIXEL_DATA 8 // gpio pin used to send data to the neopixels +#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use #define LED_BUILTIN PIN_LED1 -#define LED_CONN PIN_LED2 +#define PIN_LED2 #define LED_RED PIN_LED1 #define LED_BLUE PIN_LED2 -#define LED_STATE_ON 1 // State when LED is litted +#define 1 // State when LED is litted /* * Buttons @@ -154,4 +158,4 @@ static const uint8_t SCK = PIN_SPI_SCK; * Arduino objects - C++ only *----------------------------------------------------------------------------*/ -#endif +#endif \ No newline at end of file diff --git a/variants/lora_relay_v2/platformio.ini b/variants/lora_relay_v2/platformio.ini index 4439d8a46..cd2109f00 100644 --- a/variants/lora_relay_v2/platformio.ini +++ b/variants/lora_relay_v2/platformio.ini @@ -23,3 +23,4 @@ lib_deps = ${nrf52840_base.lib_deps} sparkfun/SparkFun BQ27441 LiPo Fuel Gauge Arduino Library@^1.1.0 bodmer/TFT_eSPI@^2.4.76 + adafruit/Adafruit NeoPixel @ ^1.12.0 \ No newline at end of file diff --git a/variants/lora_relay_v2/variant.h b/variants/lora_relay_v2/variant.h index 3afe8620e..98881a496 100644 --- a/variants/lora_relay_v2/variant.h +++ b/variants/lora_relay_v2/variant.h @@ -61,16 +61,21 @@ extern "C" { // LEDs #define PIN_LED1 (3) #define PIN_LED2 (4) -#define PIN_NEOPIXEL (8) +// #define PIN_NEOPIXEL (8) +#define HAS_NEOPIXEL // Enable the use of neopixels +#define NEOPIXEL_COUNT 1 // How many neopixels are connected +#define NEOPIXEL_DATA 8 // gpio pin used to send data to the neopixels +#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use + #define PIN_BUZZER (40) #define LED_BUILTIN PIN_LED1 -#define LED_CONN PIN_LED2 +#define PIN_LED2 #define LED_RED PIN_LED1 #define LED_BLUE PIN_LED2 -#define LED_STATE_ON 1 // State when LED is litted +#define 1 // State when LED is litted /* * Buttons @@ -180,4 +185,4 @@ static const uint8_t SCK = PIN_SPI_SCK; * Arduino objects - C++ only *----------------------------------------------------------------------------*/ -#endif +#endif \ No newline at end of file diff --git a/variants/my_esp32s3_diy_eink/platformio.ini b/variants/my_esp32s3_diy_eink/platformio.ini index 966bc580e..e81f2c1ab 100644 --- a/variants/my_esp32s3_diy_eink/platformio.ini +++ b/variants/my_esp32s3_diy_eink/platformio.ini @@ -13,7 +13,7 @@ platform_packages = lib_deps = ${esp32_base.lib_deps} zinggjm/GxEPD2@^1.5.1 - adafruit/Adafruit NeoPixel@^1.10.7 + adafruit/Adafruit NeoPixel @ ^1.12.0 build_unflags = -DARDUINO_USB_MODE=1 build_flags = ;${esp32_base.build_flags} -D MY_ESP32S3_DIY -I variants/my_esp32s3_diy_eink @@ -24,4 +24,4 @@ build_flags = -DEINK_HEIGHT=128 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue - -DARDUINO_USB_MODE=0 + -DARDUINO_USB_MODE=0 \ No newline at end of file diff --git a/variants/my_esp32s3_diy_eink/variant.h b/variants/my_esp32s3_diy_eink/variant.h index 516fa7f34..024f912dd 100644 --- a/variants/my_esp32s3_diy_eink/variant.h +++ b/variants/my_esp32s3_diy_eink/variant.h @@ -12,6 +12,10 @@ #define I2C_SCL 17 // 2 // #define LED_PIN 38 // This is a RGB LED not a standard LED +#define HAS_NEOPIXEL // Enable the use of neopixels +#define NEOPIXEL_COUNT 1 // How many neopixels are connected +#define NEOPIXEL_DATA 38 // gpio pin used to send data to the neopixels +#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use #define BUTTON_PIN 0 // This is the BOOT button #define BUTTON_NEED_PULLUP diff --git a/variants/my_esp32s3_diy_oled/platformio.ini b/variants/my_esp32s3_diy_oled/platformio.ini index 9b8b09f7f..2d7a5cd91 100644 --- a/variants/my_esp32s3_diy_oled/platformio.ini +++ b/variants/my_esp32s3_diy_oled/platformio.ini @@ -12,11 +12,11 @@ platform_packages = tool-esptoolpy@^1.40500.0 lib_deps = ${esp32_base.lib_deps} - adafruit/Adafruit NeoPixel@^1.10.7 + adafruit/Adafruit NeoPixel @ ^1.12.0 build_unflags = -DARDUINO_USB_MODE=1 build_flags = ;${esp32_base.build_flags} -D MY_ESP32S3_DIY -I variants/my_esp32s3_diy_oled ${esp32_base.build_flags} -D PRIVATE_HW -I variants/my_esp32s3_diy_oled -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue - -DARDUINO_USB_MODE=0 + -DARDUINO_USB_MODE=0 \ No newline at end of file diff --git a/variants/my_esp32s3_diy_oled/variant.h b/variants/my_esp32s3_diy_oled/variant.h index 6dd18c236..8a3a39003 100644 --- a/variants/my_esp32s3_diy_oled/variant.h +++ b/variants/my_esp32s3_diy_oled/variant.h @@ -12,6 +12,10 @@ #define I2C_SCL 17 // 2 // #define LED_PIN 38 // This is a RGB LED not a standard LED +#define HAS_NEOPIXEL // Enable the use of neopixels +#define NEOPIXEL_COUNT 1 // How many neopixels are connected +#define NEOPIXEL_DATA 38 // gpio pin used to send data to the neopixels +#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use #define BUTTON_PIN 0 // This is the BOOT button #define BUTTON_NEED_PULLUP @@ -53,4 +57,4 @@ // #define PIN_EINK_DC 1 // #define PIN_EINK_RES (-1) // #define PIN_EINK_SCLK 5 -// #define PIN_EINK_MOSI 6 +// #define PIN_EINK_MOSI 6 \ No newline at end of file diff --git a/variants/unphone/platformio.ini b/variants/unphone/platformio.ini index dad9a7177..407976c48 100644 --- a/variants/unphone/platformio.ini +++ b/variants/unphone/platformio.ini @@ -13,6 +13,7 @@ build_unflags = -D ARDUINO_USB_MODE build_flags = ${esp32_base.build_flags} + -D BOARD_HAS_PSRAM -D UNPHONE -I variants/unphone -D ARDUINO_USB_MODE=0 @@ -27,4 +28,5 @@ build_src_filter = ${esp32_base.build_src_filter} +<../variants/unphone> lib_deps = ${esp32s3_base.lib_deps} lovyan03/LovyanGFX @ ^1.1.8 - https://gitlab.com/hamishcunningham/unphonelibrary#meshtastic @ ^9.0.0 \ No newline at end of file + https://gitlab.com/hamishcunningham/unphonelibrary#meshtastic @ ^9.0.0 + adafruit/Adafruit NeoPixel @ ^1.12.0 \ No newline at end of file diff --git a/variants/unphone/variant.cpp b/variants/unphone/variant.cpp index 3f6d1c54d..7884f82e3 100644 --- a/variants/unphone/variant.cpp +++ b/variants/unphone/variant.cpp @@ -10,6 +10,7 @@ void initVariant() unphone.printWakeupReason(); // what woke us up? (stored, not printed :|) unphone.checkPowerSwitch(); // if power switch is off, shutdown unphone.backlight(false); // setup backlight and make sure its off + unphone.expanderPower(true); // enable power to expander / hat / sheild for (int i = 0; i < 3; i++) { // buzz a bit unphone.vibe(true); diff --git a/variants/unphone/variant.h b/variants/unphone/variant.h index 180fdfe2c..a3f2fce8c 100644 --- a/variants/unphone/variant.h +++ b/variants/unphone/variant.h @@ -1,7 +1,16 @@ // meshtastic/firmware/variants/unphone/variant.h #pragma once - +// RGB LED configuration +#define HAS_NEOPIXEL // Enable the use of neopixels +#define NEOPIXEL_COUNT 1 // How many neopixels are connected +#define NEOPIXEL_DATA A0 // gpio pin used to send data to the neopixels +#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use +// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) +// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) +// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products) +// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2) +// NEO_RGBW Pixels are wired for RGBW bitstream (NeoPixel RGBW products) #define SPI_SCK 39 #define SPI_MOSI 40 #define SPI_MISO 41 @@ -38,7 +47,7 @@ #define SCREEN_TRANSITION_FRAMERATE 5 #define HAS_TOUCHSCREEN 1 -#define USE_XPT2046 1 +#define USE_XPT2046 #define TOUCH_CS 38 #define HAS_GPS \