Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[arduino source code for KC868-Uair-5] read DS18B20 temperature sensor
#1
#include <DS18B20.h>

DS18B20 ds(27);

void setup() {
    Serial.begin(9600);
}

void loop() {
 
    Serial.print(ds.getTempC());
    Serial.print("℃");
    Serial.println();
}

download arduino IDE source code file: 

.zip   temperature.zip (Size: 286 bytes / Downloads: 301)

Note: install "DallasTemperature" library online firstly.
   

edit IR send and receiver GPIO pin define in "PinDefinitionsAndMore.h"
   
Reply


Forum Jump:


Users browsing this thread: