# ESP32-C5 C-ITS Visualizer Displays different C-ITS receive-only use cases for cheap. ## Hardware Requirements The code is currently tailored to: - Seeed XIAO ESP32-C5 (8MB PSRAM) - Seeed XIAO L67K (connected on GPIO12 (RX), GPIO11 (TX), GPIO1 (wakeup) and GPIO25 (reset)) only available with `gnss` feature (which is included in `spat` feature) - TODO: display (when using `spat` feature) ## Features ### GNSS Enable L67K GNSS module and in main application logic/ state. ### SPAT Takes the current position and heading from the GNSS receiver and displays the signal phases of the upcoming intersection. The upcoming intersection is selected when the own position is "inside" some ingress approach of the intersection. The display will show the current phase and remaining time for all signal groups of the bike-able lanes in the approach. ### DENM TODO: Not implemented yet! Shall "publish" the most relevant information of a DENMs via BLE ### CAM Just prints a line for each received CAM. ## Usage ### Toolchain Installation Install the toolchain, targe and tools like this: ```shell rustup toolchain install nightly --component rust-src rustup target add riscv32imac-unknown-none-elf # cargo install esp-generate --locked # cargo install esp-config --features=tui --locked cargo install espflash --locked ``` (Project was setup using esp-generate with the options `--chip esp32c5 -o esp32c5-wroom-1-psram -o alloc -o log -o unstable-hal -o wifi -o esp-backtrace -o embassy`.) To use the proper rustfmt features, enable the nightly toolchain: ```shell rustup component add --toolchain nightly rustfmt ``` ### Build and Flash In default configuration only signal phases (SPAT) data is displayed for the upcoming intersection. Additional features are available though feature flags: - `esp`: Run on ESP (required as feature flag to enable unit tests on host) - `std`: Run on system with `std` library - `spat`: Enable signal phase (and intersection map) data - `denm`: Enable DENMs - `cam`: Enable CAMs Connect your ESP32-C5 and run: ``` # default configuration cargo run --release # for e.g. also enable DENM feature cargo run --release -F denm ``` ### Run Unit Tests on Host The unit tests in this project are meant to be run on the host: ``` cargo test --target host-tuple --bin test --no-default-features -F std,spat ```