06-01-2022, 01:17 AM
[Arduino IDE demo source code for KC868-A8S]--#04-KC868-A8S_DS18B20_code
Code:
/*KC868-A8S DS18B20 Temperature sensor code*/
#include <DS18B20.h>
DS18B20 ds1(14); //channel-1-DS18b20 IO14
void setup()
{
Serial.begin(115200);
}
void loop()
{
Serial.print("Temperature1:");
Serial.print(ds1.getTempC());
Serial.print(" C /");
delay(500);
}