Added an example to the sensor sketch

This commit is contained in:
sensorsiot 2022-05-22 01:16:14 +02:00
parent 25f9d8bd5d
commit 5500ab271b
3 changed files with 14 additions and 6 deletions

View File

@ -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;
}

View File

@ -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

View File

@ -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