mirror of
https://github.com/timmbogner/Farm-Data-Relay-System
synced 2024-11-10 07:10:42 +00:00
Added an example to the sensor sketch
This commit is contained in:
parent
25f9d8bd5d
commit
5500ab271b
@ -12,15 +12,25 @@
|
||||
|
||||
#include "fdrs_sensor.h"
|
||||
|
||||
float data1 = 42.069;
|
||||
float data2 = 21.0345;
|
||||
float data1;
|
||||
float data2;
|
||||
|
||||
void setup() {
|
||||
beginFDRS();
|
||||
}
|
||||
void loop() {
|
||||
data1=readHum();
|
||||
loadFDRS(data1, HUMIDITY_T);
|
||||
data2=readTemp();
|
||||
loadFDRS(data2, TEMP_T);
|
||||
sendFDRS();
|
||||
sleepFDRS(10); //Sleep time in seconds
|
||||
}
|
||||
|
||||
float readTemp(){
|
||||
return 42.069;
|
||||
}
|
||||
|
||||
float readHum(){
|
||||
return 21.0345;
|
||||
}
|
||||
|
@ -5,6 +5,8 @@
|
||||
// Developed by Timm Bogner (timmbogner@gmail.com) for Sola Gratia Farm in Urbana, Illinois, USA.
|
||||
//
|
||||
#define DEBUG
|
||||
|
||||
#define ROLE UART_GATEWAY
|
||||
#include "fdrs_config.h"
|
||||
#include "DataReading.h"
|
||||
#ifdef ESP8266
|
||||
|
@ -32,10 +32,6 @@
|
||||
#define SS 18
|
||||
#define RST 14
|
||||
#define DIO0 26
|
||||
//433E6 for Asia
|
||||
//866E6 for Europe
|
||||
//915E6 for North America
|
||||
#define BAND 915E6
|
||||
|
||||
//#define USE_LED
|
||||
#define LED_PIN 32
|
||||
|
Loading…
Reference in New Issue
Block a user