Smart Home Automation Forum

Full Version: A24 arduino demo source code-05-read DS18B20 temperature sensor
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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);  
}
[attachment=3670][attachment=3671]