temp

DS18B20 Digital Temperature Sensor

R25.00

Out of stock

Product Description

DS18B20 Digital Temperature Sensor for Arduino (-55~125’C)

1 Wire technology

Library available here

#include <DallasTemperature.h>

DallasTemperature tempSensor;
void setup(void) {
  Serial.begin(9600);
  tempSensor.begin(3); // Connect DS18B20 to Digital Pin 3
}
void loop(void) {
    // Check if the sensor is working correctly
    switch(tempSensor.isValid())
    {
        case 1:
            Serial.println("Invalid CRC");
            tempSensor.reset(); // Reset Sensor
            return;
        case 2:
            Serial.println("Not a valid device");
            tempSensor.reset(); // Reset Sensor

Additional Information

Weight 0.10 kg

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.