03-02-2023, 05:29 AM
Code:
/*KC868-A4S DS18B20 CODE*/
#include <DS18B20.h>
DS18B20 ds1(5); //channel-1-DS18b20
DS18B20 ds2(14); //channel-2-DS18b20
void setup()
{
Serial.begin(115200);
}
void loop()
{
Serial.print("Temperature1:");
Serial.print(ds1.getTempC());
Serial.println(" C /");
delay(100);
Serial.print("Temperature2:");
Serial.print(ds2.getTempC());
Serial.println(" C /\n");
delay(100);
}