Smart Home Automation Forum

Full Version: [arduino source code for KC868-Uair-5] read DS18B20 temperature sensor
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
#include <DS18B20.h>

DS18B20 ds(27);

void setup() {
    Serial.begin(9600);
}

void loop() {
 
    Serial.print(ds.getTempC());
    Serial.print("℃");
    Serial.println();
}

download arduino IDE source code file: 
[attachment=452]

Note: install "DallasTemperature" library online firstly.
[attachment=453]

edit IR send and receiver GPIO pin define in "PinDefinitionsAndMore.h"
[attachment=457]