Smart Home Automation Forum
A24 arduino demo source code-05-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: KinCony A24 (https://www.kincony.com/forum/forumdisplay.php?fid=56)
+--- Thread: A24 arduino demo source code-05-read DS18B20 temperature sensor (/showthread.php?tid=3796)



A24 arduino demo source code-05-read DS18B20 temperature sensor - KinCony Support - 12-07-2023

Code:
#include <DS18B20.h>
DS18B20 ds1(15);  //channel-1-DS18b20


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

void loop()
{
  Serial.print("Temperature1:");
  Serial.print(ds1.getTempC());
  Serial.print(" C /");
  delay(500);  
}