WiFi using the ESP32
Another popular and more powerful IOT WiFi module is the ESP32. The ESP32 is a system on a chip (SOC) with duel high-performance Xtensa 32-bit LX6 CPU cores, WiFi (2.4GHz band), Bluetooth, ultra low power co-processor and multiple peripherals. In this project, you'll learn how to work with the ESP32 WiFi module using the Arduino IDE.
The main documentation on using the ESP32 and all the functions available on the chip are found here.
Parts needed:
|
| |
| 1 | To program the ESP8266 WiFi module, you first need to add the ESP32 Board definition to the Arduino IDE program. You only need to do this once so if it has already been done then skip this step and go to step 2.
|
|
|
| |
| 2 | Plug in the micro USB cable between the ESP32 development board and your computer. | |
| 3 | Select from the menu Tools | Board | ESP32 Arduino | ESP Dev Module. |
|
| 4 | Select from the menu File | Examples. Under the Examples for ESP32 Dev Module section, select WiFI | WiFiScan |
|
| 5 | You should see this program listed. |
|
| 6 | Select the correct COM port (under Tools | Port) that your module is connected to. | |
| 7 | Upload and run the program. After you click on the Upload button, you need to press and hold down the Boot button on the development board until it starts uploading. You can then release the button.
If you are using the WeMos D1 mini board, you might need to use this USB driver in order to upload the code successfully. |
|
| 8 | Open up the serial monitor and set the baud rate (bottom right corner) to 115200. | |
| 9 | You should see a similar output in the serial monitor with a list of all the WiFi networks available near you. |
|
| 10 | Here are the pinouts for the ESP32 Development Board. | |
| ||