Establishing Wi-Fi Connectivity
In the previous chapter, we successfully built the hardware prototype and programmed the first code to read data from the DHT11 sensor. This data can be observed from the local console port in the PlatformIO TERMINAL window. The next step is to establish Wi-Fi connectivity from the ESP32 to your home Wi-Fi router.
Connecting ESP32 to the internet is an imperative step to deliver sensor data to the cloud. In this chapter, we will continue to design the Wi-Fi access logic, draw a diagram using AI Chat at https://mermaidchart.com, and instruct ChatGPT to produce code to enable Wi-Fi access on ESP32.
This chapter will cover the following topics:
- Designing Wi-Fi access logic
- Creating the Wi-Fi access flow diagram
- Instructing ChatGPT to generate code
- Code examples
- Validating internet access on ESP32
In this chapter, we will store the Wi-Fi credentials, ping host address, and NTP server address in the Platformio.ini
file...