lorawan/sodaq_one/temp-hdc1000.ino

19 lines
362 B
Arduino
Raw Normal View History

2016-11-03 07:08:08 +00:00
#include <Arduino.h>
#include <Wire.h>
#include <HDC1000.h>
HDC1000 hdc;
void setupTempHumidHDC1000() {
hdc.begin(); delay(500);
}
String getTempHumidHDC1000() {
float temperature;
float humidity;
humidity = hdc.getHumidity();
temperature = hdc.getTemperature();
return String("tmp=") + temperature + String(" humid=") + humidity;
}