# ESP32-S3 Bridge Example This ESP-IDF example wires `dali_cpp` into a standalone application and demonstrates how to register strongly typed Modbus and BACnet bridge models. ## Environment ```bash cd /Users/tonylu/StudioProjects/dalimaster/dali_cpp . ./scripts/export_esp_idf.sh ``` ## Build ```bash cd /Users/tonylu/StudioProjects/dalimaster/dali_cpp/examples/esp32s3_bridge idf.py set-target esp32s3 idf.py build ``` ## What It Shows - `DaliBridgeEngine` resolving model bindings. - `BridgeProvisioningStore` loading and saving model/config state in NVS. - `DaliModbusBridge` mapping Modbus TCP holding-register writes to DALI operations. - `DaliBacnetBridge` mapping BACnet property writes to DALI brightness percentage updates. - A simple Modbus TCP listener supporting write-single-register (`0x06`) and write-multiple-registers (`0x10`). - Placeholder DALI gateway callbacks where you can connect your UART transport. ## Modbus Mapping Notes - The example listens on port `1502` by default. - Holding register `0` maps to bridge register `40001`. - The default config is stored to NVS on first boot and reused on later boots.