stm32f103rb-pio-arduino-framework-example

Blinking the board’s built-in LED with PlatformIO’s Arduino framework
Index Commits Files Refs README
commit f94985d9c2585bebe403384af7b538d485cbb641
Author: Martin Kloeckner <mjkloeckner@gmail.com>
Date:   Sat, 23 Aug 2025 21:28:51 -0300

first commit

Diffstat:
A.gitignore | 1+
Aplatformio.ini | 5+++++
Asrc/main.cpp | 15+++++++++++++++
3 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -0,0 +1 @@
+.pio
diff --git a/platformio.ini b/platformio.ini
@@ -0,0 +1,5 @@
+[env:nucleo_f103rb]
+platform = ststm32
+framework = arduino
+board = nucleo_f103rb
+upload_protocol = stlink
diff --git a/src/main.cpp b/src/main.cpp
@@ -0,0 +1,15 @@
+#include <Arduino.h>
+
+#define LED_PIN LED_BUILTIN
+
+void setup() {
+    pinMode(LED_PIN, OUTPUT);
+    digitalWrite(LED_PIN, LOW);
+}
+
+void loop() {
+    digitalWrite(LED_PIN, HIGH);
+    delay(1000);
+    digitalWrite(LED_PIN, LOW);
+    delay(1000);
+}