Working Blink Sketch
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -7,3 +7,5 @@
|
||||
include/README
|
||||
test/README
|
||||
lib/README
|
||||
CMakeLists.txt
|
||||
sdkconfig.esp32c6-wroom-1
|
||||
|
||||
@ -1,19 +1,15 @@
|
||||
; 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:esp32-s3-devkitc-1]
|
||||
[env:esp32-s3-supermini]
|
||||
platform = espressif32
|
||||
board = esp32-s3-devkitc-1
|
||||
framework = arduino
|
||||
|
||||
monitor_speed = 115200
|
||||
upload_speed = 460800
|
||||
|
||||
board_upload.flash_size = 4MB
|
||||
board_build.psram = enabled
|
||||
board_build.partitions = default.csv
|
||||
|
||||
build_flags =
|
||||
-D ARDUINO_USB_CDC_ON_BOOT=1
|
||||
-DBOARD_HAS_PSRAM
|
||||
-D ARDUINO_USB_MODE=1
|
||||
17
src/main.cpp
17
src/main.cpp
@ -1,14 +1,19 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
int myFunction(int, int);
|
||||
#define LED_BUILTIN 48
|
||||
|
||||
void setup() {
|
||||
int result = myFunction(2, 3);
|
||||
delay(1000);
|
||||
|
||||
Serial.begin(115200);
|
||||
Serial.println("ESP32-S3 Blink Starting...");
|
||||
pinMode(LED_BUILTIN, OUTPUT);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
}
|
||||
|
||||
int myFunction(int x, int y) {
|
||||
return x + y;
|
||||
Serial.println("Beep Beep...");
|
||||
digitalWrite(LED_BUILTIN, HIGH);
|
||||
delay(500);
|
||||
digitalWrite(LED_BUILTIN, LOW);
|
||||
delay(1000);
|
||||
}
|
||||
Reference in New Issue
Block a user