04-25-2022, 08:49 AM
[Arduino IDE demo source code for KC868-A6]--#04-Ds18b20_code
4.ds18b20.zip (Size: 674 bytes / Downloads: 304)
Code:
/*KC868-A6 DS18B20 CODE*/
#include <DS18B20.h>
DS18B20 ds1(32); //channel-1-DS18b20
DS18B20 ds2(33); //channel-2-DS18b20
void setup()
{
Serial.begin(115200);
}
void loop()
{
Serial.print("Temperature1:");
Serial.print(ds1.getTempC());
Serial.print(" C /");
delay(500);
Serial.print("Temperature2:");
Serial.print(ds2.getTempC());
Serial.print(" C /\n");
delay(500);
}
4.ds18b20.zip (Size: 674 bytes / Downloads: 304)