ESP 32 Setup on Arduino Environnement
Installation guide on WIndows based on various sources and experiences.
https://randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/
https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html
NOTE: The first compiling of an ESP with a new setup can be surprisingly long depending on your machines (uo to 10-15 minutes sometimes on old machines 32bits stuck on win 10). Hopefully subsequent compiling should only tqke &(-30s or less than minute.
1- Adapt you Arduino IDE
Two actions are needed so that the Arduino software can operate you ESP32:
1.a In preferences / SETTINGS / Additionnal Board Manager
- Add this line for and ESP32 Devkit C4:
http://arduino.esp8266.com/stable/package_esp8266com_index.json - Add this line for and ESP32 Devkit C4:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - odd this line for and ESP32 Devkit C4:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json, http://arduino.esp8266.com/stable/package_esp8266com_index.json
1.b Open the Boards Manager.
- Go to Tools > Board > Boards Manager…
- Search for ESP32 and press install button for the “ESP32 by Espressif Systems“:
1.c Testing the Installation
Plug the ESP32 board to your computer. With your Arduino IDE open, follow these steps:
2- INSTALL ESP DRIVERS ON WINDOWS
While your computer recognizes Arduino board, it doesn’t have the necessary driver to communicate with the specific chip on your ESP32 board.
To solve this, you need to manually install the correct driver for your ESP32’s USB-to-serial converter. The ESP32 DevKitC V4 typically uses one of two common chips: the CP2102 or the CH340.
-
Identify the Chip: Look at the small square chip near the USB port on your ESP32 board. The name of the chip is usually printed on it.
-
CP2102: This chip is made by Silicon Labs. It’s common on many ESP32 boards.
-
CH340: This chip is made by WCH and is also very popular, especially on cheaper boards. .
-
-
Download and Install the Driver:
-
For CP2102: Go to the Silicon Labs website and download the correct CP210x Universal Windows Driver. Run the installer and follow the on-screen instructions.
https://www.silabs.com/software-and-tools/usb-to-uart-bridge-vcp-drivers?tab=downloads -
For CH340: Go to the WCH website and download the CH341SER driver. Unzip the file and run the setup.exe.
https://www.wch-ic.com/downloads/ch341ser_exe.html
-
After installing the driver, restart the Arduino IDE, and then plug in your ESP32 board. The correct COM port should now appear under the Tools > Port menu.
Download and install ESP32 libraries
Manage ESP WIFI COmmunication in STATION mode
Source: first part of https://www.youtube.com/watch?v=aH3sLEQI4_w
1) STATION MODE: open and upload the first arduino example in th /examples/WIFI/SimpleWifiServer.ino
=> setup your router SSID (your network name) and password to access your local server.
=> this will set your board as a server node with an IP prodvided by your network
2) if needed addapt th code to control desired pin and led out on/OFF as feedback control
3) siwtch off and on to startup setup which will make your board request WIFI connection, and if successful, be given an IP adress
4) connect to this given IP address on you browser from a computer or phone connected to the same nettwork. You will see a page with 2 text lines and ‘Here” links to switch your led on and off from the browser.
5) Connect to the IP adress obtained when resetting the board on a browser to acess the lights controls
ESP32 devkit SD memory card management
TO DO
Manage ESP WIFI COM in ACCESS POINT Mode
Source: second part of https://www.youtube.com/watch?v=aH3sLEQI4_w
1) ACCESS POINT MODE: open and upload the first arduino example in th /examples/WIFI/SimpleWifiServer.ino
=> setup and create a SSID and password for your ESP32 (e.g. MyESP32 and ESP32Password) to use your board as a router.
=> this will set your board as a server and router : drawback you will have to monopolise your wifi acess to connect
2) if needed addapt th code to control desired pin and led out on/OFF as feedback control
3) siwtch off and on to startup reset setup which will make your board request WIFI connection, and if successful, be given an IP adress
4) connect to wifi over your named ssid or server, in my case above MyESP32 that should appear on your wifi selectors when the board is running.
5) Connect to the IP adress obtained when resetting the board on a browser to acess the lights controls