You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Farm-Data-Relay-System/examples/Sensor_Examples/SHT20_fdrs/SHT20_fdrs.ino

25 lines
570 B
C++

// FARM DATA RELAY SYSTEM
//
// SENSIRION SHT20 SENSOR MODULE
//
// Developed by Timm Bogner (timmbogner@gmail.com) in Urbana, Illinois, USA.
// If you are using the sensor for air monitoring, change SOIL_T to HUMIDITY_T.
//
#include "DFRobot_SHT20.h"
#include "fdrs_node_config.h"
#include <fdrs_node.h>
DFRobot_SHT20 sht20(&Wire, SHT20_I2C_ADDR);
void setup() {
beginFDRS();
sht20.initSHT20();
}
void loop() {
loadFDRS(sht20.readHumidity(), SOIL_T);
loadFDRS(sht20.readTemperature(), TEMP_T);
sendFDRS();
sleepFDRS(300); //Sleep time in seconds
}