Skip to content

Commit 95eeb03

Browse files
authored
fix(arduino_pins): lolin-c3-mini rgb led pin
1 parent 5aeb02b commit 95eeb03

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Diff for: variants/lolin_c3_mini/pins_arduino.h

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@
22
#define Pins_Arduino_h
33

44
#include <stdint.h>
5+
#include "soc/soc_caps.h"
56

6-
static const uint8_t LED_BUILTIN = 7;
7+
// based on https://www.wemos.cc/en/latest/c3/c3_mini.html
8+
// WS2812 RGB LED on pin 7
9+
#define PIN_RGB_LED 7
10+
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino
11+
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_RGB_LED;
712
#define BUILTIN_LED LED_BUILTIN // backward compatibility
813
#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN
14+
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite()
15+
#define RGB_BUILTIN LED_BUILTIN
16+
#define RGB_BRIGHTNESS 64
917

1018
static const uint8_t TX = 21;
1119
static const uint8_t RX = 20;

0 commit comments

Comments
 (0)