2021-02-06 20:32:52 +00:00
|
|
|
#ifndef CONFIG_H
|
|
|
|
#define CONFIG_H
|
2020-12-01 20:04:27 +00:00
|
|
|
|
|
|
|
// ATTNode v3 Onboard LED is on PIN_PA7
|
|
|
|
#define LED_PIN PIN_PA7
|
|
|
|
|
2021-03-09 16:25:35 +00:00
|
|
|
// Enable WS2812B RGB LED Support for the CO2 Addon Board
|
|
|
|
// * First LED shows CO2-Level (green: <1000, yellow: 1000-1800, red: >=1800)
|
|
|
|
// * Second LED shows LoRa Status (yellow: Joining, green 1s: Joined, green 100ms: Sending, blue 250ms: Received Downlink)
|
|
|
|
// WS2812B_BRIGHT can be set to the desired brightness value for the LEDs (0=off, 255=brightest)
|
|
|
|
// Uncomment the 3 following lines to get the default behaviour
|
|
|
|
// #define WS2812B_PIN PIN_PC1
|
|
|
|
// #define WS2812B_NUM 2
|
|
|
|
// #define WS2812B_BRIGHT 32
|
|
|
|
|
2021-03-14 19:11:03 +00:00
|
|
|
// Enable Sending on Button Press, as well as Calibration by Pressing Button for 4s with MH-Z19C Addon
|
|
|
|
// The Button has to be connected to a pin that is capable of Fully Asynchronus Interrupts.
|
|
|
|
// For The ATTNode this means Pin PC2 if you don't want to block any other Interfaces
|
|
|
|
// #define BTN_PIN PIN_PC2
|
|
|
|
|
2020-12-20 10:48:23 +00:00
|
|
|
// Enable Serial Debugging. Parameters for the Serial Port are 115200
|
2021-02-02 20:12:31 +00:00
|
|
|
// Please be aware that the SG112A/B CO2 Sensor uses the HW-UART, so
|
|
|
|
// Serial Debug Output is not available with this Sensor.
|
2020-12-20 10:48:23 +00:00
|
|
|
// #define DEBUG
|
|
|
|
|
2020-12-01 20:04:27 +00:00
|
|
|
// Define which Sensor is installed
|
2021-02-06 20:32:52 +00:00
|
|
|
#define HAS_NO_SENSOR
|
|
|
|
// #define HAS_BME280
|
2020-12-04 17:24:13 +00:00
|
|
|
// #define HAS_SHT21
|
2021-02-02 20:12:31 +00:00
|
|
|
// #define HAS_SG112A
|
2021-02-04 16:50:36 +00:00
|
|
|
// #define HAS_MHZ19C
|
2021-02-06 20:32:52 +00:00
|
|
|
|
2020-12-01 20:04:27 +00:00
|
|
|
|
2020-12-20 10:48:23 +00:00
|
|
|
// How many minutes to sleep between Measuring/Sending
|
|
|
|
// Since this is a 2-byte value internally, intervals between 1 and 65536 are possible
|
|
|
|
// This is the default interval to use, which can be overwritten via DownLink. If an interval
|
|
|
|
// is set via DownLink it will be saved in EEPROM and the time specified here will no longer be used.
|
2020-12-01 20:04:27 +00:00
|
|
|
// Actual Sleep Time is SLEEP_TIME*2*32 Seconds due to the 32s sleep intervals of the ATTiny3216
|
2020-12-28 11:48:38 +00:00
|
|
|
uint16_t sleep_time = 10;
|
2020-12-01 20:04:27 +00:00
|
|
|
|
|
|
|
// Keys for OTAA Mode
|
|
|
|
// APPEUI and DEVEUI from TTN, LSB!
|
|
|
|
static const u1_t PROGMEM APPEUI[8]={ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
|
|
|
static const u1_t PROGMEM DEVEUI[8]={ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
|
|
|
// APPKey from TTN, MSB!
|
|
|
|
static const u1_t PROGMEM APPKEY[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
2021-02-06 20:32:52 +00:00
|
|
|
|
|
|
|
// ALL EDITS ABOVE THIS LINE!
|
|
|
|
#endif
|