mirror of
https://github.com/eledio-devices/ESP32Wrover16Template.git
synced 2025-10-30 16:12:36 +01:00
First commit - blinking LED.
This commit is contained in:
18
.editorconfig
Normal file
18
.editorconfig
Normal file
@@ -0,0 +1,18 @@
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
charset = utf-8
|
||||
|
||||
[*.sh]
|
||||
# like -i=2
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
#shell_variant = posix # like -ln=posix
|
||||
#binary_next_line = true # like -bn
|
||||
switch_case_indent = true # like -ci
|
||||
space_redirects = true # like -sr
|
||||
#keep_padding = true # like -kp
|
||||
12
.gitignore
vendored
Normal file
12
.gitignore
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
.pio
|
||||
.vscode
|
||||
.cache
|
||||
bin
|
||||
dist
|
||||
*.pyc
|
||||
data
|
||||
# C Lion
|
||||
.idea
|
||||
cmake-build-*
|
||||
CMakeLists.txt
|
||||
CMakeListsPrivate.txt
|
||||
@@ -1,2 +1,2 @@
|
||||
# ESP32Wrover16Template
|
||||
Platformio ESP32 Wrover 16MB flash template
|
||||
Platformio ESP32 Wrover 16MB flash template to use with Wrover 16MB development kit (ie. https://www.laskakit.cz/laskakit-esp32-lpkit-wrover-e-pcb-antenna/).
|
||||
|
||||
34
boards/wrover-16MB.json
Normal file
34
boards/wrover-16MB.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dio",
|
||||
"mcu": "esp32",
|
||||
"variant": "esp32"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet",
|
||||
"can"
|
||||
],
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "WROVER-16MB",
|
||||
"upload": {
|
||||
"flash_size": "16MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 16777216,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://www.espressif.com",
|
||||
"vendor": "Espressif"
|
||||
}
|
||||
25
platformio.ini
Normal file
25
platformio.ini
Normal file
@@ -0,0 +1,25 @@
|
||||
[platformio]
|
||||
;build_cache_dir = .cache
|
||||
default_envs = USB
|
||||
|
||||
[env]
|
||||
platform = espressif32@5.2.0
|
||||
framework = arduino
|
||||
board_build.filesystem = littlefs
|
||||
|
||||
lib_ldf_mode = chain+
|
||||
build_flags =
|
||||
-DAPP_NAME='"esp32Template"'
|
||||
-DHW_NAME='"WroverDevKit"'
|
||||
|
||||
[env:USB]
|
||||
board = wrover-16MB
|
||||
board_build.partitions = default_16MB.csv
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=0
|
||||
upload_port = /dev/ttyUSB0
|
||||
upload_speed = 460800
|
||||
monitor_port = /dev/ttyUSB0
|
||||
monitor_speed = 115200
|
||||
monitor_filters = esp32_exception_decoder
|
||||
24
src/main.cpp
Normal file
24
src/main.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
#ifndef LED_BUILTIN
|
||||
# warning Development kit has no built-in LED. Using GPIO4 as default.
|
||||
# define LED_BUILTIN 4
|
||||
#endif
|
||||
|
||||
static uint32_t timeBase = 0;
|
||||
|
||||
void setup(void)
|
||||
{
|
||||
|
||||
Serial.begin(115200); // prepare serial debug port
|
||||
pinMode(LED_BUILTIN, OUTPUT);
|
||||
}
|
||||
|
||||
void loop(void)
|
||||
{
|
||||
|
||||
if (millis() - timeBase > 500) {
|
||||
timeBase = millis();
|
||||
digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user