Farm-Data-Relay-System/examples/Sensor_Examples/MLX90614_fdrs/MLX90614_fdrs.ino
2022-10-11 21:47:52 -05:00

29 lines
651 B
C++

// FARM DATA RELAY SYSTEM
//
// MLX90614 INFRARED TEMPERATURE SENSOR MODULE
//
// Developed by Timm Bogner (bogner1@gmail.com) for Sola Gratia Farm in Urbana, Illinois, USA.
#include "fdrs_sensor_config.h"
#include <Adafruit_MLX90614.h>
#include <fdrs_node.h>
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
void setup() {
beginFDRS();
delay(250);
DBG("Adafruit MLX90614 test");
if (!mlx.begin()) {
DBG("Error connecting to MLX sensor. Check wiring.");
while (1);
};
}
void loop() {
loadFDRS(mlx.readAmbientTempC(), TEMP_T);
loadFDRS(mlx.readObjectTempC(), TEMP2_T);
sendFDRS();
sleepFDRS(60); //Sleep time in seconds
}