Spis treści:
ESP32 module has gained its popularity due to its small size, huge capabilities, wireless communication and small price. It allows you to create an unlimited number of IoT projects using various types of sensors and other actuators. ESP is also used in smart home systems, where it is visible as a node. Thanks to WiFi communication, there is no need to run additional wires to the control panel, as data is sent over the wireless network. In this tutorial, we will connect the ESP32 module to a popular DS18B20 temperature sensor, and display the sensor data on a serial monitor and in a web browser.
What will we need to complete the project?
It is easy to deduce that we will need an ESP32 module and a DS18B20 temperature sensor right at the start of creating the project. In our shop you can find a ready-made kit with useful sensors and modules to start working with ESP32, individual elements can also be purchased separately.
The full list of components can be found below.
- ESP32 module
- DS18B20 sensor
- 4.7 kΩ resistor
- Contact board
- Male-to-male connection wires
- MicroUSB cable
Connecting DS18B20 sensor with ESP32
The sensor can be connected to any ESP32 digital pin, we will connect it to pin D4 of the ESP module. Place a 4.7 kΩ pull-up resistor between the digital pin of the temperature sensor (middle – DQ) and the power supply.
Preparing Arduino IDE for ESP32 module
ESP32 module can be easily programmed in Arduino IDE environment. To do this, you need to upload the appropriate board package. To upload ESP32 boards, open Arduino IDE, then go to File -> Preferences and in the Additional URLs to the board manager field, paste the link:
https://dl.espressif.com/dl/package_esp32_index.json
and confirm with pressing OK.
How useful was this post?
Click on a star to rate it!
Average rating 0 / 5. Vote count: 0
No votes so far! Be the first to rate this post.