build(server): 👷 configure platformIO
and Wokwi
for testing sources
This commit is contained in:
parent
d0a76fdc0b
commit
10140a3522
3
server/.gitignore
vendored
Normal file
3
server/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
.pio
|
||||||
|
.vscode/launch.json
|
||||||
|
.vscode/c_cpp_properties.json
|
34
server/diagram.json
Normal file
34
server/diagram.json
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"author": "Uri Shaked",
|
||||||
|
"editor": "wokwi",
|
||||||
|
"parts": [
|
||||||
|
{ "type": "wokwi-esp32-devkit-v1", "id": "esp", "top": 0, "left": 0, "attrs": {} },
|
||||||
|
{ "type": "wokwi-resistor", "id": "r1", "top": 90.3, "left": -73.17, "attrs": {} },
|
||||||
|
{ "type": "wokwi-resistor", "id": "r2", "top": 101.63, "left": -63.17, "attrs": {} },
|
||||||
|
{
|
||||||
|
"type": "wokwi-led",
|
||||||
|
"id": "led1",
|
||||||
|
"top": 50.3,
|
||||||
|
"left": -106.5,
|
||||||
|
"attrs": { "color": "blue" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "wokwi-led",
|
||||||
|
"id": "led2",
|
||||||
|
"top": 68.96,
|
||||||
|
"left": -127.84,
|
||||||
|
"attrs": { "color": "green" }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"connections": [
|
||||||
|
[ "esp:TX0", "$serialMonitor:RX", "", [] ],
|
||||||
|
[ "esp:RX0", "$serialMonitor:TX", "", [] ],
|
||||||
|
[ "r1:1", "led1:A", "green", [ "v0.07", "h-10" ] ],
|
||||||
|
[ "r2:1", "led2:A", "green", [ "v0" ] ],
|
||||||
|
[ "esp:GND.2", "led2:C", "black", [ "h0" ] ],
|
||||||
|
[ "esp:GND.2", "led1:C", "black", [ "h0" ] ],
|
||||||
|
[ "esp:D26", "r1:2", "green", [ "h0" ] ],
|
||||||
|
[ "r2:2", "esp:D27", "green", [ "v0" ] ]
|
||||||
|
]
|
||||||
|
}
|
15
server/platformio.ini
Normal file
15
server/platformio.ini
Normal file
|
@ -0,0 +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]
|
||||||
|
platform = espressif32
|
||||||
|
framework = arduino
|
||||||
|
board = esp32dev
|
||||||
|
lib_deps = me-no-dev/ESP Async WebServer@^1.2.4
|
9
server/wokwi.toml
Normal file
9
server/wokwi.toml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[wokwi]
|
||||||
|
version = 1
|
||||||
|
elf = ".pio/build/esp32/firmware.elf"
|
||||||
|
firmware = ".pio/build/esp32/firmware.bin"
|
||||||
|
|
||||||
|
# Forward http://localhost:8180 to port 80 on the simulated ESP32:
|
||||||
|
[[net.forward]]
|
||||||
|
from = "localhost:8180"
|
||||||
|
to = "target:80"
|
Loading…
Reference in a new issue