mirror of
https://github.com/olikraus/u8g2.git
synced 2026-10-26 22:10:25 +00:00
platformio arduino uno blink
This commit is contained in:
1 parent
9a93ba2e38
commit
b230173ad2
4 files changed
+39
No files matched your search
@@ -0,0 +1 @@
|
||||
.pio
|
||||
@@ -0,0 +1,11 @@
|
||||
pio project init --board uno
|
||||
--> downloads build env for uno and creates "src" in local folder
|
||||
--> "pio boards" shows all boards
|
||||
|
||||
pio run Build/Compile the project (does not upload).
|
||||
pio run -t upload Compile & Upload code to the connected board.
|
||||
pio run -t upload -t monitor Compile & Upload & Monitor
|
||||
pio run -t upload --upload-port /dev/ttyUSB0
|
||||
pio run -t clean Clean build files (useful if facing cache/compilation errors).
|
||||
pio device monitor Open the Serial Monitor to read terminal/debug logs from the board.
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
; PlatformIO Project Configuration File
|
||||
;
|
||||
; Build options: build flags, source filter
|
||||
; Upload options: custom upload port, speed and extra flags
|
||||
; Library options: dependencies, extra library storages
|
||||
; Advanced options: extra scripting
|
||||
;
|
||||
; Please visit documentation for the other options and examples
|
||||
; https://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[env:uno]
|
||||
platform = atmelavr
|
||||
board = uno
|
||||
framework = arduino
|
||||
@@ -0,0 +1,13 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
void setup() {
|
||||
// Set digital pin LED_BUILTIN (Pin 13) as an output
|
||||
pinMode(LED_BUILTIN, OUTPUT);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
digitalWrite(LED_BUILTIN, HIGH); // Turn the LED on
|
||||
delay(1000); // Wait for a second
|
||||
digitalWrite(LED_BUILTIN, LOW); // Turn the LED off
|
||||
delay(1000); // Wait for a second
|
||||
}
|
||||
Reference in new issue
Block a user