remove .gitignore

This commit is contained in:
Timm Bogner 2022-10-06 05:33:35 -05:00
parent 86a975e030
commit 91aeb11402
4 changed files with 85 additions and 2 deletions

2
.gitignore vendored
View File

@ -1,2 +0,0 @@
fdrs_globals.h

View File

@ -0,0 +1,24 @@
// 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_sensor_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
}

View File

@ -0,0 +1,34 @@
// FARM DATA RELAY SYSTEM
//
// Sensor Configuration
#include <fdrs_globals.h>
#define READING_ID 11 //Unique ID for this sensor
#define GTWY_MAC 0x01 //Address of the nearest gateway
#define USE_ESPNOW
//#define USE_LORA
#define DEEP_SLEEP
//#define POWER_CTRL 14
#define FDRS_DEBUG
#define DEBUG_CONFIG // Displays full config info on startup
//SPI Configuration -- Needed only on chipsets with multiple SPI interfaces (ESP32)
#define SPI_SCK 5
#define SPI_MISO 19
#define SPI_MOSI 27
//LoRa Configuration
#define LORA_SS 18
#define LORA_RST 14
#define LORA_DIO0 26
//433E6 for Asia
//866E6 for Europe
//915E6 for North America
//#define LORA_BAND 915E6 // LoRa Frequency Band
//#define LORA_SF 7 // LoRa Spreading Factor
//#define LORA_TXPWR 17 // LoRa TX power in dBm (+2dBm - +20dBm), default is +17dBm
//#define LORA_ACK // Request LoRa acknowledgment. Increases battery usage.
//#define LORA_ACK_TIMEOUT 400 // LoRa ACK timeout in ms. (Minimum = 200)
//#define LORA_RETRIES 2 // LoRa ACK retries [0 - 3]

27
src/fdrs_globals.h Normal file
View File

@ -0,0 +1,27 @@
/* FARM DATA RELAY SYSTEM
*
* "fdrs_globals.h"
*
* Developed by Timm Bogner (timmbogner@gmail.com) for Sola Gratia Farm in Urbana, Illinois, USA.
*/
#ifndef FDRS_GLOBALS
#define FDRS_GLOBALS
#define GLOBAL_SSID "Your SSID"
#define GLOBAL_PASS "Password"
#define GLOBAL_MQTT_ADDR "192.168.0.8"
#define GLOBAL_MQTT_PORT 1883
//#define GLOBAL_MQTT_AUTH //uncomment to enable MQTT authentication
#define GLOBAL_MQTT_USER "Your MQTT Username"
#define GLOBAL_MQTT_PASS "Your MQTT Password"
#define GLOBAL_LORA_BAND 915E6 // LoRa Frequency Band
#define GLOBAL_LORA_SF 7 // LoRa Spreading Factor
#define GLOBAL_LORA_TXPWR 17 // LoRa TX power in dBm (+2dBm - +20dBm), default is +17dBm. Lower power = less battery use
#define GLOBAL_LORA_ACK_TIMEOUT 400 // ms timeout waiting for LoRa ACKs (if enabled). Wouldn't go less than 200ms
#define GLOBAL_LORA_RETRIES 2
#endif //FDRS_GLOBALS