In this opportunity we will simply perform tests on a ds18b20 sensor, indicating the library used in ESP-IDF, in future tests we will use other protocols, especially Modbus.
Libreria: Simple library for single DS18B20 on ESP32
Materials
- Sensor DS18B20 (Onewire) + Resistor 4.8K
- Esp32 Devkit
- ESP-IDF V4.3 >
Mounting
Modified Code
The original code performs the reading of several DS18b20 sensors, but for my case I only require a single reading, for a single sensor.
Detailed video
Conclusions
This first example is a brief introduction to more complex tests, such as integration of industrial protocols, I have done tests with libraries in Arduino IDE on previous occasions.
But this time we will carry out tests with more complete libraries, with protocols such as Modbus RTU and Modbus TCP/IP implemented in ESP-IDF.
Downloads
Example: Reading 1 DS18B20 in ESP-IDF