Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Arduino source code for KC868-A8M]-02 DS18B20
#1
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


Attached Files
.zip   KC868-A8M_DS18B20.zip (Size: 514 bytes / Downloads: 206)
Reply
#2
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"
Reply
#3
ok, good.
Reply


Forum Jump:


Users browsing this thread: