v3_firmware/src/config.h.example

84 lines
5.1 KiB
Plaintext

#ifndef CONFIG_H
#define CONFIG_H
// ALL EDITS BELOW THIS LINE!
/**************************************************************************************************************************
* Use a Single Color LED for Status Signaling
* At Startup the LED will blink twice to signal a sucessfull OTAA Join
*************************************************************************************************************************/
#define LED_PIN PIN_PA7
/**************************************************************************************************************************
* 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
/**************************************************************************************************************************
* Enable Sending on Button Press, as well as CO2 Background Level 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
/**************************************************************************************************************************
* Number of active Sensors (used as long as HAS_NO_SENSOR is not enabled)
* Set to the correct number of enabled sensors below
* Not doing so will lead to unpredictable results or not work at all
* The default payload decoder will NOT WORK if more than one sensor is enabled, so you MUST define a specific
* decoder for this case. See the README.md for details
*************************************************************************************************************************/
#define NUM_SENSORS 1
/**************************************************************************************************************************
* Define which Sensors are installed
* Not all sensors can be used at the same time
* For example you can only have one sensor using serial UART
* If HAS_NO_SENSOR is selected all other activated sensor will be ignored
*************************************************************************************************************************/
#define HAS_NO_SENSOR
// #define HAS_MHZ19C
// #define HAS_SG112A
// #define HAS_SENSAIRS8
// #define HAS_SCD30
// #define HAS_BME280
// #define HAS_SHT21
// #define HAS_HM330x
// #define HAS_DS18B20
/**************************************************************************************************************************
* Sensor Configuration
* Change according to your Needs
*************************************************************************************************************************/
// Pin for the OneWire Bus
#define DS18B20_PIN PIN_PC3
// A/D Resolution of the DS18B20 (9-12 Bit)
#define DS18B20_RES 12
/**************************************************************************************************************************
* 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.
* Actual sleep Time is sleep_time*2*32 seconds due to the 32s sleep intervals of the ATTiny3216
*************************************************************************************************************************/
uint16_t sleep_time = 10;
/**************************************************************************************************************************
* LoRa Keys for OTAA Mode
* Please make sure to use the correct byte order when copying these from the TTN-Console!
* APPEUI and DEVEUI need to be inserted in LSB order
* APPKEY needs to be inserted in MSB order
* in some cases there is no APPEUI, for example when using Chirpstack. leave it set to all 0x00 in these cases
*************************************************************************************************************************/
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 };
static const u1_t PROGMEM APPKEY[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
// ALL EDITS ABOVE THIS LINE!
#endif