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