Skip to content

Commit

Permalink
Merge pull request #640 from rouing/dev-rgb-tembed
Browse files Browse the repository at this point in the history
[T-Embed] RGB LED Support
  • Loading branch information
bmorcelli authored Dec 31, 2024
2 parents 86dbcc8 + 16be00a commit a41058e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 21 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,18 @@ Also, [read our FAQ](https://github.com/pr3y/Bruce/wiki/FAQ)
</details>

## Specific functions per Device, the ones not mentioned here are available to all.
| Device | CC1101 | NRF24 | Interpreter | FMRadio | PN532 | Mic_SPM1423 | BadUSB | RGB Led | Speaker | LITE_MODE |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Cardputer | :ok: | :ok: | :ok: | :ok: | :ok: | :ok: | :ok: | :ok: | NS4168 | :x: |
| StickCPlus2 | :ok: | :ok: | :ok: | :ok: | :ok: | :ok: | :ok:¹ | :x: | Tone | :x: |
| StickCPlus 1.1 | :ok: | :ok: | :x: | :ok: | :ok: | :ok: | :ok:¹ | :x: | Tone | :x:² |
| Core | :x: | :x: | :x: | :x: | :x: | :ok: | :ok:¹ | :x: | Tone | :x: |
| Core2 | :x: | :x: | :x: | :x: | :x: | :ok: | :ok:¹ | :x: | :x: | :x: |
| CoreSe/SE | :x: | :x: | :ok: | :x: | :x: | :x: | :ok: | :x: | :x: | :x: |
| CYD-2432S028 | :ok: | :ok: | :ok: | :x: | :ok: | :x: | :ok:¹ | :x: | :x: | :x:² |
| Lilygo T-Embed CC1101 | :ok: | :x: | :ok: | :x: | :ok: | :ok: | :ok: | :x: | :x: | :x: |
| Lilygo T-Embed | :x: | :x: | :ok: | :x: | :ok: | :ok: | :ok: | :x: | :x: | :x: |
| Lilygo T-Deck (and pro) | :x: | :x: | :ok: | :x: | :x: | :x: | :ok: | :x: | :x: | :x: |
| Device | CC1101 | NRF24 | Interpreter | FM Radio | PN532 | Mic | BadUSB | RGB Led | Speaker | Fuel Guage | LITE_MODE |
| --- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [M5Stack Cardputer](https://shop.m5stack.com/products/m5stack-cardputer-kit-w-m5stamps) | :ok: | :ok: | :ok: | :ok: | :ok: | :ok: | :ok: | :ok: | NS4168 | :x: | :x: |
| [M5Stack M5StickC PLUS2](https://shop.m5stack.com/products/m5stickc-plus-esp32-pico-mini-iot-development-kit) | :ok: | :ok: | :ok: | :ok: | :ok: | :ok: | :ok:¹ | :x: | Tone | :x: | :x: |
| [M5Stack M5StickC PLUS](https://shop.m5stack.com/products/m5stickc-plus-esp32-pico-mini-iot-development-kit) | :ok: | :ok: | :x: | :ok: | :ok: | :ok: | :ok:¹ | :x: | Tone | :x: | :x:² |
| [M5Stack M5Core BASIC](https://shop.m5stack.com/products/basic-core-iot-development-kit) | :x: | :x: | :x: | :x: | :x: | :ok: | :ok:¹ | :x: | Tone | :x: | :x: |
| [M5Stack M5Core2 v1.1](https://shop.m5stack.com/products/m5stack-core2-esp32-iot-development-kit-v1-1) | :x: | :x: | :x: | :x: | :x: | :ok: | :ok:¹ | :x: | :x: | :x: | :x: |
| [M5Stack M5CoreS3](https://shop.m5stack.com/products/m5stack-cores3-esp32s3-lotdevelopment-kit)/[SE](https://shop.m5stack.com/products/m5stack-cores3-se-iot-controller-w-o-battery-bottom) | :x: | :x: | :ok: | :x: | :x: | :x: | :ok: | :x: | :x: | :x: | :x: |
| [JCZN CYD&#x2011;2432S028](https://www.aliexpress.us/item/3256804774970998.html) | :ok: | :ok: | :ok: | :x: | :ok: | :x: | :ok:¹ | :x: | :x: | :x: | :x:² |
| [Lilygo T&#x2011;Embed CC1101](https://lilygo.cc/products/t-embed-cc1101) | :ok: | :x: | :ok: | :x: | :ok: | :ok: | :ok: | :ok: | :ok: | :ok: | :x: |
| [Lilygo T&#x2011;Embed](https://lilygo.cc/products/t-embed) | :x: | :x: | :ok: | :x: | :ok: | :ok: | :ok: | :ok: | :ok: | :x: | :x: |
| [Lilygo T&#x2011;Deck](https://lilygo.cc/products/t-deck) ([and pro](https://lilygo.cc/products/t-deck-plus-1)) | :x: | :x: | :ok: | :x: | :x: | :x: | :ok: | :x: | :x: | :x: | :x: |

² CYD and StickCPlus 1.1 have a LITE_VERSION version for Launcher Compatibility
¹ Core, CYD and StickCs Bad-USB: [here](https://github.com/pr3y/Bruce/wiki/Others#badusb)
Expand Down
17 changes: 8 additions & 9 deletions boards/pinouts/lilygo-t-embed.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ static const uint8_t SCL = GROVE_SCL;

#define BAT_PIN 4


// Encoder
#define ENCODER_INA 2
#define ENCODER_INB 1
Expand All @@ -118,16 +117,16 @@ static const uint8_t SCL = GROVE_SCL;
// #define FM_SI4713
// #define FM_RSTPIN 40

// RTC
// #define HAS_RTC

// RGB LED
// #define HAS_RGB_LED
// #define RGB_LED=21
#define HAS_RGB_LED
#define RGB_LED 42
#define RGB_LED_CLK 45
#define LED_TYPE APA102
#define LED_ORDER RGB
#define LED_TYPE_IS_RGBW 0
#define LED_COUNT 8

// BadUSB
#define USB_as_HID=1
// #define BAD_TX=GROVE_SDA
//#define BAD_RX=GROVE_SCL
#define USB_as_HID 1

#endif /* Pins_Arduino_h */
4 changes: 4 additions & 0 deletions src/modules/others/led.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ void setBrightness(int b)

void ledColorConfig()
{
#ifdef RGB_LED_CLK
FastLED.addLeds<LED_TYPE, RGB_LED, RGB_LED_CLK, LED_ORDER>(leds, LED_COUNT);
#else
FastLED.addLeds<LED_TYPE, RGB_LED, LED_ORDER>(leds, LED_COUNT); // Initialize the LED Object. Only 1 LED.
#endif
setBrightness(brightness); // Set LED Brightness

options = {
Expand Down

0 comments on commit a41058e

Please sign in to comment.