Skip to content

Commit 6bb97b6

Browse files
committed
rp2040: give LEDs safe defaults
1 parent 92b38f6 commit 6bb97b6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

main/sketch.ino.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ void setup() {
9797
pinMode(15, INPUT);
9898
pinMode(21, INPUT);
9999

100+
#if defined(NANO_RP2040_CONNECT)
101+
pinMode(26, OUTPUT);
102+
pinMode(27, OUTPUT);
103+
digitalWrite(26, HIGH);
104+
digitalWrite(27, HIGH);
105+
#endif
106+
100107
pinMode(5, INPUT);
101108
if (digitalRead(5) == LOW) {
102109
setupBluetooth();
@@ -121,7 +128,7 @@ void setupBluetooth() {
121128
esp_bt_controller_config_t btControllerConfig = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
122129

123130
btControllerConfig.hci_uart_no = UART_NUM_1;
124-
#ifdef UNO_WIFI_REV2
131+
#if defined(UNO_WIFI_REV2) || defined(NANO_RP2040_CONNECT)
125132
btControllerConfig.hci_uart_baudrate = 115200;
126133
#else
127134
btControllerConfig.hci_uart_baudrate = 912600;

0 commit comments

Comments
 (0)