Posts: 291
Threads: 234
Joined: Jan 2021
04-14-2023, 03:15 AM
(This post was last modified: 04-14-2023, 03:23 AM by KinCony Support .)
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
KC868-A8M_DS18B20.zip (Size: 514 bytes / Downloads: 205)
Posts: 1
Threads: 0
Joined: May 2024
Reputation:
0
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"