How folotoy/ai-passport works
FoloToy AI Passport is an open ESP32-C3 wearable platform; the checked-in main application is a hardware-test baseline, not a finished user application. Its main workflow initializes board services, presents a test menu, dispatches button input to a selected demo, and displays results on the device. The repository also provides reusable BSP support for display, controls, audio, battery, and shared I²C, plus Wi-Fi, BLE, radio, and low-power demonstrations. The graph follows the README and sampled source; some demo internals and startup wiring are not shown in the excerpts.
Main entry points: demo_low_power.c Low Power Demo · bsp_i2c.c Shared I²C · bsp_display.c Display BSP · bsp_button.c Button BSP
Components 26
Demo Application
- Firmware Entry
main/main.c - Input Dispatch
main/main.c - Menu Navigation
main/demo_navigation.c - Pixel UI
main/ui_pixel.c
Hardware Demos
- Display Demo
main/demo_display.c - Button Demo
main/demo_button.c - Audio Demo
main/demo_audio.c - Battery Demo
main/demo_battery.c - Wi-Fi Demo
main/demo_wifi.c - BLE Demo
main/demo_ble.c - Radio Demo
main/demo_radio.c - Low Power Demo
main/demo_low_power.c
Board Support
- Display BSP
components/bsp/src/bsp_display.c - Button BSP
components/bsp/src/bsp_button.c - Audio BSP
components/bsp/src/bsp_audio.c - Battery BSP
components/bsp/src/bsp_battery.c - Shared I²C
components/bsp/src/bsp_i2c.c - Board Configuration
components/bsp/include/bsp_pins.h
Device Platform
- LCD Hardware
- Physical Buttons
- ES8311 Codec
- Battery Gauge
- Wi-Fi Radio
- BLE Peer
- ESP Sleep
Other components
- Device User
Connections 29
- Device User → Physical Buttons: presses
- Physical Buttons → Button BSP: ADC input
- Button BSP → Input Dispatch: button events
- Firmware Entry → Input Dispatch: queues input
- Input Dispatch → Menu Navigation: dispatches
- Menu Navigation → Firmware Entry: selects demo
- Firmware Entry → Pixel UI: builds screens
- Pixel UI → Display BSP: uses display
- Display BSP → LCD Hardware: drives
- Display Demo → Pixel UI: renders
- Button Demo → Button BSP: reads buttons
- Audio Demo → Audio BSP: uses audio
- Battery Demo → Battery BSP: reads charge
- Wi-Fi Demo → Wi-Fi Radio: demonstrates Wi-Fi
- BLE Demo → BLE Peer: advertises
- Radio Demo → Wi-Fi Radio: uses radio
- Radio Demo → BLE Peer: uses radio
- Low Power Demo → Battery BSP: suspends
- Low Power Demo → Audio BSP: suspends
- Low Power Demo → Shared I²C: prepares bus
- Low Power Demo → Display BSP: suspends display
- Low Power Demo → ESP Sleep: enters sleep
- Audio BSP → Shared I²C: uses control bus
- Battery BSP → Shared I²C: uses shared bus
- Shared I²C → ES8311 Codec: control bus
- Shared I²C → Battery Gauge: control bus
- Button BSP → Board Configuration: uses pin settings
- Display BSP → Board Configuration: uses pin settings
- Audio BSP → Board Configuration: uses pin settings