# xiaozhi-esp32 S3 AI Quick Guide [小智](https://ccnphfhqs21z.feishu.cn/wiki/W14Kw1s1uieoKjkP8N0c1VVvn8d?fbclid=IwY2xjawJ4h5VleHRuA2FlbQIxMABicmlkETFST1ZjaHBNTnMxRWNIY3dvAR7jYF4_qjDkXboDoIHJ1KLP6PaWbjwTIYbrlVErn1qV15SPdayiZqat1QxQ2g_aem_T1lDS2-6ELq_X0ILMceK2Q) > Environment: Ubuntu 22.04 > Tools: Git, Docker > Hardware: bread-compact-wifi-lcd > Download xiaozhi-esp32 from github: ``` git clone https://github.com/78/xiaozhi-esp32.git ``` > Go to xiaozhi-esp32 DIR: ``` cd xiaozhi-esp32 ``` > Build FW Command: ``` docker run --rm -v $PWD:/project -w /project -it espressif/idf:latest idf.py clean ``` ``` docker run --rm -v $PWD:/project -w /project -it espressif/idf:latest idf.py fullclean ``` > 清除程式 ``` docker run --rm -v $PWD:/project -w /project -it espressif/idf:latest idf.py erase_flash ``` ``` ``` ==ESP32-S3== ``` docker run --rm -v $PWD:/project -w /project -it espressif/idf:latest idf.py set-target esp32s3 ``` ==ESP32== : ``` docker run --rm -v $PWD:/project -w /project -it espressif/idf:latest idf.py set-target esp32 ``` `Select bread board wifi + lcd` `LCD Tpye is ST7789 240*320, IPS` ``` docker run --rm -v $PWD:/project -w /project -it espressif/idf:latest idf.py menuconfig ``` --- --- ==ESP32-S3== ![1744102078190](https://hackmd.io/_uploads/ByGkVvzRkl.jpg) ![1744102292879](https://hackmd.io/_uploads/BkmgNvGAJe.jpg) --- --- ==ESP32== ![1744102129186](https://hackmd.io/_uploads/rJkA7wf01l.jpg) ![1744102239413](https://hackmd.io/_uploads/ByYQNDMR1l.jpg) --- ``` docker run --rm -v $PWD:/project -w /project -it espressif/idf:latest idf.py build ``` > Load FW to ESP32 board: `EX: COM port is /dev/ttyACM0` --- ==ACM0== ``` docker run --rm -v $PWD:/project -w /project --device=/dev/ttyACM0 -it espressif/idf:latest idf.py -p /dev/ttyACM0 flash ``` --- ==USB0== --- ``` docker run --rm -v $PWD:/project -w /project --device=/dev/ttyUSB0 -it espressif/idf:latest idf.py -p /dev/ttyUSB0 flash ``` --- ==尋找comport指令== ``` ls /dev/ttyUSB* ``` ==或是== ``` ls /dev/ttyACM* ``` ... > Example: It looks like the built-in functionality is designed to control the light via GPIO using voice commands. How should it be modified to use MQTT instead? The main changes should be made in this file: xiaozhi-esp32/main/boards/bread-compact-esp32/esp32_bread_board.cc > If you want to do factory reset: > ``` > docker run --rm -v $PWD:/project -w /project --device=/dev/ttyACM0 -it espressif/idf:latest idf.py -p /dev/ttyACM0 erase-flash > ``` GPIO_NUM_18 ====lamp