Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Arduino IDE demo source code for KC868-A6]--#04-Ds18b20_code
#1
Heart 
[Arduino IDE demo source code for KC868-A6]--#04-Ds18b20_code

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); 
}

.zip   4.ds18b20.zip (Size: 674 bytes / Downloads: 304)
Reply


Messages In This Thread
[Arduino IDE demo source code for KC868-A6]--#04-Ds18b20_code - by KinCony Support - 04-25-2022, 08:49 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)