Smart Home Automation Forum

Full Version: [Arduino IDE demo source code for KC868-A6]--#04-Ds18b20_code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[Arduino IDE demo source code for KC868-A6]--#04-Ds18b20_code

Code:
/*KC868-A6 DS18B20 CODE*/
#include <DS18B20.h>
DS18B20 ds1(32);  //channel-1-DS18b20
DS18B20 ds2(33);  //channel-2-DS18b20

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

void loop()
{
  Serial.print("Temperature1:");
  Serial.print(ds1.getTempC());
  Serial.print(" C /");
  delay(500);
  Serial.print("Temperature2:");
  Serial.print(ds2.getTempC());
  Serial.print(" C /\n");
  delay(500); 
}
[attachment=872]
Hello, I use sensor ds18b20 with Tasmota, but did not work.
how is it connected? and which pin to set? Thank you
here are "IO-1" and "IO-2" with KC868-A6, that can connect to DS18B20
here is photo
[attachment=2395]
(05-08-2023, 12:55 AM)admin Wrote: [ -> ]here are "IO-1" and "IO-2" with KC868-A6, that can connect to DS18B20
here is photo

Thank you , now it  work.

best wishes
ok, good.