This project consists of an ESP-32s that uses Arduino libraries to read the temperature and humidity of the environment and the temperature of an object. The ESP-32s has a web server that allows you to control a relay that is connected to a heating element.
Before compiling the project, you must create a file named credentials.h in the http_server folder with the following defined macros:
#define AP_SSID_SECRETS "YOUR_WIFI_SSID"
#define AP_PASSWORD_SECRETS "YOUR_WIFI_PASSWORD"
#define AP_HOSTNAME_SECRETS "YOUR_HOSTNAME"
Warning
Make sure to replace the example values with your own data before compiling.
To compile and upload the project to the ESP-32s, you must have PlatformIO installed. If you don't have it, you can follow the instructions on the official website.
Once you have PlatformIO installed, you have build the file system image and upload it to the ESP-32s. To do this, you must follow the third step in the official documentation.
After that, you can compile and upload the project to the ESP-32s by clicking on the Upload button on the PlatformIO toolbar.
Note
Before uploading the project, make sure that you have all the libraries installed. You can install them by clicking on the Libraries button on the PlatformIO toolbar and searching for the library name. Or you can download them from the libraries section.
To sync the code from the PlatformIO IDE to the Arduino IDE, you must run the following command:
source ./make-arduino.sh
This command will ask you for the version of the project that you want to assign to the output folder. The output folder will be named build/heat-[version].
After that, you can open the Arduino IDE and open the project by clicking on File > Open... and selecting the build/heat-[version] folder.
The following hardware is used in this project:
- ESP-32s
- MLX90614
- DHT11
- Relay
- Resistor 15W 1.2ΩJ
The following libraries are used in this project: