#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:
temperature.zip (Size: 286 bytes / Downloads: 301)
Note: install "DallasTemperature" library online firstly.
edit IR send and receiver GPIO pin define in "PinDefinitionsAndMore.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:
temperature.zip (Size: 286 bytes / Downloads: 301)
Note: install "DallasTemperature" library online firstly.
edit IR send and receiver GPIO pin define in "PinDefinitionsAndMore.h"