File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 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
1018static const uint8_t TX = 21 ;
1119static const uint8_t RX = 20 ;
Original file line number Diff line number Diff line change 44#define Pins_Arduino_h
55
66#include <stdint.h>
7+ #include "soc/soc_caps.h"
78
8- static const uint8_t LED_BUILTIN = 7 ;
9+ // based on https://www.wemos.cc/en/latest/c3/c3_pico.html
10+ // WS2812 RGB LED on pin 7
11+ #define PIN_RGB_LED 7
12+ // BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino
13+ static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_RGB_LED ;
914#define BUILTIN_LED LED_BUILTIN // backward compatibility
1015#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN
16+ // RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite()
17+ #define RGB_BUILTIN LED_BUILTIN
18+ #define RGB_BRIGHTNESS 64
1119
1220static const uint8_t TX = 21 ;
1321static const uint8_t RX = 20 ;
@@ -17,7 +25,7 @@ static const uint8_t SCL = 10;
1725
1826static const uint8_t VBAT = 3 ;
1927
20- static const uint8_t SCK = 2 ;
28+ static const uint8_t SCK = 1 ;
2129static const uint8_t MISO = 0 ;
2230static const uint8_t MOSI = 4 ;
2331static const uint8_t SS = 5 ;
You can’t perform that action at this time.
0 commit comments