--- title: "ESP32" description: "How to setup the ESP32" --- This client uses the [light](/server/light) server. ### Video Guide --- To set up the ESP32 for use with 01, follow this guide to install the firmware: Get the Arduino IDE Get the firmware by copying the contents of [client.ino](https://github.com/OpenInterpreter/01/blob/main/software/source/clients/esp32/src/client/client.ino) from the 01 repository. View the ESP32 firmware source code Copy client.ino contents Open Arduino IDE and paste the client.ino contents. Paste client.ino contents Pasted client.ino contents Hardcode your WiFi SSID, WiFi password, and server URL into the top of the `client.ino` file. Hardcode WiFi SSID and password Hardcoding is recommended for a more streamlined setup and development environment. However, if you don't hardcode these values or if the ESP32 can't connect using the provided information, it will automatically default to a captive portal for configuration. Go to Tools -> Board -> Boards Manager, search "esp32", then install the boards by Arduino and Espressif. Install ESP32 boards Go to Tools -> Manage Libraries, then install the following: - M5Atom by M5Stack ([Reference](https://www.arduino.cc/reference/en/libraries/m5atom/)) Install M5Atom library Install all M5Atom dependencies - WebSockets by Markus Sattler ([Reference](https://www.arduino.cc/reference/en/libraries/websockets/)) Install WebSockets library - AsyncTCP by dvarrel ([Reference](https://github.com/dvarrel/AsyncTCP)) Install AsyncTCP library - ESPAsyncWebServer by lacamera ([Reference](https://github.com/lacamera/ESPAsyncWebServer)) Install ESPAsyncWebServer library Install all ESPAsyncWebServer dependencies To flash the .ino to the board, connect the board to the USB port. Connect USB Select the port from the dropdown on the IDE, then select the M5Atom board (or M5Stack-ATOM if you have that). Select Board and Port Click on upload to flash the board. Upload firmware Start the 01 server on your computer: ``` poetry run 01 --server light ``` This command starts the server and generates a URL. For remote connections, use: ``` poetry run 01 --server light --expose ``` This generates a public URL accessible from anywhere. Connect your 01 device to the server using one of these methods: a) Hardcode credentials: - Modify the Wi-Fi and server credentials at the top of the `client.ino` file. - Flash the modified file to the ESP32. - This method is quick but less flexible for changing details later. b) Use the captive portal: - Power on your 01 device. - Connect to the '01-light' Wi-Fi network from your computer or smartphone. - A captive portal page should open automatically. If not, open a web browser. - Enter your Wi-Fi details and the server URL from step 1. - Click 'Connect' to save settings and connect your device. After successful connection, your ESP32 will be ready to communicate with the server.