Smart Home Automation Forum
[Arduino source code for KC868-A8M]-02 DS18B20 - 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-A8M (https://www.kincony.com/forum/forumdisplay.php?fid=48)
+--- Thread: [Arduino source code for KC868-A8M]-02 DS18B20 (/showthread.php?tid=2799)



[Arduino source code for KC868-A8M]-02 DS18B20 - KinCony Support - 04-14-2023

Code:
#include <DS18B20.h>

DS18B20 ds(14);   //IO13

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

void loop() {
 
    Serial.printf("Temperature: %.2f C\n",ds.getTempC());
    delay(1000);
}
[Arduino source code for KC868-A8M]-02 DS18B20


RE: [Arduino source code for KC868-A8M]-02 DS18B20 - happyname34 - 05-26-2024

I was able to get multiple DS18B20 temperature sensors working in esphome. At first I thought it should be GPIO13 but that did not work, 14 did though. Also note that the 4.7kohm resistor is built into the board. 

dallas:
  - pin: GPIO14
    update_interval: 2s

sensor:
  - platform: dallas
    address: 0x254697d446e4b828
    name: "Temperature"

  - platform: dallas
    address: 0x6a570fd4466e1628
    name: "Temperature2"


RE: [Arduino source code for KC868-A8M]-02 DS18B20 - admin - 05-26-2024

ok, good.