|
| 1 | +--- |
| 2 | +title: "ESP32" |
| 3 | +description: "How to setup the ESP32" |
| 4 | +--- |
| 5 | + |
| 6 | +To set up the ESP32 for use with 01, follow this guide to install the firmware: |
| 7 | + |
| 8 | +1. Download [Arduino IDE](https://www.arduino.cc/en/software). |
| 9 | + |
| 10 | +2. 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. |
| 11 | + |
| 12 | +<div style="display: flex; justify-content: center;"> |
| 13 | + <img src="assets/copy-client.png" alt="Copy client.ino contents" width="60%" /> |
| 14 | +</div> |
| 15 | + |
| 16 | +3. Open Arduino IDE and paste the client.ino contents. |
| 17 | + |
| 18 | +<div style="display: flex; justify-content: center;"> |
| 19 | + <img src="assets/paste-client.png" alt="Paste client.ino contents" width="60%" /> |
| 20 | + |
| 21 | + <img src="assets/pasted-client.png" alt="Pasted client.ino contents" width="60%" /> |
| 22 | +</div> |
| 23 | + |
| 24 | +4. Hardcode your WiFi SSID, WiFi password, and server URL into the code. |
| 25 | + |
| 26 | +<div style="display: flex; justify-content: center;"> |
| 27 | + <img src="assets/hardcode-wifi-pass-server.png" alt="Hardcode WiFi SSID and password" width="60%" /> |
| 28 | +</div> |
| 29 | + |
| 30 | +<div style="display: flex; justify-content: center;"> |
| 31 | + <div style="width: 80%;"> |
| 32 | + 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. |
| 33 | + </div> |
| 34 | +</div> |
| 35 | + |
| 36 | +5. Go to Tools -> Board -> Boards Manager, search "esp32", then install the boards by Arduino and Espressif. |
| 37 | + |
| 38 | +<div style="display: flex; justify-content: center;"> |
| 39 | + <img src="assets/boards-manager.png" alt="Install ESP32 boards" width="60%" /> |
| 40 | +</div> |
| 41 | + |
| 42 | +5. Go to Tools -> Manage Libraries, then install the following: |
| 43 | + |
| 44 | +- M5Atom by M5Stack ([Reference](https://www.arduino.cc/reference/en/libraries/m5atom/)) |
| 45 | + |
| 46 | +<div style="display: flex; justify-content: center;"> |
| 47 | + <img src="assets/M5-atom-library.png" alt="Install M5Atom library" width="60%" /> |
| 48 | + |
| 49 | + <img src="assets/m5-atom-install-all.png" alt="Install all M5Atom dependencies" width="60%" /> |
| 50 | +</div> |
| 51 | + |
| 52 | +- WebSockets by Markus Sattler ([Reference](https://www.arduino.cc/reference/en/libraries/websockets/)) |
| 53 | + |
| 54 | +<div style="display: flex; justify-content: center;"> |
| 55 | + <img src="assets/WebSockets by Markus Sattler.png" alt="Install WebSockets library" width="60%" /> |
| 56 | +</div> |
| 57 | + |
| 58 | +- AsyncTCP by dvarrel ([Reference](https://github.com/dvarrel/AsyncTCP)) |
| 59 | + |
| 60 | +<div style="display: flex; justify-content: center;"> |
| 61 | + <img src="assets/AsyncTCP by dvarrel.png" alt="Install AsyncTCP library" width="60%" /> |
| 62 | +</div> |
| 63 | + |
| 64 | +- ESPAsyncWebServer by lacamera ([Reference](https://github.com/lacamera/ESPAsyncWebServer)) |
| 65 | + |
| 66 | +<div style="display: flex; justify-content: center;"> |
| 67 | + <img src="assets/ESPAsyncWebServer by lacamera.png" alt="Install ESPAsyncWebServer library" width="60%" /> |
| 68 | + |
| 69 | + <img src="assets/ESPAsyncWebServer-install-all.png" alt="Install all ESPAsyncWebServer dependencies" width="60%" /> |
| 70 | +</div> |
| 71 | + |
| 72 | +6. To flash the .ino to the board, connect the board to the USB port. |
| 73 | + |
| 74 | +<div style="display: flex; justify-content: center;"> |
| 75 | + <img src="assets/connect_usb.jpeg" alt="Connect USB" width="60%" /> |
| 76 | +</div> |
| 77 | + |
| 78 | +7. Select the port from the dropdown on the IDE, then select the M5Atom board (or M5Stack-ATOM if you have that). |
| 79 | + |
| 80 | +<div style="display: flex; justify-content: center;"> |
| 81 | + <img src="assets/Select Board and Port.png" alt="Select Board and Port" width="60%" /> |
| 82 | +</div> |
| 83 | + |
| 84 | +8. Click on upload to flash the board. |
| 85 | + |
| 86 | +<div style="display: flex; justify-content: center;"> |
| 87 | + <img src="assets/Upload.png" alt="Upload firmware" width="60%" /> |
| 88 | +</div> |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | +--- |
| 93 | + |
| 94 | +Watch this video from Thomas for a step-by-step guide on flashing the ESP32 and connecting the 01. |
| 95 | + |
| 96 | +[](https://www.youtube.com/watch?v=Y76zed8nEE8 "ESP32 Flashing Tutorial") |
0 commit comments