[arduino source code for KC868-Uair-5] read DS18B20 temperature sensor - Printable Version +- Smart Home Automation Forum (https://www.kincony.com/forum) +-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=20) +--- Forum: KC868-Uair (https://www.kincony.com/forum/forumdisplay.php?fid=31) +--- Thread: [arduino source code for KC868-Uair-5] read DS18B20 temperature sensor (/showthread.php?tid=1573) |
[arduino source code for KC868-Uair-5] read DS18B20 temperature sensor - admin - 12-31-2021 #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: temperature.zip (Size: 286 bytes / Downloads: 300) Note: install "DallasTemperature" library online firstly. edit IR send and receiver GPIO pin define in "PinDefinitionsAndMore.h" |