mirror of
https://gitlab.waag.org/make/fablab/interns/2025/sam.git
synced 2025-08-03 20:04:56 +00:00
repo cleanup + MCU lectures 13-02-2025
This commit is contained in:
24
src/workshopCode/ledExampleRP2040/ledExampleRP2040.ino
Normal file
24
src/workshopCode/ledExampleRP2040/ledExampleRP2040.ino
Normal file
@@ -0,0 +1,24 @@
|
||||
void setup() {
|
||||
pinMode(PIN_LED_R, OUTPUT);
|
||||
pinMode(PIN_LED_G, OUTPUT);
|
||||
pinMode(PIN_LED_B, OUTPUT);
|
||||
|
||||
Serial.begin(9600);
|
||||
|
||||
digitalWrite(PIN_LED_R, HIGH);
|
||||
digitalWrite(PIN_LED_G, HIGH);
|
||||
digitalWrite(PIN_LED_B, HIGH);
|
||||
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
digitalWrite(LED_BUILTIN, 0); //Turn the led on RP2040 is reversed
|
||||
|
||||
Serial.println("on");
|
||||
delay(10);
|
||||
digitalWrite(LED_BUILTIN, 1);
|
||||
Serial.println("off");
|
||||
delay(10);
|
||||
|
||||
}
|
Reference in New Issue
Block a user