The main goal of the demo is to display line directions and departure times of public transport vehicles in Brno.
- Establish WiFi connection
- Configure ILI9341 display, HTTP Client and SNTP Client
- parse data from website (web scraping)
- init RTC and display current time with parsed data
ILI9341 | Wrover-kit |
---|---|
RST | GPIO18 |
CLK | GPIO19 |
D_C | GPIO21 |
CS | GPIO22 |
MOSI | GPIO23 |
MISO | GPIO25 |
ILI9341 | ESP32-DevKitS-V1.1 | Cable color |
---|---|---|
GND | GND | black |
3.3V | 3.3V | red |
RST | GPIO4 | green |
CLK | GPIO18 | orange |
D_C | GPIO2 | purple |
CS | GPIO15 | blue |
MOSI | GPIO23 | yellow |
MISO | GPIO25 | cyan |
{
"version": 1,
"author": "Juraj Sadel",
"editor": "wokwi",
"parts": [
{
"type": "wokwi-esp32-devkit-v1",
"id": "esp",
"top": 0,
"left": 0.67,
"attrs": { "builder": "esp32-rust" }
},
{ "type": "wokwi-ili9341", "id": "lcd1", "top": -354.05, "left": 182.84, "attrs": {} }
],
"connections": [
[ "esp:TX0", "$serialMonitor:RX", "", [] ],
[ "esp:RX0", "$serialMonitor:TX", "", [] ],
[ "esp:D4", "lcd1:RST", "green", [ "h0" ] ],
[ "esp:3V3", "lcd1:VCC", "red", [ "v-1.02", "h132.77" ] ],
[ "esp:GND.1", "lcd1:GND", "black", [ "h141.9", "v-1.79" ] ],
[ "esp:D15", "lcd1:CS", "blue", [ "h0" ] ],
[ "esp:D2", "lcd1:D/C", "purple", [ "h0" ] ],
[ "esp:D18", "lcd1:SCK", "orange", [ "h0" ] ],
[ "esp:D25", "lcd1:MISO", "cyan", [ "h-26.13", "v-106.89", "h328.67" ] ],
[ "lcd1:MOSI", "esp:D23", "yellow", [ "v0" ] ],
[ "lcd1:LED", "esp:3V3", "pink", [ "v226.59", "h-190.8" ] ]
],
"serialMonitor": { "display": "terminal" }
}
https://wokwi.com/projects/332616143815574099
The repository supports:
-
Terminal approach:
./build.sh [debug | release]
If no argument is passed,
release
will be used as default -
UI approach:
The default build task is already set to build the project, and it can be used in VsCode and Gitpod:
- From the Command Palette (
Ctrl-Shift-P
orCmd-Shift-P
) run theTasks: Run Build Task
command. Terminal
->Run Build Task
in the menu.- With
Ctrl-Shift-B
orCmd-Shift-B
. - From the Command Palette (
Ctrl-Shift-P
orCmd-Shift-P
) run theTasks: Run Task
command and selectBuild
. - From UI: Press
Build
on the left side of the Status Bar.
- From the Command Palette (
Note When using GitHub Codespaces, we need to make the ports public, see instructions.
- Terminal approach:
-
Using custom
runner
in.cargo/config.toml
:cargo +esp run [--release]
-
Using
flash.sh
script:./flash.sh [debug | release]
If no argument is passed,
release
will be used as default
-
- UI approach:
- From the Command Palette (
Ctrl-Shift-P
orCmd-Shift-P
) run theTasks: Run Task
command and selectBuild & Flash
. - From UI: Press
Build & Flash
on the left side of the Status Bar.
- From the Command Palette (
-
Terminal approach:
./run-wokwi.sh [debug | release]
If no argument is passed,
release
will be used as default -
UI approach:
The default test task is already set to build the project, and it can be used in VsCode and Gitpod:
- From the Command Palette (
Ctrl-Shift-P
orCmd-Shift-P
) run theTasks: Run Test Task
command - With
Ctrl-Shift-,
orCmd-Shift-,
Note: This Shortcut is not available in Gitpod by default.
- From the Command Palette (
Ctrl-Shift-P
orCmd-Shift-P
) run theTasks: Run Task
command and selectBuild & Run Wokwi
. - From UI: Press
Build & Run Wokwi
on the left side of the Status Bar.
- From the Command Palette (
Wokwi offers debugging with GDB.
- Terminal approach:
$HOME/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gdb target/xtensa-esp32-espidf/release/brno-public-transport -ex "target remote localhost:9333"
- UI approach:
Debug using with VsCode or Gitpod is also possible:
- Run the Wokwi Simulation in
debug
profileNote that the simulation will pause if the browser tab is on the background
- Go to
Run and Debug
section of the IDE (Ctrl-Shift-D or Cmd-Shift-D
) - Start Debugging (
F5
) - Choose the proper user:
esp
when using VsCode or GitHub Codespacesgitpod
when using Gitpod
- Run the Wokwi Simulation in