Hi! Today, I need your help about a digital sensor. I know to use an analogic sensor but I present to the group of TPE in school a sensor ds18b20 that is a digital Sensor. I need make an arduino program for exploit the data of this sensor to show the temperature. Please help me, the datasheet of the componnent don't help me. Thank for your answer !
It uses the OneWire library, and a special protocol. That is not something you (or me) is able to write from scratch.
You need to use a library, and a 4k7 pull-up resistor to 5V. You can attach more than one DS18B20 to the same "OneWire".
The OneWire library, http://playground.arduino.cc/Learning/OneWire The DallasTemperature library, http://milesburton.com/Dallas_Temperature_Control_Library
Most use the OneWire library with the DallasTemperature library. I used only the OneWire library, and I used the included example code for the DS18B20.