45 lines
2.1 KiB
C
45 lines
2.1 KiB
C
/*
|
|
secconfig.h - Firmware Configuration
|
|
|
|
* Supported RF Modules
|
|
#define RF_LORA - HopeRF RFM95 LoRa Module
|
|
#define RF_RFM69 - HopeRF RFM69(H)(C)W Module
|
|
|
|
* Supported Sensors
|
|
#define HAS_NO_SENSOR - No Sensor, just send Battery Voltage (Beacon Mode)
|
|
#define HAS_SHT21 - Sensirion SHT21 Temperature + Humidity Sensor
|
|
#define HAS_BME280 - Bosch BME280 Temperature + Humidity + Pressure Sensor
|
|
|
|
* LED Support
|
|
#define LED_PIN PIN_A7 - LED is connected to ATTiny84 Pin A7 on TinyTX SMD / TinyLora
|
|
|
|
* Time between Measurements
|
|
#define SLEEP_TIME 528 - Time in Seconds between Measurements. Try it out to get a good Approximation
|
|
Examples from my Tests::
|
|
- 528 for 10 Minute Interval with a LoRa RFM95 + BME280
|
|
- 544 for 10 Minute Interval with a LoRa RFM95 + SHT21
|
|
|
|
* See the following Examples for needed RF Module Parameters, uncomment and adapt the one fitting your Hardware
|
|
*/
|
|
|
|
|
|
// LoRa RFM95 + SHT21, LED on Pin A7
|
|
#define RF_LORA
|
|
#define HAS_SHT21
|
|
#define LED_PIN PIN_A7
|
|
#define SLEEP_TIME 544
|
|
// Information from The Things Network, device configuration ACTIVATION METHOD: ABP, msb left
|
|
unsigned char NwkSkey[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
|
unsigned char AppSkey[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
|
unsigned char DevAddr[4] = { 0x00, 0x00, 0x00, 0x00 };
|
|
|
|
/* RFM69 + BME280, LED on Pin A7
|
|
#define RF_RFM69
|
|
#define HAS_BME280
|
|
#define LED_PIN PIN_A7
|
|
#define RFM69_NETWORKID 101 // NetworkID, 0-255, sould be the same for Node and Receiver
|
|
#define RFM69_NODEID 29 // NodeID of this Sensor, 1-255, should be unique for every node in the same Network
|
|
#define RFM69_GATEWAY 1 // NodeID of the Receiver, 1-255
|
|
#define RFM69_TXPOWER 31 // Transmitting Power 0-31, see datasheet for details
|
|
#define RFM69_ENCKEY "0123456789ABCDEF" // AES encryption key, exactly 16 characters, if set messages will be encrypted using AES 128bit
|
|
*/ |