Skip to content

Commit a7807fa

Browse files
committed
MultipleBlinks: fix Nano RP2040 Connect build
Fixes CI and explains a bit why RGB leds can't be used directly by Nano RP2040 Connect
1 parent 5110528 commit a7807fa

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

libraries/Scheduler/examples/MultipleBlinks/MultipleBlinks.ino

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,23 @@
2525
// Include Scheduler since we want to manage multiple tasks.
2626
#include <Scheduler.h>
2727

28+
// On Nano RP2040 Connect, RGB leds are connected to the wifi module
29+
// The user APIs are the same, but we can't convert to int, so use defines
30+
#if defined(ARDUINO_NANO_RP2040_CONNECT)
31+
32+
#include "WiFiNINA.h"
33+
#define led1 LEDR
34+
#define led2 LEDG
35+
#define led3 LEDB
36+
37+
#else
38+
2839
int led1 = LEDR;
2940
int led2 = LEDG;
3041
int led3 = LEDB;
3142

43+
#endif
44+
3245
void setup() {
3346
Serial.begin(9600);
3447

0 commit comments

Comments
 (0)