Documentazione del codice

The C++ API documentation is also available as doxgen documentation.

union addr16_t

Public Members

uint8_t *bptr
uint16_t *wptr
uint16_t word
uint8_t bytes[2]
struct bin_value_t

Public Members

uint16_t sample

last sample

uint16_t med

average values of observations

uint16_t sigma

standard deviation of observations

class BitBangedSPI

Public Functions

inline void begin()
inline void beginTransaction(SPISettings settings)
inline void end()
inline uint8_t transfer(uint8_t b)

Private Members

unsigned long pulseWidth
struct configuration_t
#include <i2c-leaf.h>

EEPROM saved configuration.

Public Members

uint8_t module_version

module version

uint8_t module_type

module type

uint8_t i2c_address

i2c address

bool is_oneshot

enable or disable oneshot mode

bool is_continuous

enable or disable continuous mode

uint16_t leaf_calibration_min
uint16_t leaf_calibration_max
float adc_voltage_offset_1
float adc_voltage_offset_2
float adc_voltage_min
float adc_voltage_max
uint8_t module_main_version

module main version

uint8_t module_configuration_version

module configuration version

uint16_t tipping_bucket_time_ms

Tipping bucket time in milliseconds.

uint8_t rain_for_tip

How much mm of rain for one tip of tipping bucket rain gauge.

sensor_conf_t sensors[2]

sensors configurations

sensor_t sensors[SENSORS_MAX]

SensorDriver buffer for storing sensors parameter.

uint8_t sensors_count

configured sensors number

uint16_t report_seconds

seconds for report values

constantdata_t constantdata[USE_CONSTANTDATA_COUNT]

Constantdata buffer for storing constant station data parameter.

uint8_t constantdata_count

configured constantdata number

bool is_dhcp_enable

dhcp status

uint8_t ethernet_mac[ETHERNET_MAC_LENGTH]

ethernet mac

uint8_t ip[ETHERNET_IP_LENGTH]

ip address

uint8_t netmask[ETHERNET_IP_LENGTH]

netmask

uint8_t gateway[ETHERNET_IP_LENGTH]

gateway

uint8_t primary_dns[ETHERNET_IP_LENGTH]

primary dns

struct constantdata_t

Public Members

char btable[CONSTANTDATA_BTABLE_LENGTH]

table B code for constant station data

char value[CONSTANTDATA_VALUE_LENGTH]

value of constant station data

struct DIR

Public Members

WORD index
BYTE *fn
CLUST sclust
CLUST clust
DWORD sect
struct FatFileDesc

Public Members

uint32_t firstFatBlock
uint32_t dataBlock
uint8_t blocksPerCluster
struct FATFS

Public Members

BYTE fs_type
BYTE flag
BYTE csize
BYTE pad1
WORD n_rootdir
CLUST n_fatent
DWORD fatbase
DWORD dirbase
DWORD database
DWORD fptr
DWORD fsize
CLUST org_clust
CLUST curr_clust
DWORD dsect
struct FILINFO

Public Members

DWORD fsize
WORD fdate
WORD ftime
BYTE fattrib
char fname[13]
struct float_observation_t

Public Members

float med[OBSERVATION_COUNT]

buffer containing the mean values calculated on a one sample buffer respectively

uint16_t count

number of observations

float *read_ptr

reader pointer to buffer (read observations for calculate report value)

float *write_ptr

writer pointer to buffer (add new observation)

struct ihex_state

Public Members

ihex_address_t address
ihex_segment_t segment
ihex_flags_t flags
uint8_t line_length
uint8_t length
uint8_t data[IHEX_LINE_MAX_LENGTH + 1]
struct leaf_wetness_t
#include <i2c-leaf.h>

Leaf wetness data.

Public Members

float timer

timer in seconds that indicates wet leaf

struct observation_t
#include <i2c-opc.h>

Observations values for opc.

Observations values for temperature and humidity NOT USED / typedef struct { int32_t values[OBSERVATION_COUNT]; //!< buffer containing the mean values calculated on a one sample buffer respectively uint16_t count; //!< number of observations uint32_t *read_ptr; //!< reader pointer to buffer (read observations for calculate report value) uint32_t *write_ptr; //!< writer pointer to buffer (add new observation) } observation_t;.

/********************************************************************* TYPEDEF for Finite State Machine

struct param

Public Members

uint8_t devicecode
uint8_t revision
uint8_t progtype
uint8_t parmode
uint8_t polling
uint8_t selftimed
uint8_t lockbytes
uint8_t fusebytes
uint8_t flashpoll
uint16_t eeprompoll
uint16_t pagesize
uint16_t eepromsize
uint32_t flashsize
struct pm_value_t

Public Members

float sample

last sample

float med

average values of observations

float sigma

standard deviation of observations

struct readable_data_t
#include <i2c-leaf.h>

Readable data through i2c bus.

Public Members

uint8_t module_type

module version

module type

uint8_t module_version

module type

leaf_wetness_t leaf_wetness

leaf wetness data for report

float pm_sample[OPCXX_PM_LENGTH]
float pm_med[OPCXX_PM_LENGTH]
float pm_sigma[OPCXX_PM_LENGTH]
uint16_t bins_med[OPCN3_BINS_LENGTH]
uint16_t bins_sigma[OPCN3_BINS_LENGTH]
pm_value_t pm1

pm1 data for report

pm_value_t pm25

pm25 data for report

pm_value_t pm10

pm10 data for report

bin_value_t bins[OPC_BINS_LENGTH]

bins array data for report

report_t solar_radiation
uint8_t module_main_version

module main version

uint8_t module_minor_version

module minor version

rain_t rain

rain data

value_t temperature

temperature data for report

value_t humidity

humidity data for report

report_t thr
report_t wind
struct report_t
#include <i2c-radiation.h>

report data.

Public Members

float avg
float rain_tips
float rain
float sample_temperature
float sample_humidity
float ist_temperature
float ist_humidity
float min_temperature
float min_humidity
float avg_temperature
float avg_humidity
float max_temperature
float max_humidity
float sigma_temperature
float sigma_humidity
float vavg10_speed
float vavg10_direction
float vavg_speed
float vavg_direction
float peak_gust_speed
float long_gust_speed
float avg_speed
float class_1
float class_2
float class_3
float class_4
float class_5
float class_6
float peak_gust_direction
float long_gust_direction
struct sample_t
#include <i2c-opc.h>

Samples values for measured opc data.

samples data

Public Members

float values

buffer containing the measured samples

uint8_t count

number of good samples

samples counter

uint8_t error_count

number of bad samples

float value[SAMPLES_COUNT]

samples buffer

uint16_t count

samples counter

float *read_ptr

reader pointer

float *write_ptr

writer pointer

int32_t values[SAMPLES_COUNT_MAX]

samples buffer

int32_t *read_ptr

reader pointer

int32_t *write_ptr

writer pointer

struct sensor_conf_t

Public Members

char type[4]

sensor type

uint8_t i2c_address

i2c address of sensor

struct sensor_t
#include <i2c-th.h>

sensors configuration.

struct sensordata_t
#include <stima.h>

constant station data (station name, station height ...) parameters.

class SPISettings

Public Functions

inline SPISettings(uint32_t clock, uint8_t bitOrder, uint8_t dataMode)

Private Members

uint32_t clock

Friends

friend class BitBangedSPI
struct uint16_observation_t

Public Members

uint16_t med[OBSERVATION_COUNT]

buffer containing the mean values calculated on a one sample buffer respectively

uint16_t count

number of observations

uint16_t *read_ptr

reader pointer to buffer (read observations for calculate report value)

uint16_t *write_ptr

writer pointer to buffer (add new observation)

struct writable_data_t
#include <i2c-leaf.h>

Writable data through i2c bus.

Public Members

uint8_t i2c_address

i2c address

bool is_oneshot

enable or disable oneshot mode

bool is_continuous

enable or disable continuous mode

float adc_voltage_offset_1
float adc_voltage_offset_2
float adc_voltage_min
float adc_voltage_max
uint16_t tipping_bucket_time_ms

Tipping bucket time in milliseconds.

uint8_t rain_for_tip

How much mm of rain for one tip of tipping bucket rain gauge.

sensor_conf_t sensors[2]

sensors configurations

file index.md
file ArduinoISP.ino
#include "Arduino.h"

Defines

PROG_FLICKER
SPI_CLOCK
RESET
LED_HB
LED_ERR
LED_PMODE
PIN_MOSI
PIN_MISO
PIN_SCK
SERIAL
BAUDRATE
HWVER
SWMAJ
SWMIN
STK_OK
STK_FAILED
STK_UNKNOWN
STK_INSYNC
STK_NOSYNC
CRC_EOP
SPI_MODE0
beget16(addr)
PTIME
EECHUNK

Typedefs

typedef struct param parameter

Functions

void pulse(int pin, int times)
void setup()

Arduino setup function. Init watchdog, hardware, debug, buffer and load configuration stored in EEPROM.

Return

void.

void heartbeat()
void reset_target(bool reset)
void loop(void)

Arduino loop function. First, initialize tasks and sensors, then execute the tasks and activates the power down if no task is running.

Return

void.

uint8_t getch()
void fill(int n)
void prog_lamp(int state)
uint8_t spi_transaction(uint8_t a, uint8_t b, uint8_t c, uint8_t d)
void empty_reply()
void breply(uint8_t b)
void get_version(uint8_t c)
void set_parameters()
void start_pmode()
void end_pmode()
void universal()
void flash(uint8_t hilo, unsigned int addr, uint8_t data)
void commit(unsigned int addr)
unsigned int current_page()
void write_flash(int length)
uint8_t write_flash_pages(int length)
uint8_t write_eeprom(unsigned int length)
uint8_t write_eeprom_chunk(unsigned int start, unsigned int length)
void program_page()
uint8_t flash_read(uint8_t hilo, unsigned int addr)
char flash_read_page(int length)
char eeprom_read_page(int length)
void read_page()
void read_signature()
void avrisp()

Variables

static BitBangedSPI SPI
int error = 0
int pmode = 0
unsigned int here
uint8_t buff[256]
parameter param
uint8_t hbval = 128
int8_t hbdelta = 8
static bool rst_active_high
file baudcheck.c

Variables

bpsx =BAUD_RATEbps=${bpsx/L/}bps=${bps/U/}fcpux=F_CPUfcpu=${fcpux/L/}fcpu=${fcpu/U/}BAUD_SETTING=$(( ( ($fcpu + $bps * 4) / (($bps * 8))) - 1 ))BAUD_ACTUAL=$(( ($fcpu/(8 * (($BAUD_SETTING)+1))) ))BAUD_ERROR=$(( (( 100*($BAUD_ACTUAL - $bps) ) / $bps) ))ERR_TS=$(( ((( 1000*($BAUD_ACTUAL - $bps) ) / $bps) - $BAUD_ERROR * 10) ))ERR_TENTHS=$(( ERR_TS > 0 ? ERR_TS: -ERR_TS ))echo BAUD RATE CHECK: Desired: $bps
Real __pad0__
Real UBRRL = $BAUD_SETTING
file baudcheck.c

Variables

bpsx =BAUD_RATEbps=${bpsx/L/}bps=${bps/U/}fcpux=F_CPUfcpu=${fcpux/L/}fcpu=${fcpu/U/}BAUD_SETTING=$(( ( ($fcpu + $bps * 4) / (($bps * 8))) - 1 ))BAUD_ACTUAL=$(( ($fcpu/(8 * (($BAUD_SETTING)+1))) ))BAUD_ERROR=$(( (( 100*($BAUD_ACTUAL - $bps) ) / $bps) ))ERR_TS=$(( ((( 1000*($BAUD_ACTUAL - $bps) ) / $bps) - $BAUD_ERROR * 10) ))ERR_TENTHS=$(( ERR_TS > 0 ? ERR_TS: -ERR_TS ))echo BAUD RATE CHECK: Desired: $bps
Real __pad0__
Real UBRRL = $BAUD_SETTING
file boot.h
#include <avr/eeprom.h>#include <avr/io.h>#include <inttypes.h>#include <limits.h>

Defines

BOOTLOADER_SECTION

Used to declare a function or variable to be placed into a new section called .bootloader. This section and its contents can then be relocated to any address (such as the bootloader NRWW area) at link-time.

__COMMON_ASB
__COMMON_ASRE
BLB12
BLB11
BLB02
BLB01
boot_spm_interrupt_enable()

Enable the SPM interrupt.

boot_spm_interrupt_disable()

Disable the SPM interrupt.

boot_is_spm_interrupt()

Check if the SPM interrupt is enabled.

boot_rww_busy()

Check if the RWW section is busy.

boot_spm_busy()

Check if the SPM instruction is busy.

boot_spm_busy_wait()

Wait while the SPM instruction is busy.

__BOOT_PAGE_ERASE
__BOOT_PAGE_WRITE
__BOOT_PAGE_FILL
__BOOT_RWW_ENABLE
__BOOT_LOCK_BITS_SET
__boot_page_fill_short(address, data)
__boot_page_fill_normal(address, data)
__boot_page_fill_alternate(address, data)
__boot_page_fill_extended(address, data)
__boot_page_fill_extended_short(address, data)
__boot_page_erase_short(address)
__boot_page_erase_normal(address)
__boot_page_erase_alternate(address)
__boot_page_erase_extended(address)
__boot_page_erase_extended_short(address)
__boot_page_write_short(address)
__boot_page_write_normal(address)
__boot_page_write_alternate(address)
__boot_page_write_extended(address)
__boot_page_write_extended_short(address)
__boot_rww_enable_short()
__boot_rww_enable()
__boot_rww_enable_alternate()
__boot_lock_bits_set_short(lock_bits)
__boot_lock_bits_set(lock_bits)
__boot_lock_bits_set_alternate(lock_bits)
GET_LOW_FUSE_BITS

address to read the low fuse bits, using boot_lock_fuse_bits_get

GET_LOCK_BITS

address to read the lock bits, using boot_lock_fuse_bits_get

GET_EXTENDED_FUSE_BITS

address to read the extended fuse bits, using boot_lock_fuse_bits_get

GET_HIGH_FUSE_BITS

address to read the high fuse bits, using boot_lock_fuse_bits_get

boot_lock_fuse_bits_get_short(address)
boot_lock_fuse_bits_get(address)

Read the lock or fuse bits at address.

Parameter address can be any of GET_LOW_FUSE_BITS, GET_LOCK_BITS, GET_EXTENDED_FUSE_BITS, or GET_HIGH_FUSE_BITS.

Note

The lock and fuse bits returned are the physical values, i.e. a bit returned as 0 means the corresponding fuse or lock bit is programmed.

__BOOT_SIGROW_READ
boot_signature_byte_get_short(addr)
boot_signature_byte_get(addr)

Read the Signature Row byte at address. For some MCU types, this function can also retrieve the factory-stored oscillator calibration bytes.

Parameter address can be 0-0x1f as documented by the datasheet.

Note

The values are MCU type dependent.

boot_page_fill(address, data)

Fill the bootloader temporary page buffer for flash address with data word.

Note

The address is a byte address. The data is a word. The AVR writes data to the buffer a word at a time, but addresses the buffer per byte! So, increment your address by 2 between calls, and send 2 data bytes in a word format! The LSB of the data is written to the lower address; the MSB of the data is written to the higher address.

boot_page_erase(address)

Erase the flash page that contains address.

Note

address is a byte address in flash, not a word address.

boot_page_write(address)

Write the bootloader temporary page buffer to flash page that contains address.

Note

address is a byte address in flash, not a word address.

boot_rww_enable()

Enable the Read-While-Write memory section.

boot_lock_bits_set(lock_bits)

Set the bootloader lock bits.

For example, to disallow the SPM instruction from writing to the Boot Loader memory section of flash, you would use this macro as such:

Note

In this context, a 'set bit' will be written to a zero value. Note also that only BLBxx bits can be programmed by this command.

Parameters
  • lock_bits: A mask of which Boot Loader Lock Bits to set.

boot_lock_bits_set (_BV (BLB11));

Note

Like any lock bits, the Boot Loader Lock Bits, once set, cannot be cleared again except by a chip erase which will in turn also erase the boot loader itself.

boot_page_fill_safe(address, data)

Same as boot_page_fill() except it waits for eeprom and spm operations to complete before filling the page.

boot_page_erase_safe(address)

Same as boot_page_erase() except it waits for eeprom and spm operations to complete before erasing the page.

boot_page_write_safe(address)

Same as boot_page_write() except it waits for eeprom and spm operations to complete before writing the page.

boot_rww_enable_safe()

Same as boot_rww_enable() except waits for eeprom and spm operations to complete before enabling the RWW mameory.

boot_lock_bits_set_safe(lock_bits)

Same as boot_lock_bits_set() except waits for eeprom and spm operations to complete before setting the lock bits.

file boot.h
#include <avr/eeprom.h>#include <avr/io.h>#include <inttypes.h>#include <limits.h>

Defines

BOOTLOADER_SECTION

Used to declare a function or variable to be placed into a new section called .bootloader. This section and its contents can then be relocated to any address (such as the bootloader NRWW area) at link-time.

__COMMON_ASB
__COMMON_ASRE
BLB12
BLB11
BLB02
BLB01
boot_spm_interrupt_enable()

Enable the SPM interrupt.

boot_spm_interrupt_disable()

Disable the SPM interrupt.

boot_is_spm_interrupt()

Check if the SPM interrupt is enabled.

boot_rww_busy()

Check if the RWW section is busy.

boot_spm_busy()

Check if the SPM instruction is busy.

boot_spm_busy_wait()

Wait while the SPM instruction is busy.

__BOOT_PAGE_ERASE
__BOOT_PAGE_WRITE
__BOOT_PAGE_FILL
__BOOT_RWW_ENABLE
__BOOT_LOCK_BITS_SET
__boot_page_fill_short(address, data)
__boot_page_fill_normal(address, data)
__boot_page_fill_alternate(address, data)
__boot_page_fill_extended(address, data)
__boot_page_fill_extended_short(address, data)
__boot_page_erase_short(address)
__boot_page_erase_normal(address)
__boot_page_erase_alternate(address)
__boot_page_erase_extended(address)
__boot_page_erase_extended_short(address)
__boot_page_write_short(address)
__boot_page_write_normal(address)
__boot_page_write_alternate(address)
__boot_page_write_extended(address)
__boot_page_write_extended_short(address)
__boot_rww_enable_short()
__boot_rww_enable()
__boot_rww_enable_alternate()
__boot_lock_bits_set_short(lock_bits)
__boot_lock_bits_set(lock_bits)
__boot_lock_bits_set_alternate(lock_bits)
GET_LOW_FUSE_BITS

address to read the low fuse bits, using boot_lock_fuse_bits_get

GET_LOCK_BITS

address to read the lock bits, using boot_lock_fuse_bits_get

GET_EXTENDED_FUSE_BITS

address to read the extended fuse bits, using boot_lock_fuse_bits_get

GET_HIGH_FUSE_BITS

address to read the high fuse bits, using boot_lock_fuse_bits_get

boot_lock_fuse_bits_get_short(address)
boot_lock_fuse_bits_get(address)

Read the lock or fuse bits at address.

Parameter address can be any of GET_LOW_FUSE_BITS, GET_LOCK_BITS, GET_EXTENDED_FUSE_BITS, or GET_HIGH_FUSE_BITS.

Note

The lock and fuse bits returned are the physical values, i.e. a bit returned as 0 means the corresponding fuse or lock bit is programmed.

__BOOT_SIGROW_READ
boot_signature_byte_get_short(addr)
boot_signature_byte_get(addr)

Read the Signature Row byte at address. For some MCU types, this function can also retrieve the factory-stored oscillator calibration bytes.

Parameter address can be 0-0x1f as documented by the datasheet.

Note

The values are MCU type dependent.

boot_page_fill(address, data)

Fill the bootloader temporary page buffer for flash address with data word.

Note

The address is a byte address. The data is a word. The AVR writes data to the buffer a word at a time, but addresses the buffer per byte! So, increment your address by 2 between calls, and send 2 data bytes in a word format! The LSB of the data is written to the lower address; the MSB of the data is written to the higher address.

boot_page_erase(address)

Erase the flash page that contains address.

Note

address is a byte address in flash, not a word address.

boot_page_write(address)

Write the bootloader temporary page buffer to flash page that contains address.

Note

address is a byte address in flash, not a word address.

boot_rww_enable()

Enable the Read-While-Write memory section.

boot_lock_bits_set(lock_bits)

Set the bootloader lock bits.

For example, to disallow the SPM instruction from writing to the Boot Loader memory section of flash, you would use this macro as such:

Note

In this context, a 'set bit' will be written to a zero value. Note also that only BLBxx bits can be programmed by this command.

Parameters
  • lock_bits: A mask of which Boot Loader Lock Bits to set.

boot_lock_bits_set (_BV (BLB11));

Note

Like any lock bits, the Boot Loader Lock Bits, once set, cannot be cleared again except by a chip erase which will in turn also erase the boot loader itself.

boot_page_fill_safe(address, data)

Same as boot_page_fill() except it waits for eeprom and spm operations to complete before filling the page.

boot_page_erase_safe(address)

Same as boot_page_erase() except it waits for eeprom and spm operations to complete before erasing the page.

boot_page_write_safe(address)

Same as boot_page_write() except it waits for eeprom and spm operations to complete before writing the page.

boot_rww_enable_safe()

Same as boot_rww_enable() except waits for eeprom and spm operations to complete before enabling the RWW mameory.

boot_lock_bits_set_safe(lock_bits)

Same as boot_lock_bits_set() except waits for eeprom and spm operations to complete before setting the lock bits.

file diskio.c
#include "pff/src/pff.h"#include "pff/src/diskio.h"

Defines

CMD0
CMD1
ACMD41
CMD8
CMD16
CMD17
CMD24
CMD55
CMD58
CT_MMC
CT_SD1
CT_SD2
CT_BLOCK

Functions

void init_spi(void)

Init SPI library.

Return

void.

void deselect(void)
void select(void)
void xmit_spi(BYTE d)
BYTE rcv_spi(void)
void dly_100us(void)
static BYTE send_cmd(BYTE cmd, DWORD arg)
DSTATUS disk_initialize(void)
DRESULT disk_readp(BYTE *buff, DWORD sector, UINT offset, UINT count)

Variables

static BYTE CardType
file diskio.c
#include "diskio.h"

Functions

DSTATUS disk_initialize(void)
DRESULT disk_readp(BYTE *buff, DWORD sector, UINT offset, UINT count)
DRESULT disk_writep(BYTE *buff, DWORD sc)
file diskio.c
#include "pff/src/pff.h"#include "pff/src/diskio.h"

Defines

CMD0
CMD1
ACMD41
CMD8
CMD16
CMD17
CMD24
CMD55
CMD58
CT_MMC
CT_SD1
CT_SD2
CT_BLOCK

Functions

void init_spi(void)

Init SPI library.

Return

void.

void deselect(void)
void select(void)
void xmit_spi(BYTE d)
BYTE rcv_spi(void)
void dly_100us(void)
static BYTE send_cmd(BYTE cmd, DWORD arg)
DSTATUS disk_initialize(void)
DRESULT disk_readp(BYTE *buff, DWORD sector, UINT offset, UINT count)

Variables

static BYTE CardType
file diskio.c
#include "diskio.h"

Functions

DSTATUS disk_initialize(void)
DRESULT disk_readp(BYTE *buff, DWORD sector, UINT offset, UINT count)
DRESULT disk_writep(BYTE *buff, DWORD sc)
file optiboot.c
#include <inttypes.h>#include <avr/io.h>#include <avr/pgmspace.h>#include <avr/eeprom.h>#include <string.h>#include "pff/src/pff.h"#include "boot.h"#include "pin_defs.h"#include "stk500.h"

Defines

FUNC_READ
FUNC_WRITE
OPTIBOOT_MAJVER
OPTIBOOT_MINVER
OPTIBOOT_CUSTOMVER
PGM_READ_BYTE(x)
UART_REPORT
LED_START_FLASHES
BAUD_RATE
UART
BAUD_SETTING
BAUD_ACTUAL
BAUD_ERROR
WATCHDOG_OFF
WATCHDOG_16MS
WATCHDOG_32MS
WATCHDOG_64MS
WATCHDOG_125MS
WATCHDOG_250MS
WATCHDOG_500MS
WATCHDOG_1S
WATCHDOG_2S
WATCHDOG_4S
WATCHDOG_8S
GETLENGTH(len)
RAMSTART
buff
appstart_vec

Functions

unsigned const int __attribute__ ((section(".version")))
static uint8_t pagecmp()
uint8_t doFlash()
void checkFile()
void UART_puts(const char *str)
void UART_newline(void)
void UART_putnibble(uint8_t c)
void UART_puthex(uint8_t c)
void UART_puthex16(uint16_t n)
void UART_puthex32(uint32_t n)
void UART_putsP(const char *str, uint16_t n)
int main(void)
void putch(char ch)
uint8_t getch(void)
void getNch(uint8_t count)
void verifySpace()
void watchdogReset()
void watchdogConfig(uint8_t x)
void appStart(uint8_t rstFlags)
static inline void writebuffer(int8_t memtype, uint8_t *mybuff, uint16_t address, pagelen_t len)
static inline void read_mem(uint8_t memtype, uint16_t address, pagelen_t length)

Variables

const char filename[13] = "FIRMWARE.BIN\0"
file optiboot.c
#include <inttypes.h>#include <avr/io.h>#include <avr/pgmspace.h>#include <avr/eeprom.h>#include <string.h>#include "pff/src/pff.h"#include "ihex/kk_ihex_read.h"#include "boot.h"#include "pin_defs.h"#include "stk500.h"

Defines

FUNC_READ
FUNC_WRITE
OPTIBOOT_MAJVER
OPTIBOOT_MINVER
OPTIBOOT_CUSTOMVER
PGM_READ_BYTE(x)
UART_REPORT
LED_START_FLASHES
BAUD_RATE
UART
BAUD_SETTING
BAUD_ACTUAL
BAUD_ERROR
WATCHDOG_OFF
WATCHDOG_16MS
WATCHDOG_32MS
WATCHDOG_64MS
WATCHDOG_125MS
WATCHDOG_250MS
WATCHDOG_500MS
WATCHDOG_1S
WATCHDOG_2S
WATCHDOG_4S
WATCHDOG_8S
GETLENGTH(len)
RAMSTART
buff
appstart_vec

Functions

unsigned const int __attribute__ ((section(".version")))
void write_flash_page()
static uint8_t pagecmp()
uint8_t doFlash()
void checkFile()
void UART_puts(const char *str)
void UART_newline(void)
void UART_putnibble(uint8_t c)
void UART_puthex(uint8_t c)
void UART_puthex16(uint16_t n)
void UART_puthex32(uint32_t n)
void UART_putsP(const char *str, uint16_t n)
int main(void)
void putch(char ch)
uint8_t getch(void)
void getNch(uint8_t count)
void verifySpace()
void watchdogReset()
void watchdogConfig(uint8_t x)
void appStart(uint8_t rstFlags)
static inline void writebuffer(int8_t memtype, uint8_t *mybuff, uint16_t address, pagelen_t len)
static inline void read_mem(uint8_t memtype, uint16_t address, pagelen_t length)

Variables

const char filename[13] = "FIRMWARE.BIN\0"
file diskio.h
#include "integer.h"

Defines

STA_NOINIT
STA_NODISK

Typedefs

typedef BYTE DSTATUS

Enums

enum DRESULT

Values:

enumerator RES_OK
enumerator RES_ERROR
enumerator RES_NOTRDY
enumerator RES_PARERR
enumerator RES_OK
enumerator RES_ERROR
enumerator RES_NOTRDY
enumerator RES_PARERR

Functions

DSTATUS disk_initialize(void)
DRESULT disk_readp(BYTE *buff, DWORD sector, UINT offser, UINT count)
DRESULT disk_writep(const BYTE *buff, DWORD sc)
file diskio.h
#include "integer.h"

Defines

STA_NOINIT
STA_NODISK

Typedefs

typedef BYTE DSTATUS

Enums

enum DRESULT

Values:

enumerator RES_OK
enumerator RES_ERROR
enumerator RES_NOTRDY
enumerator RES_PARERR
enumerator RES_OK
enumerator RES_ERROR
enumerator RES_NOTRDY
enumerator RES_PARERR

Functions

DSTATUS disk_initialize(void)
DRESULT disk_readp(BYTE *buff, DWORD sector, UINT offser, UINT count)
DRESULT disk_writep(const BYTE *buff, DWORD sc)
file integer.h

Typedefs

typedef unsigned char BYTE
typedef short SHORT
typedef unsigned short WORD
typedef unsigned short WCHAR
typedef int INT
typedef unsigned int UINT
typedef long LONG
typedef unsigned long DWORD
file integer.h

Typedefs

typedef unsigned char BYTE
typedef short SHORT
typedef unsigned short WORD
typedef unsigned short WCHAR
typedef int INT
typedef unsigned int UINT
typedef long LONG
typedef unsigned long DWORD
file pff.c
#include "pff.h"#include "diskio.h"

Defines

_FS_32ONLY
ABORT(err)
_EXCVT
IsUpper(c)
IsLower(c)
IsDBCS1(c)
IsDBCS2(c)
BS_jmpBoot
BS_OEMName
BPB_BytsPerSec
BPB_SecPerClus
BPB_RsvdSecCnt
BPB_NumFATs
BPB_RootEntCnt
BPB_TotSec16
BPB_Media
BPB_FATSz16
BPB_SecPerTrk
BPB_NumHeads
BPB_HiddSec
BPB_TotSec32
BS_55AA
BS_DrvNum
BS_BootSig
BS_VolID
BS_VolLab
BS_FilSysType
BPB_FATSz32
BPB_ExtFlags
BPB_FSVer
BPB_RootClus
BPB_FSInfo
BPB_BkBootSec
BS_DrvNum32
BS_BootSig32
BS_VolID32
BS_VolLab32
BS_FilSysType32
MBR_Table
DIR_Name
DIR_Attr
DIR_NTres
DIR_CrtTime
DIR_CrtDate
DIR_FstClusHI
DIR_WrtTime
DIR_WrtDate
DIR_FstClusLO
DIR_FileSize

Functions

static void mem_set(void *dst, int val, int cnt)
static int mem_cmp(const void *dst, const void *src, int cnt)
static CLUST get_fat(CLUST clst)
static DWORD clust2sect(CLUST clst)
static CLUST get_clust(BYTE *dir)
static FRESULT dir_rewind(DIR *dj)
static FRESULT dir_next(DIR *dj)
static FRESULT dir_find(DIR *dj, BYTE *dir)
static FRESULT create_name(DIR *dj, const char **path)
static FRESULT follow_path(DIR *dj, BYTE *dir, const char *path)
static BYTE check_fs(BYTE *buf, DWORD sect)
FRESULT pf_mount(FATFS *fs)
FRESULT pf_open(const char *path)
FRESULT pf_read(void *buff, UINT btr)

Variables

static FATFS *FatFs
file pff.c
#include "pff.h"#include "diskio.h"

Defines

_FS_32ONLY
ABORT(err)
_EXCVT
IsUpper(c)
IsLower(c)
IsDBCS1(c)
IsDBCS2(c)
BS_jmpBoot
BS_OEMName
BPB_BytsPerSec
BPB_SecPerClus
BPB_RsvdSecCnt
BPB_NumFATs
BPB_RootEntCnt
BPB_TotSec16
BPB_Media
BPB_FATSz16
BPB_SecPerTrk
BPB_NumHeads
BPB_HiddSec
BPB_TotSec32
BS_55AA
BS_DrvNum
BS_BootSig
BS_VolID
BS_VolLab
BS_FilSysType
BPB_FATSz32
BPB_ExtFlags
BPB_FSVer
BPB_RootClus
BPB_FSInfo
BPB_BkBootSec
BS_DrvNum32
BS_BootSig32
BS_VolID32
BS_VolLab32
BS_FilSysType32
MBR_Table
DIR_Name
DIR_Attr
DIR_NTres
DIR_CrtTime
DIR_CrtDate
DIR_FstClusHI
DIR_WrtTime
DIR_WrtDate
DIR_FstClusLO
DIR_FileSize

Functions

static void mem_set(void *dst, int val, int cnt)
static int mem_cmp(const void *dst, const void *src, int cnt)
static CLUST get_fat(CLUST clst)
static DWORD clust2sect(CLUST clst)
static CLUST get_clust(BYTE *dir)
static FRESULT dir_rewind(DIR *dj)
static FRESULT dir_next(DIR *dj)
static FRESULT dir_find(DIR *dj, BYTE *dir)
static FRESULT create_name(DIR *dj, const char **path)
static FRESULT follow_path(DIR *dj, BYTE *dir, const char *path)
static BYTE check_fs(BYTE *buf, DWORD sect)
FRESULT pf_mount(FATFS *fs)
FRESULT pf_open(const char *path)
FRESULT pf_read(void *buff, UINT btr)

Variables

static FATFS *FatFs
file pff.h
#include "integer.h"#include "pffconf.h"

Defines

_PFATFS
CLUST
FA_OPENED
FA_WPRT
FA__WIP
FS_FAT12
FS_FAT16
FS_FAT32
AM_RDO
AM_HID
AM_SYS
AM_VOL
AM_LFN
AM_DIR
AM_ARC
AM_MASK
LD_WORD(ptr)
LD_DWORD(ptr)
ST_WORD(ptr, val)
ST_DWORD(ptr, val)

Enums

enum FRESULT

Values:

enumerator FR_OK
enumerator FR_DISK_ERR
enumerator FR_NOT_READY
enumerator FR_NO_FILE
enumerator FR_NOT_OPENED
enumerator FR_NOT_ENABLED
enumerator FR_NO_FILESYSTEM
enumerator FR_OK
enumerator FR_DISK_ERR
enumerator FR_NOT_READY
enumerator FR_NO_FILE
enumerator FR_NOT_OPENED
enumerator FR_NOT_ENABLED
enumerator FR_NO_FILESYSTEM

Functions

FRESULT pf_mount(FATFS *fs)
FRESULT pf_open(const char *path)
FRESULT pf_read(void *buff, UINT btr)
FRESULT pf_write(const void *buff, UINT btw, UINT *bw)
FRESULT pf_lseek(DWORD ofs)
FRESULT pf_opendir(DIR *dj, const char *path)
FRESULT pf_readdir(DIR *dj, FILINFO *fno)
file pff.h
#include "integer.h"#include "pffconf.h"

Defines

_PFATFS
CLUST
FA_OPENED
FA_WPRT
FA__WIP
FS_FAT12
FS_FAT16
FS_FAT32
AM_RDO
AM_HID
AM_SYS
AM_VOL
AM_LFN
AM_DIR
AM_ARC
AM_MASK
LD_WORD(ptr)
LD_DWORD(ptr)
ST_WORD(ptr, val)
ST_DWORD(ptr, val)

Enums

enum FRESULT

Values:

enumerator FR_OK
enumerator FR_DISK_ERR
enumerator FR_NOT_READY
enumerator FR_NO_FILE
enumerator FR_NOT_OPENED
enumerator FR_NOT_ENABLED
enumerator FR_NO_FILESYSTEM
enumerator FR_OK
enumerator FR_DISK_ERR
enumerator FR_NOT_READY
enumerator FR_NO_FILE
enumerator FR_NOT_OPENED
enumerator FR_NOT_ENABLED
enumerator FR_NO_FILESYSTEM

Functions

FRESULT pf_mount(FATFS *fs)
FRESULT pf_open(const char *path)
FRESULT pf_read(void *buff, UINT btr)
FRESULT pf_write(const void *buff, UINT btw, UINT *bw)
FRESULT pf_lseek(DWORD ofs)
FRESULT pf_opendir(DIR *dj, const char *path)
FRESULT pf_readdir(DIR *dj, FILINFO *fno)
file pffconf.h

Defines

_PFFCONF
_USE_MINIMALISTIC_PFF
_USE_READ
_USE_DIR
_USE_LSEEK
_USE_WRITE
_FS_FAT12
_FS_FAT16
_FS_FAT32
_USE_LCC
_CODE_PAGE
_WORD_ACCESS
file pffconf.h

Defines

_PFFCONF
_USE_MINIMALISTIC_PFF
_USE_READ
_USE_DIR
_USE_LSEEK
_USE_WRITE
_FS_FAT12
_FS_FAT16
_FS_FAT32
_USE_LCC
_CODE_PAGE
_WORD_ACCESS
file pin_defs.h

Defines

UART_SRA
UART_SRB
UART_SRC
UART_SRL
UART_UDR
A0
A1
A2
A3
A4
A5
A6
A7
B0
B1
B2
B3
B4
B5
B6
B7
C0
C1
C2
C3
C4
C5
C6
C7
D0
D1
D2
D3
D4
D5
D6
D7
E0
E1
E2
E3
E4
E5
E6
E7
F0
F1
F2
F3
F4
F5
F6
F7
G0
G1
G2
G3
G4
G5
G6
G7
H0
H1
H2
H3
H4
H5
H6
H7
J0
J1
J2
J3
J4
J5
J6
J7
K0
K1
K2
K3
K4
K5
K6
K7
L0
L1
L2
L3
L4
L5
L6
L7
file pin_defs.h

Defines

UART_SRA
UART_SRB
UART_SRC
UART_SRL
UART_UDR
A0
A1
A2
A3
A4
A5
A6
A7
B0
B1
B2
B3
B4
B5
B6
B7
C0
C1
C2
C3
C4
C5
C6
C7
D0
D1
D2
D3
D4
D5
D6
D7
E0
E1
E2
E3
E4
E5
E6
E7
F0
F1
F2
F3
F4
F5
F6
F7
G0
G1
G2
G3
G4
G5
G6
G7
H0
H1
H2
H3
H4
H5
H6
H7
J0
J1
J2
J3
J4
J5
J6
J7
K0
K1
K2
K3
K4
K5
K6
K7
L0
L1
L2
L3
L4
L5
L6
L7
file spi_pins.h
file spi_pins.h
file stk500.h

Defines

STK_OK
STK_FAILED
STK_UNKNOWN
STK_NODEVICE
STK_INSYNC
STK_NOSYNC
ADC_CHANNEL_ERROR
ADC_MEASURE_OK
PWM_CHANNEL_ERROR
PWM_ADJUST_OK
CRC_EOP
STK_GET_SYNC
STK_GET_SIGN_ON
STK_SET_PARAMETER
STK_GET_PARAMETER
STK_SET_DEVICE
STK_SET_DEVICE_EXT
STK_ENTER_PROGMODE
STK_LEAVE_PROGMODE
STK_CHIP_ERASE
STK_CHECK_AUTOINC
STK_LOAD_ADDRESS
STK_UNIVERSAL
STK_PROG_FLASH
STK_PROG_DATA
STK_PROG_FUSE
STK_PROG_LOCK
STK_PROG_PAGE
STK_PROG_FUSE_EXT
STK_READ_FLASH
STK_READ_DATA
STK_READ_FUSE
STK_READ_LOCK
STK_READ_PAGE
STK_READ_SIGN
STK_READ_OSCCAL
STK_READ_FUSE_EXT
STK_READ_OSCCAL_EXT
STK_SW_MAJOR
STK_SW_MINOR
file stk500.h

Defines

STK_OK
STK_FAILED
STK_UNKNOWN
STK_NODEVICE
STK_INSYNC
STK_NOSYNC
ADC_CHANNEL_ERROR
ADC_MEASURE_OK
PWM_CHANNEL_ERROR
PWM_ADJUST_OK
CRC_EOP
STK_GET_SYNC
STK_GET_SIGN_ON
STK_SET_PARAMETER
STK_GET_PARAMETER
STK_SET_DEVICE
STK_SET_DEVICE_EXT
STK_ENTER_PROGMODE
STK_LEAVE_PROGMODE
STK_CHIP_ERASE
STK_CHECK_AUTOINC
STK_LOAD_ADDRESS
STK_UNIVERSAL
STK_PROG_FLASH
STK_PROG_DATA
STK_PROG_FUSE
STK_PROG_LOCK
STK_PROG_PAGE
STK_PROG_FUSE_EXT
STK_READ_FLASH
STK_READ_DATA
STK_READ_FUSE
STK_READ_LOCK
STK_READ_PAGE
STK_READ_SIGN
STK_READ_OSCCAL
STK_READ_FUSE_EXT
STK_READ_OSCCAL_EXT
STK_SW_MAJOR
STK_SW_MINOR
file kk_ihex.h
#include <stdint.h>

Defines

KK_IHEX_VERSION
IHEX_LINE_MAX_LENGTH
IHEX_LINEAR_ADDRESS(ihex)
IHEX_BYTE_ADDRESS(ihex, byte_index)
IHEX_NEWLINE_STRING

Typedefs

typedef uint_fast8_t ihex_bool_t
typedef uint_least32_t ihex_address_t
typedef uint_least16_t ihex_segment_t
typedef int ihex_count_t
typedef uint8_t ihex_flags_t
typedef struct ihex_state kk_ihex_t
typedef uint8_t ihex_record_type_t

Enums

enum ihex_flags

Values:

enumerator IHEX_FLAG_ADDRESS_OVERFLOW
enum ihex_record_type

Values:

enumerator IHEX_DATA_RECORD
enumerator IHEX_END_OF_FILE_RECORD
enumerator IHEX_EXTENDED_SEGMENT_ADDRESS_RECORD
enumerator IHEX_START_SEGMENT_ADDRESS_RECORD
enumerator IHEX_EXTENDED_LINEAR_ADDRESS_RECORD
enumerator IHEX_START_LINEAR_ADDRESS_RECORD
file kk_ihex_read.c
#include "kk_ihex_read.h"

Defines

IHEX_START
ADDRESS_HIGH_MASK
IHEX_READ_RECORD_TYPE_MASK
IHEX_READ_STATE_MASK
IHEX_READ_STATE_OFFSET

Enums

enum ihex_read_state

Values:

enumerator READ_WAIT_FOR_START
enumerator READ_COUNT_HIGH
enumerator READ_COUNT_LOW
enumerator READ_ADDRESS_MSB_HIGH
enumerator READ_ADDRESS_MSB_LOW
enumerator READ_ADDRESS_LSB_HIGH
enumerator READ_ADDRESS_LSB_LOW
enumerator READ_RECORD_TYPE_HIGH
enumerator READ_RECORD_TYPE_LOW
enumerator READ_DATA_HIGH
enumerator READ_DATA_LOW

Functions

void ihex_begin_read(struct ihex_state *const ihex)
void ihex_read_at_address(struct ihex_state *const ihex, ihex_address_t address)
void ihex_read_at_segment(struct ihex_state *const ihex, ihex_segment_t segment)
void ihex_end_read(struct ihex_state *const ihex)
void ihex_read_byte(struct ihex_state *const ihex, const char byte)
void ihex_read_bytes (struct ihex_state *restrict ihex, const char *restrict data, ihex_count_t count)
file kk_ihex_read.h
#include "kk_ihex.h"

Functions

void ihex_begin_read(struct ihex_state *ihex)
void ihex_read_at_address(struct ihex_state *ihex, ihex_address_t address)
void ihex_read_byte(struct ihex_state *ihex, char chr)
void ihex_read_bytes (struct ihex_state *restrict ihex, const char *restrict data, ihex_count_t count)
void ihex_end_read(struct ihex_state *ihex)
ihex_bool_t ihex_data_read(struct ihex_state *ihex, ihex_record_type_t type, ihex_bool_t checksum_mismatch)
void ihex_read_at_segment(struct ihex_state *ihex, ihex_segment_t segment)
file README.md
file PetitFS.ino
#include "PetitFS.h"#include "kk_ihex_read.h"

Functions

ihex_bool_t ihex_data_read(struct ihex_state *ihex, ihex_record_type_t type, ihex_bool_t checksum_error)
void ihex_read()
void setup()
void loop()

Variables

FATFS fs
file debug_config.h

Defines

SDCARD_LOGGING_FILE_NAME

File name for logging on SD-Card.

ENABLE_SDCARD_LOGGING

Enable logging on SDcard define to 1 the macro to enable logging on a file on SDcard.

LOG_LEVEL

logging level at compile time Available levels are: LOG_LEVEL_SILENT LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARNING LOG_LEVEL_NOTICE LOG_LEVEL_TRACE LOG_LEVEL_VERBOSE

DEBUG_MEMORY

Activate debug of memory use and stack heap collision on serial interface.

LCD_TRACE_LEVEL_OFF

Debug level for print error message on lcd interface.

LCD_TRACE_LEVEL_ERROR

Debug level for print error message on lcd.

LCD_TRACE_LEVEL_WARNING

Debug level for print detailed informations message on serial interface.

LCD_TRACE_LEVEL_INFO

Debug level for print informations message on lcd.

LCD_TRACE_LEVEL_DEBUG

Debug level for print verbose informations message on lcd.

OK_STRING

"OK" string message.

ERROR_STRING

"ERROR" string message.

FAIL_STRING

"FAIL" string message.

YES_STRING

"YES" string message.

NO_STRING

"NO" string message.

ON_STRING

"ON" string message.

OFF_STRING

"OFF" string message.

SAVE_STRING

"SAVE" string message.

STIMA_LCD_TRACE_LEVEL

Lcd trace level debug for stima sketch.

file debug_config.h

Defines

SDCARD_LOGGING_FILE_NAME

File name for logging on SD-Card.

ENABLE_SDCARD_LOGGING

Enable logging on SDcard define to 1 the macro to enable logging on a file on SDcard.

LOG_LEVEL

logging level at compile time Available levels are: LOG_LEVEL_SILENT LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARNING LOG_LEVEL_NOTICE LOG_LEVEL_TRACE LOG_LEVEL_VERBOSE

DEBUG_MEMORY

Activate debug of memory use and stack heap collision on serial interface.

LCD_TRACE_LEVEL_OFF

Debug level for print error message on lcd interface.

LCD_TRACE_LEVEL_ERROR

Debug level for print error message on lcd.

LCD_TRACE_LEVEL_WARNING

Debug level for print detailed informations message on serial interface.

LCD_TRACE_LEVEL_INFO

Debug level for print informations message on lcd.

LCD_TRACE_LEVEL_DEBUG

Debug level for print verbose informations message on lcd.

OK_STRING

"OK" string message.

ERROR_STRING

"ERROR" string message.

FAIL_STRING

"FAIL" string message.

YES_STRING

"YES" string message.

NO_STRING

"NO" string message.

ON_STRING

"ON" string message.

OFF_STRING

"OFF" string message.

SAVE_STRING

"SAVE" string message.

STIMA_LCD_TRACE_LEVEL

Lcd trace level debug for stima sketch.

file debug_config.h

Defines

SDCARD_LOGGING_FILE_NAME

File name for logging on SD-Card.

ENABLE_SDCARD_LOGGING

Enable logging on SDcard define to 1 the macro to enable logging on a file on SDcard.

LOG_LEVEL

logging level at compile time Available levels are: LOG_LEVEL_SILENT LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARNING LOG_LEVEL_NOTICE LOG_LEVEL_TRACE LOG_LEVEL_VERBOSE

DEBUG_MEMORY

Activate debug of memory use and stack heap collision on serial interface.

LCD_TRACE_LEVEL_OFF

Debug level for print error message on lcd interface.

LCD_TRACE_LEVEL_ERROR

Debug level for print error message on lcd.

LCD_TRACE_LEVEL_WARNING

Debug level for print detailed informations message on serial interface.

LCD_TRACE_LEVEL_INFO

Debug level for print informations message on lcd.

LCD_TRACE_LEVEL_DEBUG

Debug level for print verbose informations message on lcd.

OK_STRING

"OK" string message.

ERROR_STRING

"ERROR" string message.

FAIL_STRING

"FAIL" string message.

YES_STRING

"YES" string message.

NO_STRING

"NO" string message.

ON_STRING

"ON" string message.

OFF_STRING

"OFF" string message.

SAVE_STRING

"SAVE" string message.

STIMA_LCD_TRACE_LEVEL

Lcd trace level debug for stima sketch.

file debug_config.h

Defines

SDCARD_LOGGING_FILE_NAME

File name for logging on SD-Card.

ENABLE_SDCARD_LOGGING

Enable logging on SDcard define to 1 the macro to enable logging on a file on SDcard.

LOG_LEVEL

logging level at compile time Available levels are: LOG_LEVEL_SILENT LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARNING LOG_LEVEL_NOTICE LOG_LEVEL_TRACE LOG_LEVEL_VERBOSE

DEBUG_MEMORY

Activate debug of memory use and stack heap collision on serial interface.

LCD_TRACE_LEVEL_OFF

Debug level for print error message on lcd interface.

LCD_TRACE_LEVEL_ERROR

Debug level for print error message on lcd.

LCD_TRACE_LEVEL_WARNING

Debug level for print detailed informations message on serial interface.

LCD_TRACE_LEVEL_INFO

Debug level for print informations message on lcd.

LCD_TRACE_LEVEL_DEBUG

Debug level for print verbose informations message on lcd.

OK_STRING

"OK" string message.

ERROR_STRING

"ERROR" string message.

FAIL_STRING

"FAIL" string message.

YES_STRING

"YES" string message.

NO_STRING

"NO" string message.

ON_STRING

"ON" string message.

OFF_STRING

"OFF" string message.

SAVE_STRING

"SAVE" string message.

STIMA_LCD_TRACE_LEVEL

Lcd trace level debug for stima sketch.

file debug_config.h

Defines

SDCARD_LOGGING_FILE_NAME

File name for logging on SD-Card.

ENABLE_SDCARD_LOGGING

Enable logging on SDcard define to 1 the macro to enable logging on a file on SDcard.

LOG_LEVEL

logging level at compile time Available levels are: LOG_LEVEL_SILENT LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARNING LOG_LEVEL_NOTICE LOG_LEVEL_TRACE LOG_LEVEL_VERBOSE

DEBUG_MEMORY

Activate debug of memory use and stack heap collision on serial interface.

LCD_TRACE_LEVEL_OFF

Debug level for print error message on lcd interface.

LCD_TRACE_LEVEL_ERROR

Debug level for print error message on lcd.

LCD_TRACE_LEVEL_WARNING

Debug level for print detailed informations message on serial interface.

LCD_TRACE_LEVEL_INFO

Debug level for print informations message on lcd.

LCD_TRACE_LEVEL_DEBUG

Debug level for print verbose informations message on lcd.

OK_STRING

"OK" string message.

ERROR_STRING

"ERROR" string message.

FAIL_STRING

"FAIL" string message.

YES_STRING

"YES" string message.

NO_STRING

"NO" string message.

ON_STRING

"ON" string message.

OFF_STRING

"OFF" string message.

SAVE_STRING

"SAVE" string message.

STIMA_LCD_TRACE_LEVEL

Lcd trace level debug for stima sketch.

file debug_config.h

Defines

SDCARD_LOGGING_FILE_NAME

File name for logging on SD-Card.

ENABLE_SDCARD_LOGGING

Enable logging on SDcard define to 1 the macro to enable logging on a file on SDcard.

LOG_LEVEL

logging level at compile time Available levels are: LOG_LEVEL_SILENT LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARNING LOG_LEVEL_NOTICE LOG_LEVEL_TRACE LOG_LEVEL_VERBOSE

DEBUG_MEMORY

Activate debug of memory use and stack heap collision on serial interface.

LCD_TRACE_LEVEL_OFF

Debug level for print error message on lcd interface.

LCD_TRACE_LEVEL_ERROR

Debug level for print error message on lcd.

LCD_TRACE_LEVEL_WARNING

Debug level for print detailed informations message on serial interface.

LCD_TRACE_LEVEL_INFO

Debug level for print informations message on lcd.

LCD_TRACE_LEVEL_DEBUG

Debug level for print verbose informations message on lcd.

OK_STRING

"OK" string message.

ERROR_STRING

"ERROR" string message.

FAIL_STRING

"FAIL" string message.

YES_STRING

"YES" string message.

NO_STRING

"NO" string message.

ON_STRING

"ON" string message.

OFF_STRING

"OFF" string message.

SAVE_STRING

"SAVE" string message.

STIMA_LCD_TRACE_LEVEL

Lcd trace level debug for stima sketch.

file debug_config.h

Defines

SDCARD_LOGGING_FILE_NAME

File name for logging on SD-Card.

ENABLE_SDCARD_LOGGING

Enable logging on SDcard define to 1 the macro to enable logging on a file on SDcard.

LOG_LEVEL

logging level at compile time Available levels are: LOG_LEVEL_SILENT LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARNING LOG_LEVEL_NOTICE LOG_LEVEL_TRACE LOG_LEVEL_VERBOSE

DEBUG_MEMORY

Activate debug of memory use and stack heap collision on serial interface.

LCD_TRACE_LEVEL_OFF

Debug level for print error message on lcd interface.

LCD_TRACE_LEVEL_ERROR

Debug level for print error message on lcd.

LCD_TRACE_LEVEL_WARNING

Debug level for print detailed informations message on serial interface.

LCD_TRACE_LEVEL_INFO

Debug level for print informations message on lcd.

LCD_TRACE_LEVEL_DEBUG

Debug level for print verbose informations message on lcd.

OK_STRING

"OK" string message.

ERROR_STRING

"ERROR" string message.

FAIL_STRING

"FAIL" string message.

YES_STRING

"YES" string message.

NO_STRING

"NO" string message.

ON_STRING

"ON" string message.

OFF_STRING

"OFF" string message.

SAVE_STRING

"SAVE" string message.

STIMA_LCD_TRACE_LEVEL

Lcd trace level debug for stima sketch.

file debug_config.h

Defines

ENABLE_SDCARD_LOGGING

Enable logging on SDcard define to 1 the macro to enable logging on a file on SDcard.

LOG_LEVEL

logging level at compile time Available levels are: LOG_LEVEL_SILENT LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARNING LOG_LEVEL_NOTICE LOG_LEVEL_TRACE LOG_LEVEL_VERBOSE

DEBUG_MEMORY

Activate debug of memory use and stack heap collision on serial interface.

OK_STRING

"OK" string message.

ERROR_STRING

"ERROR" string message.

FAIL_STRING

"FAIL" string message.

YES_STRING

"YES" string message.

NO_STRING

"NO" string message.

ON_STRING

"ON" string message.

OFF_STRING

"OFF" string message.

SAVE_STRING

"SAVE" string message.

STIMA_LCD_TRACE_LEVEL

Lcd trace level debug for stima sketch.

file debug_config.h

Defines

ENABLE_SDCARD_LOGGING

Enable logging on SDcard define to 1 the macro to enable logging on a file on SDcard.

LOG_LEVEL

logging level at compile time Available levels are: LOG_LEVEL_SILENT LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARNING LOG_LEVEL_NOTICE LOG_LEVEL_TRACE LOG_LEVEL_VERBOSE

DEBUG_MEMORY

Activate debug of memory use and stack heap collision on serial interface.

LCD_TRACE_LEVEL_OFF

Debug level for print error message on lcd interface.

LCD_TRACE_LEVEL_ERROR

Debug level for print error message on lcd.

LCD_TRACE_LEVEL_WARNING

Debug level for print detailed informations message on serial interface.

LCD_TRACE_LEVEL_INFO

Debug level for print informations message on lcd.

LCD_TRACE_LEVEL_DEBUG

Debug level for print verbose informations message on lcd.

OK_STRING

"OK" string message.

ERROR_STRING

"ERROR" string message.

FAIL_STRING

"FAIL" string message.

YES_STRING

"YES" string message.

NO_STRING

"NO" string message.

ON_STRING

"ON" string message.

OFF_STRING

"OFF" string message.

SAVE_STRING

"SAVE" string message.

STIMA_LCD_TRACE_LEVEL

Lcd trace level debug for stima sketch.

file debug_config.h

Defines

ENABLE_SDCARD_LOGGING

Enable logging on SDcard define to 1 the macro to enable logging on a file on SDcard.

LOG_LEVEL

logging level at compile time Available levels are: LOG_LEVEL_SILENT LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARNING LOG_LEVEL_NOTICE LOG_LEVEL_TRACE LOG_LEVEL_VERBOSE

DEBUG_MEMORY

Activate debug of memory use and stack heap collision on serial interface.

LCD_TRACE_LEVEL_OFF

Debug level for print error message on lcd interface.

LCD_TRACE_LEVEL_ERROR

Debug level for print error message on lcd.

LCD_TRACE_LEVEL_WARNING

Debug level for print detailed informations message on serial interface.

LCD_TRACE_LEVEL_INFO

Debug level for print informations message on lcd.

LCD_TRACE_LEVEL_DEBUG

Debug level for print verbose informations message on lcd.

OK_STRING

"OK" string message.

ERROR_STRING

"ERROR" string message.

FAIL_STRING

"FAIL" string message.

YES_STRING

"YES" string message.

NO_STRING

"NO" string message.

ON_STRING

"ON" string message.

OFF_STRING

"OFF" string message.

SAVE_STRING

"SAVE" string message.

STIMA_LCD_TRACE_LEVEL

Lcd trace level debug for stima sketch.

file debug_config.h

Defines

SERIAL_TRACE_LEVEL_OFF

Debug level for disable debug on serial interface.

SERIAL_TRACE_LEVEL_ERROR

Debug level for print error message on serial interface.

SERIAL_TRACE_LEVEL_WARNING

Debug level for print warning message on serial interface.

SERIAL_TRACE_LEVEL_INFO

Debug level for print informations message on serial interface.

SERIAL_TRACE_LEVEL_DEBUG

Debug level for print verbose informations message on serial interface.

SERIAL_TRACE_LEVEL_TRACE

Debug level for print detailed informations message on serial interface.

LCD_TRACE_LEVEL_OFF

Debug level for print error message on lcd interface.

LCD_TRACE_LEVEL_ERROR

Debug level for print error message on lcd.

LCD_TRACE_LEVEL_WARNING

Debug level for print detailed informations message on serial interface.

LCD_TRACE_LEVEL_INFO

Debug level for print informations message on lcd.

LCD_TRACE_LEVEL_DEBUG

Debug level for print verbose informations message on lcd.

OK_STRING

"OK" string message.

ERROR_STRING

"ERROR" string message.

FAIL_STRING

"FAIL" string message.

YES_STRING

"YES" string message.

NO_STRING

"NO" string message.

ON_STRING

"ON" string message.

OFF_STRING

"OFF" string message.

SAVE_STRING

"SAVE" string message.

SENSOR_DRIVER_SERIAL_TRACE_LEVEL

Serial trace level debug for SensorDriver library.

SIM800_SERIAL_TRACE_LEVEL

Serial trace level debug for Sim800 library.

OPC_SERIAL_TRACE_LEVEL

Serial trace level debug for Opcxx library.

I2C_TH_SERIAL_TRACE_LEVEL

Serial trace level debug for i2c-th sketch.

I2C_RAIN_SERIAL_TRACE_LEVEL

Serial trace level debug for i2c-rain sketch.

I2C_OPC_SERIAL_TRACE_LEVEL

Serial trace level debug for i2c-opc sketch.

STIMA_SERIAL_TRACE_LEVEL

Serial trace level debug for stima sketch.

STIMA_LCD_TRACE_LEVEL

Lcd trace level debug for stima sketch.

file debug_config.h

Defines

ENABLE_SDCARD_LOGGING

Enable logging on SDcard define to 1 the macro to enable logging on a file on SDcard.

LOG_LEVEL

logging level at compile time Available levels are: LOG_LEVEL_SILENT LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARNING LOG_LEVEL_NOTICE LOG_LEVEL_TRACE LOG_LEVEL_VERBOSE

DEBUG_MEMORY

Activate debug of memory use and stack heap collision on serial interface.

LCD_TRACE_LEVEL_OFF

Debug level for print error message on lcd interface.

LCD_TRACE_LEVEL_ERROR

Debug level for print error message on lcd.

LCD_TRACE_LEVEL_WARNING

Debug level for print detailed informations message on serial interface.

LCD_TRACE_LEVEL_INFO

Debug level for print informations message on lcd.

LCD_TRACE_LEVEL_DEBUG

Debug level for print verbose informations message on lcd.

OK_STRING

"OK" string message.

ERROR_STRING

"ERROR" string message.

FAIL_STRING

"FAIL" string message.

YES_STRING

"YES" string message.

NO_STRING

"NO" string message.

ON_STRING

"ON" string message.

OFF_STRING

"OFF" string message.

SAVE_STRING

"SAVE" string message.

STIMA_LCD_TRACE_LEVEL

Lcd trace level debug for stima sketch.

file debug_config.h

Defines

SERIAL_TRACE_LEVEL_OFF

Debug level for disable debug on serial interface.

SERIAL_TRACE_LEVEL_ERROR

Debug level for print error message on serial interface.

SERIAL_TRACE_LEVEL_WARNING

Debug level for print warning message on serial interface.

SERIAL_TRACE_LEVEL_INFO

Debug level for print informations message on serial interface.

SERIAL_TRACE_LEVEL_DEBUG

Debug level for print verbose informations message on serial interface.

SERIAL_TRACE_LEVEL_TRACE

Debug level for print detailed informations message on serial interface.

LCD_TRACE_LEVEL_OFF

Debug level for print error message on lcd interface.

LCD_TRACE_LEVEL_ERROR

Debug level for print error message on lcd.

LCD_TRACE_LEVEL_WARNING

Debug level for print detailed informations message on serial interface.

LCD_TRACE_LEVEL_INFO

Debug level for print informations message on lcd.

LCD_TRACE_LEVEL_DEBUG

Debug level for print verbose informations message on lcd.

OK_STRING

"OK" string message.

ERROR_STRING

"ERROR" string message.

FAIL_STRING

"FAIL" string message.

YES_STRING

"YES" string message.

NO_STRING

"NO" string message.

ON_STRING

"ON" string message.

OFF_STRING

"OFF" string message.

SAVE_STRING

"SAVE" string message.

SENSOR_DRIVER_SERIAL_TRACE_LEVEL

Serial trace level debug for SensorDriver library.

SIM800_SERIAL_TRACE_LEVEL

Serial trace level debug for Sim800 library.

OPC_SERIAL_TRACE_LEVEL

Serial trace level debug for Opcxx library.

I2C_TH_SERIAL_TRACE_LEVEL

Serial trace level debug for i2c-th sketch.

I2C_RAIN_SERIAL_TRACE_LEVEL

Serial trace level debug for i2c-rain sketch.

I2C_OPC_SERIAL_TRACE_LEVEL

Serial trace level debug for i2c-opc sketch.

STIMA_SERIAL_TRACE_LEVEL

Serial trace level debug for stima sketch.

STIMA_LCD_TRACE_LEVEL

Lcd trace level debug for stima sketch.

file debug_config.h

Defines

ENABLE_SDCARD_LOGGING

Enable logging on SDcard define to 1 the macro to enable logging on a file on SDcard.

LOG_LEVEL

logging level at compile time Available levels are: LOG_LEVEL_SILENT LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARNING LOG_LEVEL_NOTICE LOG_LEVEL_TRACE LOG_LEVEL_VERBOSE

DEBUG_MEMORY

Activate debug of memory use and stack heap collision on serial interface.

LCD_TRACE_LEVEL_OFF

Debug level for print error message on lcd interface.

LCD_TRACE_LEVEL_ERROR

Debug level for print error message on lcd.

LCD_TRACE_LEVEL_WARNING

Debug level for print detailed informations message on serial interface.

LCD_TRACE_LEVEL_INFO

Debug level for print informations message on lcd.

LCD_TRACE_LEVEL_DEBUG

Debug level for print verbose informations message on lcd.

OK_STRING

"OK" string message.

ERROR_STRING

"ERROR" string message.

FAIL_STRING

"FAIL" string message.

YES_STRING

"YES" string message.

NO_STRING

"NO" string message.

ON_STRING

"ON" string message.

OFF_STRING

"OFF" string message.

SAVE_STRING

"SAVE" string message.

STIMA_LCD_TRACE_LEVEL

Lcd trace level debug for stima sketch.

file i2c_config.h

Defines

I2C_BUS_CLOCK

I2C bus clock in Hertz.

I2C_MAX_DATA_LENGTH

Max length in bytes for i2c bus data buffer.

I2C_MAX_ERROR_COUNT

Max i2c error for bus restart.

file i2c_config.h

Defines

I2C_BUS_CLOCK

I2C bus clock in Hertz.

I2C_MAX_DATA_LENGTH

Max length in bytes for i2c bus data buffer.

I2C_MAX_ERROR_COUNT

Max i2c error for bus restart.

file i2c_config.h

Defines

I2C_BUS_CLOCK

I2C bus clock in Hertz.

I2C_MAX_DATA_LENGTH

Max length in bytes for i2c bus data buffer.

I2C_MAX_ERROR_COUNT

Max i2c error for bus restart.

file i2c_config.h

Defines

I2C_HOW_MANY_BUSY_CHECKS_AFTER_STOP
TWI_TIMEOUT
I2C_BUS_CLOCK

I2C bus clock in Hertz. 30418,25 Hz : minimum freq with prescaler set to 1 and CPU clock to 16MHz.

I2C_MAX_DATA_LENGTH

Max length in bytes for i2c bus data buffer.

I2C_MAX_ERROR_COUNT

Max i2c error for bus restart.

file i2c_config.h

Defines

I2C_BUS_CLOCK

I2C bus clock in Hertz. 30418,25 Hz : minimum freq with prescaler set to 1 and CPU clock to 16MHz.

I2C_MAX_DATA_LENGTH

Max length in bytes for i2c bus data buffer.

I2C_MAX_ERROR_COUNT

Max i2c error for bus restart.

file i2c_config.h

Defines

I2C_BUS_CLOCK

I2C bus clock in Hertz. 30418,25 Hz : minimum freq with prescaler set to 1 and CPU clock to 16MHz.

I2C_MAX_DATA_LENGTH

Max length in bytes for i2c bus data buffer.

I2C_MAX_ERROR_COUNT

Max i2c error for bus restart.

file i2c_config.h

Defines

I2C_BUS_CLOCK

I2C bus clock in Hertz.

I2C_MAX_DATA_LENGTH

Max length in bytes for i2c bus data buffer.

I2C_MAX_ERROR_COUNT

Max i2c error for bus restart.

file i2c_config.h

Defines

I2C_BUS_CLOCK

I2C bus clock in Hertz. 30418,25 Hz : minimum freq with prescaler set to 1 and CPU clock to 16MHz.

I2C_MAX_DATA_LENGTH

Max length in bytes for i2c bus data buffer.

I2C_MAX_ERROR_COUNT

Max i2c error for bus restart.

file i2c_config.h

Defines

I2C_BUS_CLOCK

I2C bus clock in Hertz.

I2C_MAX_DATA_LENGTH

Max length in bytes for i2c bus data buffer.

I2C_MAX_ERROR_COUNT

Max i2c error for bus restart.

file i2c_config.h

Defines

I2C_BUS_CLOCK

I2C bus clock in Hertz.

I2C_MAX_DATA_LENGTH

Max length in bytes for i2c bus data buffer.

I2C_MAX_ERROR_COUNT

Max i2c error for bus restart.

file i2c_config.h

Defines

I2C_BUS_CLOCK

I2C bus clock in Hertz.

I2C_MAX_DATA_LENGTH

Max length in bytes for i2c bus data buffer.

I2C_MAX_ERROR_COUNT

Max i2c error for bus restart.

file json_config.h

Defines

JSON_BUFFER_LENGTH

Length in bytes for JSON data buffer.

file json_config.h

Defines

JSON_BUFFER_LENGTH

Length in bytes for JSON data buffer.

file json_config.h

Defines

JSON_BUFFER_LENGTH

Length in bytes for JSON data buffer.

file json_config.h

Defines

JSON_BUFFER_LENGTH

Length in bytes for JSON data buffer.

file json_config.h

Defines

JSON_BUFFER_LENGTH

Length in bytes for JSON data buffer.

file json_config.h

Defines

JSON_BUFFER_LENGTH

Length in bytes for JSON data buffer.

file json_config.h

Defines

JSON_BUFFER_LENGTH

Length in bytes for JSON data buffer.

file json_config.h

Defines

JSON_BUFFER_LENGTH

Length in bytes for JSON data buffer.

file json_config.h

Defines

JSON_BUFFER_LENGTH

Length in bytes for JSON data buffer.

file json_config.h

Defines

JSON_BUFFER_LENGTH

Length in bytes for JSON data buffer.

file json_config.h

Defines

JSON_BUFFER_LENGTH

Length in bytes for JSON data buffer.

file json_config.h

Defines

JSON_BUFFER_LENGTH

Length in bytes for JSON data buffer.

file json_config.h

Defines

JSON_BUFFER_LENGTH

Length in bytes for JSON data buffer.

file json_config.h

Defines

JSON_BUFFER_LENGTH

Length in bytes for JSON data buffer.

file mqtt_config.h

Defines

MQTT_ROOT_TOPIC_LENGTH

Length in bytes for mqtt root topic.

MQTT_MAINT_TOPIC_LENGTH

Length in bytes for mqtt maint topic.

MQTT_SUBSCRIBE_TOPIC_LENGTH

Length in bytes for mqtt subscibe topic.

MQTT_SENSOR_TOPIC_LENGTH

Length in bytes for mqtt sensor topic.

MQTT_CLIENT_ID_LENGTH

Length in bytes for mqtt client id.

MQTT_MESSAGE_LENGTH

Length in bytes for mqtt message.

MQTT_SERVER_LENGTH

Length in bytes for mqtt server.

MQTT_USERNAME_LENGTH

Length in bytes for mqtt username.

MQTT_PASSWORD_LENGTH

Length in bytes for mqtt password.

MQTT_TIMEOUT_MS

Timeout in milliseconds for mqtt stack.

MQTT_DEFAULT_SERVER

Default MQTT server.

MQTT_DEFAULT_PORT

Default MQTT server port.

MQTT_DEFAULT_ROOT_TOPIC

Default MQTT root topic.

MQTT_DEFAULT_MAINT_TOPIC

Default MQTT maint topic.

MQTT_DEFAULT_SUBSCRIBE_TOPIC

Default MQTT subscibe topic.

MQTT_DEFAULT_USERNAME

Default MQTT username.

MQTT_DEFAULT_PASSWORD

Default MQTT password.

MQTT_STATUS_TOPIC

Default MQTT status topic for printing on connect/disconnect message.

MQTT_ON_CONNECT_MESSAGE

MQTT on connect message.

MQTT_ON_DISCONNECT_MESSAGE

MQTT on disconnect message.

MQTT_ON_ERROR_MESSAGE

MQTT on error message.

file mqtt_config.h

Defines

MQTT_ROOT_TOPIC_LENGTH

Length in bytes for mqtt root topic.

MQTT_MAINT_TOPIC_LENGTH

Length in bytes for mqtt maint topic.

MQTT_SUBSCRIBE_TOPIC_LENGTH

Length in bytes for mqtt subscibe topic.

MQTT_SENSOR_TOPIC_LENGTH

Length in bytes for mqtt sensor topic.

MQTT_CLIENT_ID_LENGTH

Length in bytes for mqtt client id.

MQTT_MESSAGE_LENGTH

Length in bytes for mqtt message.

MQTT_SERVER_LENGTH

Length in bytes for mqtt server.

MQTT_USERNAME_LENGTH

Length in bytes for mqtt username.

MQTT_PASSWORD_LENGTH

Length in bytes for mqtt password.

MQTT_TIMEOUT_MS

Timeout in milliseconds for mqtt stack.

MQTT_DEFAULT_SERVER

Default MQTT server.

MQTT_DEFAULT_PORT

Default MQTT server port.

MQTT_DEFAULT_ROOT_TOPIC

Default MQTT root topic.

MQTT_DEFAULT_MAINT_TOPIC

Default MQTT maint topic.

MQTT_DEFAULT_SUBSCRIBE_TOPIC

Default MQTT subscibe topic.

MQTT_DEFAULT_USERNAME

Default MQTT username.

MQTT_DEFAULT_PASSWORD

Default MQTT password.

MQTT_STATUS_TOPIC

Default MQTT status topic for printing on connect/disconnect message.

MQTT_ON_CONNECT_MESSAGE

MQTT on connect message.

MQTT_ON_DISCONNECT_MESSAGE

MQTT on disconnect message.

MQTT_ON_ERROR_MESSAGE

MQTT on error message.

file mqtt_config.h

Defines

MQTT_ROOT_TOPIC_LENGTH

Length in bytes for mqtt root topic.

MQTT_MAINT_TOPIC_LENGTH

Length in bytes for mqtt maint topic.

MQTT_SUBSCRIBE_TOPIC_LENGTH

Length in bytes for mqtt subscibe topic.

MQTT_SENSOR_TOPIC_LENGTH

Length in bytes for mqtt sensor topic.

MQTT_CLIENT_ID_LENGTH

Length in bytes for mqtt client id.

MQTT_MESSAGE_LENGTH

Length in bytes for mqtt message.

MQTT_SERVER_LENGTH

Length in bytes for mqtt server.

MQTT_USERNAME_LENGTH

Length in bytes for mqtt username.

MQTT_PASSWORD_LENGTH

Length in bytes for mqtt password.

MQTT_TIMEOUT_MS

Timeout in milliseconds for mqtt stack.

MQTT_DEFAULT_SERVER

Default MQTT server.

MQTT_DEFAULT_PORT

Default MQTT server port.

MQTT_DEFAULT_ROOT_TOPIC

Default MQTT root topic.

MQTT_DEFAULT_MAINT_TOPIC

Default MQTT maint topic.

MQTT_DEFAULT_SUBSCRIBE_TOPIC

Default MQTT subscibe topic.

MQTT_DEFAULT_USERNAME

Default MQTT username.

MQTT_DEFAULT_PASSWORD

Default MQTT password.

MQTT_STATUS_TOPIC

Default MQTT status topic for printing on connect/disconnect message.

MQTT_ON_CONNECT_MESSAGE

MQTT on connect message.

MQTT_ON_DISCONNECT_MESSAGE

MQTT on disconnect message.

MQTT_ON_ERROR_MESSAGE

MQTT on error message.

file mqtt_config.h

Defines

MQTT_ROOT_TOPIC_LENGTH

Length in bytes for mqtt root topic.

MQTT_MAINT_TOPIC_LENGTH

Length in bytes for mqtt maint topic.

MQTT_SUBSCRIBE_TOPIC_LENGTH

Length in bytes for mqtt subscibe topic.

MQTT_SENSOR_TOPIC_LENGTH

Length in bytes for mqtt sensor topic.

MQTT_CLIENT_ID_LENGTH

Length in bytes for mqtt client id.

MQTT_MESSAGE_LENGTH

Length in bytes for mqtt message.

MQTT_SERVER_LENGTH

Length in bytes for mqtt server.

MQTT_USERNAME_LENGTH

Length in bytes for mqtt username.

MQTT_PASSWORD_LENGTH

Length in bytes for mqtt password.

MQTT_TIMEOUT_MS

Timeout in milliseconds for mqtt stack.

MQTT_DEFAULT_SERVER

Default MQTT server.

MQTT_DEFAULT_PORT

Default MQTT server port.

MQTT_DEFAULT_ROOT_TOPIC

Default MQTT root topic.

MQTT_DEFAULT_MAINT_TOPIC

Default MQTT maint topic.

MQTT_DEFAULT_SUBSCRIBE_TOPIC

Default MQTT subscibe topic.

MQTT_DEFAULT_USERNAME

Default MQTT username.

MQTT_DEFAULT_PASSWORD

Default MQTT password.

MQTT_STATUS_TOPIC

Default MQTT status topic for printing on connect/disconnect message.

MQTT_ON_CONNECT_MESSAGE

MQTT on connect message.

MQTT_ON_DISCONNECT_MESSAGE

MQTT on disconnect message.

MQTT_ON_ERROR_MESSAGE

MQTT on error message.

file mqtt_config.h

Defines

MQTT_ROOT_TOPIC_LENGTH

Length in bytes for mqtt root topic.

MQTT_MAINT_TOPIC_LENGTH

Length in bytes for mqtt maint topic.

MQTT_SUBSCRIBE_TOPIC_LENGTH

Length in bytes for mqtt subscibe topic.

MQTT_SENSOR_TOPIC_LENGTH

Length in bytes for mqtt sensor topic.

MQTT_CLIENT_ID_LENGTH

Length in bytes for mqtt client id.

MQTT_MESSAGE_LENGTH

Length in bytes for mqtt message.

MQTT_SERVER_LENGTH

Length in bytes for mqtt server.

MQTT_USERNAME_LENGTH

Length in bytes for mqtt username.

MQTT_PASSWORD_LENGTH

Length in bytes for mqtt password.

MQTT_TIMEOUT_MS

Timeout in milliseconds for mqtt stack.

MQTT_DEFAULT_SERVER

Default MQTT server.

MQTT_DEFAULT_PORT

Default MQTT server port.

MQTT_DEFAULT_ROOT_TOPIC

Default MQTT root topic.

MQTT_DEFAULT_MAINT_TOPIC

Default MQTT maint topic.

MQTT_DEFAULT_SUBSCRIBE_TOPIC

Default MQTT subscibe topic.

MQTT_DEFAULT_USERNAME

Default MQTT username.

MQTT_DEFAULT_PASSWORD

Default MQTT password.

MQTT_STATUS_TOPIC

Default MQTT status topic for printing on connect/disconnect message.

MQTT_ON_CONNECT_MESSAGE

MQTT on connect message.

MQTT_ON_DISCONNECT_MESSAGE

MQTT on disconnect message.

MQTT_ON_ERROR_MESSAGE

MQTT on error message.

file mqtt_config.h

Defines

MQTT_ROOT_TOPIC_LENGTH

Length in bytes for mqtt root topic.

MQTT_MAINT_TOPIC_LENGTH

Length in bytes for mqtt maint topic.

MQTT_SUBSCRIBE_TOPIC_LENGTH

Length in bytes for mqtt subscibe topic.

MQTT_SENSOR_TOPIC_LENGTH

Length in bytes for mqtt sensor topic.

MQTT_CLIENT_ID_LENGTH

Length in bytes for mqtt client id.

MQTT_MESSAGE_LENGTH

Length in bytes for mqtt message.

MQTT_SERVER_LENGTH

Length in bytes for mqtt server.

MQTT_USERNAME_LENGTH

Length in bytes for mqtt username.

MQTT_PASSWORD_LENGTH

Length in bytes for mqtt password.

MQTT_TIMEOUT_MS

Timeout in milliseconds for mqtt stack.

MQTT_DEFAULT_SERVER

Default MQTT server.

MQTT_DEFAULT_PORT

Default MQTT server port.

MQTT_DEFAULT_ROOT_TOPIC

Default MQTT root topic.

MQTT_DEFAULT_MAINT_TOPIC

Default MQTT maint topic.

MQTT_DEFAULT_SUBSCRIBE_TOPIC

Default MQTT subscibe topic.

MQTT_DEFAULT_USERNAME

Default MQTT username.

MQTT_DEFAULT_PASSWORD

Default MQTT password.

MQTT_STATUS_TOPIC

Default MQTT status topic for printing on connect/disconnect message.

MQTT_ON_CONNECT_MESSAGE

MQTT on connect message.

MQTT_ON_DISCONNECT_MESSAGE

MQTT on disconnect message.

MQTT_ON_ERROR_MESSAGE

MQTT on error message.

file mqtt_config.h

Defines

MQTT_ROOT_TOPIC_LENGTH

Length in bytes for mqtt root topic.

MQTT_MAINT_TOPIC_LENGTH

Length in bytes for mqtt maint topic.

MQTT_SUBSCRIBE_TOPIC_LENGTH

Length in bytes for mqtt subscibe topic.

MQTT_SENSOR_TOPIC_LENGTH

Length in bytes for mqtt sensor topic.

MQTT_CLIENT_ID_LENGTH

Length in bytes for mqtt client id.

MQTT_MESSAGE_LENGTH

Length in bytes for mqtt message.

MQTT_SERVER_LENGTH

Length in bytes for mqtt server.

MQTT_USERNAME_LENGTH

Length in bytes for mqtt username.

MQTT_PASSWORD_LENGTH

Length in bytes for mqtt password.

MQTT_TIMEOUT_MS

Timeout in milliseconds for mqtt stack.

MQTT_DEFAULT_SERVER

Default MQTT server.

MQTT_DEFAULT_PORT

Default MQTT server port.

MQTT_DEFAULT_ROOT_TOPIC

Default MQTT root topic.

MQTT_DEFAULT_MAINT_TOPIC

Default MQTT maint topic.

MQTT_DEFAULT_SUBSCRIBE_TOPIC

Default MQTT subscibe topic.

MQTT_DEFAULT_USERNAME

Default MQTT username.

MQTT_DEFAULT_PASSWORD

Default MQTT password.

MQTT_STATUS_TOPIC

Default MQTT status topic for printing on connect/disconnect message.

MQTT_ON_CONNECT_MESSAGE

MQTT on connect message.

MQTT_ON_DISCONNECT_MESSAGE

MQTT on disconnect message.

MQTT_ON_ERROR_MESSAGE

MQTT on error message.

file mqtt_config.h

Defines

MQTT_ROOT_TOPIC_LENGTH

Length in bytes for mqtt root topic.

MQTT_MAINT_TOPIC_LENGTH

Length in bytes for mqtt maint topic.

MQTT_RPC_TOPIC_LENGTH

Length in bytes for mqtt rpc topic.

MQTT_SENSOR_TOPIC_LENGTH

Length in bytes for mqtt sensor topic.

MQTT_CLIENT_ID_LENGTH

Length in bytes for mqtt client id.

MQTT_MESSAGE_LENGTH

Length in bytes for mqtt message.

MQTT_RPC_COMMAND_LENGTH

Length in bytes for mqtt rpc command message.

MQTT_RPC_RESPONSE_LENGTH

Length in bytes for mqtt rpc response message.

MQTT_PACKET_SIZE

Length in bytes for max mqtt packet size.

MQTT_SERVER_LENGTH

Length in bytes for mqtt server.

MQTT_USERNAME_LENGTH

Length in bytes for mqtt username.

MQTT_PASSWORD_LENGTH

Length in bytes for mqtt password.

MQTT_TIMEOUT_MS

Timeout in milliseconds for mqtt stack.

MQTT_DEFAULT_SERVER

Default MQTT server.

MQTT_DEFAULT_PORT

Default MQTT server port.

MQTT_DEFAULT_ROOT_TOPIC

Default MQTT root topic.

MQTT_DEFAULT_MAINT_TOPIC

Default MQTT maint topic.

MQTT_DEFAULT_RPC_TOPIC
MQTT_DEFAULT_USERNAME

Default MQTT username.

MQTT_DEFAULT_PASSWORD

Default MQTT password.

MQTT_STATUS_TOPIC

Default MQTT status topic for printing on connect/disconnect message.

MQTT_ON_CONNECT_MESSAGE

MQTT on connect message.

MQTT_ON_DISCONNECT_MESSAGE

MQTT on disconnect message.

MQTT_ON_ERROR_MESSAGE

MQTT on error message.

file mqtt_config.h

Defines

MQTT_ROOT_TOPIC_LENGTH

Length in bytes for mqtt root topic.

MQTT_MAINT_TOPIC_LENGTH

Length in bytes for mqtt maint topic.

MQTT_RPC_TOPIC_LENGTH

Length in bytes for mqtt rpc topic.

MQTT_SENSOR_TOPIC_LENGTH

Length in bytes for mqtt sensor topic.

MQTT_CLIENT_ID_LENGTH

Length in bytes for mqtt client id.

MQTT_MESSAGE_LENGTH

Length in bytes for mqtt message.

MQTT_RPC_COMMAND_LENGTH

Length in bytes for mqtt rpc command message.

MQTT_RPC_RESPONSE_LENGTH

Length in bytes for mqtt rpc response message.

MQTT_PACKET_SIZE

Length in bytes for max mqtt packet size.

MQTT_SERVER_LENGTH

Length in bytes for mqtt server.

MQTT_USERNAME_LENGTH

Length in bytes for mqtt username.

MQTT_PASSWORD_LENGTH

Length in bytes for mqtt password.

STATIONSLUG_LENGTH

Length in bytes for station slug.

BOARDSLUG_LENGTH

Length in bytes for board slug.

MQTT_TIMEOUT_MS

Timeout in milliseconds for mqtt stack.

MQTT_DEFAULT_SERVER

Default MQTT server.

MQTT_DEFAULT_PORT

Default MQTT server port.

MQTT_DEFAULT_ROOT_TOPIC

Default MQTT root topic.

MQTT_DEFAULT_MAINT_TOPIC

Default MQTT maint topic.

MQTT_DEFAULT_RPC_TOPIC
MQTT_DEFAULT_USERNAME

Default MQTT username.

MQTT_DEFAULT_PASSWORD

Default MQTT password.

DEFAULT_STATIONSLUG

Default station slug.

DEFAULT_BOARDSLUG

Default board slug.

MQTT_STATUS_TOPIC

Default MQTT status topic for printing on connect/disconnect message.

MQTT_ON_CONNECT_MESSAGE

MQTT on connect message.

MQTT_ON_DISCONNECT_MESSAGE

MQTT on disconnect message.

MQTT_ON_ERROR_MESSAGE

MQTT on error message.

file mqtt_config.h

Defines

MQTT_ROOT_TOPIC_LENGTH

Length in bytes for mqtt root topic.

MQTT_MAINT_TOPIC_LENGTH

Length in bytes for mqtt maint topic.

MQTT_RPC_TOPIC_LENGTH

Length in bytes for mqtt rpc topic.

MQTT_SENSOR_TOPIC_LENGTH

Length in bytes for mqtt sensor topic.

MQTT_CLIENT_ID_LENGTH

Length in bytes for mqtt client id.

MQTT_MESSAGE_LENGTH

Length in bytes for mqtt message.

MQTT_RPC_COMMAND_LENGTH

Length in bytes for mqtt rpc command message.

MQTT_RPC_RESPONSE_LENGTH

Length in bytes for mqtt rpc response message.

MQTT_PACKET_SIZE

Length in bytes for max mqtt packet size.

MQTT_SERVER_LENGTH

Length in bytes for mqtt server.

MQTT_USERNAME_LENGTH

Length in bytes for mqtt username.

MQTT_PASSWORD_LENGTH

Length in bytes for mqtt password.

MQTT_TIMEOUT_MS

Timeout in milliseconds for mqtt stack.

MQTT_DEFAULT_SERVER

Default MQTT server.

MQTT_DEFAULT_PORT

Default MQTT server port.

MQTT_DEFAULT_ROOT_TOPIC

Default MQTT root topic.

MQTT_DEFAULT_MAINT_TOPIC

Default MQTT maint topic.

MQTT_DEFAULT_RPC_TOPIC
MQTT_DEFAULT_USERNAME

Default MQTT username.

MQTT_DEFAULT_PASSWORD

Default MQTT password.

MQTT_STATUS_TOPIC

Default MQTT status topic for printing on connect/disconnect message.

MQTT_ON_CONNECT_MESSAGE

MQTT on connect message.

MQTT_ON_DISCONNECT_MESSAGE

MQTT on disconnect message.

MQTT_ON_ERROR_MESSAGE

MQTT on error message.

file mqtt_config.h

Defines

MQTT_ROOT_TOPIC_LENGTH

Length in bytes for mqtt root topic.

MQTT_MAINT_TOPIC_LENGTH

Length in bytes for mqtt maint topic.

MQTT_SUBSCRIBE_TOPIC_LENGTH

Length in bytes for mqtt subscibe topic.

MQTT_SENSOR_TOPIC_LENGTH

Length in bytes for mqtt sensor topic.

MQTT_CLIENT_ID_LENGTH

Length in bytes for mqtt client id.

MQTT_MESSAGE_LENGTH

Length in bytes for mqtt message.

MQTT_SERVER_LENGTH

Length in bytes for mqtt server.

MQTT_USERNAME_LENGTH

Length in bytes for mqtt username.

MQTT_PASSWORD_LENGTH

Length in bytes for mqtt password.

MQTT_TIMEOUT_MS

Timeout in milliseconds for mqtt stack.

MQTT_DEFAULT_SERVER

Default MQTT server.

MQTT_DEFAULT_PORT

Default MQTT server port.

MQTT_DEFAULT_ROOT_TOPIC

Default MQTT root topic.

MQTT_DEFAULT_MAINT_TOPIC

Default MQTT maint topic.

MQTT_DEFAULT_SUBSCRIBE_TOPIC

Default MQTT subscibe topic.

MQTT_DEFAULT_USERNAME

Default MQTT username.

MQTT_DEFAULT_PASSWORD

Default MQTT password.

MQTT_STATUS_TOPIC

Default MQTT status topic for printing on connect/disconnect message.

MQTT_ON_CONNECT_MESSAGE

MQTT on connect message.

MQTT_ON_DISCONNECT_MESSAGE

MQTT on disconnect message.

MQTT_ON_ERROR_MESSAGE

MQTT on error message.

file mqtt_config.h

Defines

MQTT_ROOT_TOPIC_LENGTH

Length in bytes for mqtt root topic.

MQTT_MAINT_TOPIC_LENGTH

Length in bytes for mqtt maint topic.

MQTT_SUBSCRIBE_TOPIC_LENGTH

Length in bytes for mqtt subscibe topic.

MQTT_SENSOR_TOPIC_LENGTH

Length in bytes for mqtt sensor topic.

MQTT_CLIENT_ID_LENGTH

Length in bytes for mqtt client id.

MQTT_MESSAGE_LENGTH

Length in bytes for mqtt message.

MQTT_SERVER_LENGTH

Length in bytes for mqtt server.

MQTT_USERNAME_LENGTH

Length in bytes for mqtt username.

MQTT_PASSWORD_LENGTH

Length in bytes for mqtt password.

MQTT_TIMEOUT_MS

Timeout in milliseconds for mqtt stack.

MQTT_DEFAULT_SERVER

Default MQTT server.

MQTT_DEFAULT_PORT

Default MQTT server port.

MQTT_DEFAULT_ROOT_TOPIC

Default MQTT root topic.

MQTT_DEFAULT_MAINT_TOPIC

Default MQTT maint topic.

MQTT_DEFAULT_SUBSCRIBE_TOPIC

Default MQTT subscibe topic.

MQTT_DEFAULT_USERNAME

Default MQTT username.

MQTT_DEFAULT_PASSWORD

Default MQTT password.

MQTT_STATUS_TOPIC

Default MQTT status topic for printing on connect/disconnect message.

MQTT_ON_CONNECT_MESSAGE

MQTT on connect message.

MQTT_ON_DISCONNECT_MESSAGE

MQTT on disconnect message.

MQTT_ON_ERROR_MESSAGE

MQTT on error message.

file mqtt_config.h

Defines

MQTT_ROOT_TOPIC_LENGTH

Length in bytes for mqtt root topic.

MQTT_MAINT_TOPIC_LENGTH

Length in bytes for mqtt maint topic.

MQTT_SUBSCRIBE_TOPIC_LENGTH

Length in bytes for mqtt subscibe topic.

MQTT_SENSOR_TOPIC_LENGTH

Length in bytes for mqtt sensor topic.

MQTT_CLIENT_ID_LENGTH

Length in bytes for mqtt client id.

MQTT_MESSAGE_LENGTH

Length in bytes for mqtt message.

MQTT_SERVER_LENGTH

Length in bytes for mqtt server.

MQTT_USERNAME_LENGTH

Length in bytes for mqtt username.

MQTT_PASSWORD_LENGTH

Length in bytes for mqtt password.

MQTT_TIMEOUT_MS

Timeout in milliseconds for mqtt stack.

MQTT_DEFAULT_SERVER

Default MQTT server.

MQTT_DEFAULT_PORT

Default MQTT server port.

MQTT_DEFAULT_ROOT_TOPIC

Default MQTT root topic.

MQTT_DEFAULT_MAINT_TOPIC

Default MQTT maint topic.

MQTT_DEFAULT_SUBSCRIBE_TOPIC

Default MQTT subscibe topic.

MQTT_DEFAULT_USERNAME

Default MQTT username.

MQTT_DEFAULT_PASSWORD

Default MQTT password.

MQTT_STATUS_TOPIC

Default MQTT status topic for printing on connect/disconnect message.

MQTT_ON_CONNECT_MESSAGE

MQTT on connect message.

MQTT_ON_DISCONNECT_MESSAGE

MQTT on disconnect message.

MQTT_ON_ERROR_MESSAGE

MQTT on error message.

file mqtt_config.h

Defines

MQTT_ROOT_TOPIC_LENGTH

Length in bytes for mqtt root topic.

MQTT_MAINT_TOPIC_LENGTH

Length in bytes for mqtt maint topic.

MQTT_SUBSCRIBE_TOPIC_LENGTH

Length in bytes for mqtt subscibe topic.

MQTT_SENSOR_TOPIC_LENGTH

Length in bytes for mqtt sensor topic.

MQTT_CLIENT_ID_LENGTH

Length in bytes for mqtt client id.

MQTT_MESSAGE_LENGTH

Length in bytes for mqtt message.

MQTT_SERVER_LENGTH

Length in bytes for mqtt server.

MQTT_USERNAME_LENGTH

Length in bytes for mqtt username.

MQTT_PASSWORD_LENGTH

Length in bytes for mqtt password.

MQTT_TIMEOUT_MS

Timeout in milliseconds for mqtt stack.

MQTT_DEFAULT_SERVER

Default MQTT server.

MQTT_DEFAULT_PORT

Default MQTT server port.

MQTT_DEFAULT_ROOT_TOPIC

Default MQTT root topic.

MQTT_DEFAULT_MAINT_TOPIC

Default MQTT maint topic.

MQTT_DEFAULT_SUBSCRIBE_TOPIC

Default MQTT subscibe topic.

MQTT_DEFAULT_USERNAME

Default MQTT username.

MQTT_DEFAULT_PASSWORD

Default MQTT password.

MQTT_STATUS_TOPIC

Default MQTT status topic for printing on connect/disconnect message.

MQTT_ON_CONNECT_MESSAGE

MQTT on connect message.

MQTT_ON_DISCONNECT_MESSAGE

MQTT on disconnect message.

MQTT_ON_ERROR_MESSAGE

MQTT on error message.

file sdcard_config.h

Defines

SDCARD_FILES_NAME_MAX_LENGTH

Length in bytes for sdcard file name data buffer.

file sdcard_config.h

Defines

SDCARD_FILES_NAME_MAX_LENGTH

Length in bytes for sdcard file name data buffer.

file sdcard_config.h

Defines

SDCARD_FILES_NAME_MAX_LENGTH

Length in bytes for sdcard file name data buffer.

file sdcard_config.h

Defines

SDCARD_FILES_NAME_MAX_LENGTH

Length in bytes for sdcard file name data buffer.

file sdcard_config.h

Defines

SDCARD_FILES_NAME_MAX_LENGTH

Length in bytes for sdcard file name data buffer.

file sdcard_config.h

Defines

SDCARD_FILES_NAME_MAX_LENGTH

Length in bytes for sdcard file name data buffer.

file sdcard_config.h

Defines

SDCARD_FILES_NAME_MAX_LENGTH

Length in bytes for sdcard file name data buffer.

file sdcard_config.h

Defines

SDCARD_FILES_NAME_MAX_LENGTH

Length in bytes for sdcard file name data buffer.

file sdcard_config.h

Defines

SPI_DRIVER_SELECT
USE_SD_CRC
SDFAT_FILE_TYPE
USE_LONG_FILE_NAMES
USE_SEPARATE_FAT_CACHE
USE_EXFAT_BITMAP_CACHE
USE_UTF8_LONG_NAMES
USE_FAT_FILE_FLAG_CONTIGUOUS
ENABLE_DEDICATED_SPI
SDCARD_FILES_NAME_MAX_LENGTH

Length in bytes for sdcard file name data buffer.

file sdcard_config.h

Defines

SDCARD_FILES_NAME_MAX_LENGTH

Length in bytes for sdcard file name data buffer.

file sdcard_config.h

Defines

SDCARD_FILES_NAME_MAX_LENGTH

Length in bytes for sdcard file name data buffer.

file sdcard_config.h

Defines

SDCARD_FILES_NAME_MAX_LENGTH

Length in bytes for sdcard file name data buffer.

file sdcard_config.h

Defines

SDCARD_FILES_NAME_MAX_LENGTH

Length in bytes for sdcard file name data buffer.

file sdcard_config.h

Defines

SDCARD_FILES_NAME_MAX_LENGTH

Length in bytes for sdcard file name data buffer.

file sensors_config.h

Defines

USE_JSON

Enable if you want use json library for json response (getJson function in SensorDriver).

USE_SENSOR_ADT

Enable if you want use ADT7420 sensor.

USE_SENSOR_HIH

Enable if you want use HIH6100 sensor.

USE_SENSOR_HYT

Enable if you want use HYT271 or HYT221 sensor.

USE_SENSOR_DEP

Enable if you want use DigitEco Power sensor.

USE_SENSOR_OA2

Enable if you want use OPC PM1, PM2.5, PM10 continuous average value.

USE_SENSOR_OA3
USE_SENSOR_OB2

Enable if you want use OPC PM1, PM2.5, PM10 continuous standard deviation value.

USE_SENSOR_OB3
USE_SENSOR_OC2

Enable if you want use OPC BINS continuous average value.

USE_SENSOR_OC3
USE_SENSOR_OD2

Enable if you want use OPC BINS continuous standard deviation value.

USE_SENSOR_OD3
USE_SENSOR_OE3
USE_SENSOR_LWT

Enable if you want use leaf wetness time continuous value.

USE_SENSOR_HI7

Enable if you want use SI7021 sensor.

USE_SENSOR_BMP

Enable if you want use Bmp085 sensor.

USE_SENSOR_DW1

Enable if you want use DW1 sensor.

USE_SENSOR_TBS

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_TBR

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_STH

Enable if you want use Temperature and humidity oneshot sensor.

USE_SENSOR_ITH

Enable if you want use Temperature and humidity continuous istantaneous sensor.

USE_SENSOR_NTH

Enable if you want use Temperature and humidity continuous minium sensor.

USE_SENSOR_MTH

Enable if you want use Temperature and humidity continuous average sensor.

USE_SENSOR_XTH

Enable if you want use Temperature and humidity continuous maximum sensor.

USE_SENSOR_SSD

Enable if you want use SSD011 oneshot sensor.

USE_SENSOR_ISD

Enable if you want use SSD011 report istantaneous sensor.

USE_SENSOR_NSD

Enable if you want use SSD011 report minium sensor.

USE_SENSOR_MSD

Enable if you want use SSD011 report average sensor.

USE_SENSOR_XSD

Enable if you want use SSD011 report maximum sensor.

USE_SENSOR_SMI

Enable if you want use MICS4514 oneshot sensor.

USE_SENSOR_IMI

Enable if you want use MICS4514 report istantaneous sensor.

USE_SENSOR_NMI

Enable if you want use MICS4514 report minium sensor.

USE_SENSOR_MMI

Enable if you want use MICS4514 report average sensor.

USE_SENSOR_GWS

Enable if you want use Gill Windsonic sensor.

USE_SENSOR_XMI

Enable if you want use MICS4514 report maximum sensor.

USE_SENSOR_RF24

Enable if you want use Radio RF24 sensor.

RAIN_FOR_TIP

How much mm of rain for one tip of tipping bucket rain gauge.

VALUES_TO_READ_FROM_SENSOR_COUNT

Maximum number of values to be read by the sensors.

JSONS_TO_READ_FROM_SENSOR_COUNT
OBSERVATIONS_MINUTES

How much minutes for calculate an observations by processing sampling. Tipically 1-10 minutes.

STATISTICAL_DATA_COUNT

How much observations are needed for generating a report.

OBSERVATION_COUNT

Observations buffer length.

OBSERVATION_COUNT_TOLLERANCE

Tolerance of observations for generating a valid report.

file sensors_config.h

Defines

USE_JSON

Enable if you want use json library for json response (getJson function in SensorDriver).

USE_SENSOR_ADT

Enable if you want use ADT7420 sensor.

USE_SENSOR_HIH

Enable if you want use HIH6100 sensor.

USE_SENSOR_HYT

Enable if you want use HYT271 or HYT221 sensor.

USE_SENSOR_DEP

Enable if you want use DigitEco Power sensor.

USE_SENSOR_OA2

Enable if you want use OPC PM1, PM2.5, PM10 continuous average value.

USE_SENSOR_OA3
USE_SENSOR_OB2

Enable if you want use OPC PM1, PM2.5, PM10 continuous standard deviation value.

USE_SENSOR_OB3
USE_SENSOR_OC2

Enable if you want use OPC BINS continuous average value.

USE_SENSOR_OC3
USE_SENSOR_OD2

Enable if you want use OPC BINS continuous standard deviation value.

USE_SENSOR_OD3
USE_SENSOR_OE3
USE_SENSOR_LWT

Enable if you want use leaf wetness time continuous value.

USE_SENSOR_HI7

Enable if you want use SI7021 sensor.

USE_SENSOR_BMP

Enable if you want use Bmp085 sensor.

USE_SENSOR_DW1

Enable if you want use DW1 sensor.

USE_SENSOR_TBS

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_TBR

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_STH

Enable if you want use Temperature and humidity oneshot sensor.

USE_SENSOR_ITH

Enable if you want use Temperature and humidity continuous istantaneous sensor.

USE_SENSOR_NTH

Enable if you want use Temperature and humidity continuous minium sensor.

USE_SENSOR_MTH

Enable if you want use Temperature and humidity continuous average sensor.

USE_SENSOR_XTH

Enable if you want use Temperature and humidity continuous maximum sensor.

USE_SENSOR_SSD

Enable if you want use SSD011 oneshot sensor.

USE_SENSOR_ISD

Enable if you want use SSD011 report istantaneous sensor.

USE_SENSOR_NSD

Enable if you want use SSD011 report minium sensor.

USE_SENSOR_MSD

Enable if you want use SSD011 report average sensor.

USE_SENSOR_XSD

Enable if you want use SSD011 report maximum sensor.

USE_SENSOR_SMI

Enable if you want use MICS4514 oneshot sensor.

USE_SENSOR_IMI

Enable if you want use MICS4514 report istantaneous sensor.

USE_SENSOR_NMI

Enable if you want use MICS4514 report minium sensor.

USE_SENSOR_MMI

Enable if you want use MICS4514 report average sensor.

USE_SENSOR_GWS

Enable if you want use Gill Windsonic sensor.

USE_SENSOR_XMI

Enable if you want use MICS4514 report maximum sensor.

USE_SENSOR_RF24

Enable if you want use Radio RF24 sensor.

RAIN_FOR_TIP

How much mm of rain for one tip of tipping bucket rain gauge.

VALUES_TO_READ_FROM_SENSOR_COUNT

Maximum number of values to be read by the sensors.

JSONS_TO_READ_FROM_SENSOR_COUNT
OBSERVATIONS_MINUTES

How much minutes for calculate an observations by processing sampling. Tipically 1-10 minutes.

STATISTICAL_DATA_COUNT

How much observations are needed for generating a report.

OBSERVATION_COUNT

Observations buffer length.

OBSERVATION_COUNT_TOLLERANCE

Tolerance of observations for generating a valid report.

file sensors_config.h

Defines

USE_JSON

Enable if you want use json library for json response (getJson function in SensorDriver).

USE_SENSOR_ADT

Enable if you want use ADT7420 sensor.

USE_SENSOR_HIH

Enable if you want use HIH6100 sensor.

USE_SENSOR_HYT

Enable if you want use HYT271 or HYT221 sensor.

USE_SENSOR_DEP

Enable if you want use DigitEco Power sensor.

USE_SENSOR_DES

Enable if you want use DigitEco Wind Speed sensor.

USE_SENSOR_DED

Enable if you want use DigitEco Wind Direction sensor.

USE_SENSOR_DSR

Enable if you want use DigitEco Global Solar Radiation sensor.

USE_SENSOR_VSR

Enable if you want use 0-5V High Resolution Global Solar Radiation sensor.

USE_SENSOR_DSA

Enable if you want average Global Solar Radiation sensor.

USE_SENSOR_DWA

Enable if you want vectorial average Wind Speed and Direction over 10'.

USE_SENSOR_DWB

Enable if you want vectorial average Wind Speed and Direction over report time.

USE_SENSOR_DWC

Enable if you want gust Wind Speed and Direction over report time.

USE_SENSOR_DWD

Enable if you want average Wind Speed over report time.

USE_SENSOR_DWE

Enable if you want class Wind Speed over report time.

USE_SENSOR_OA2

Enable if you want use OPC PM1, PM2.5, PM10 continuous average value.

USE_SENSOR_OA3
USE_SENSOR_OB2

Enable if you want use OPC PM1, PM2.5, PM10 continuous standard deviation value.

USE_SENSOR_OB3
USE_SENSOR_OC2

Enable if you want use OPC BINS continuous average value.

USE_SENSOR_OC3
USE_SENSOR_OD2

Enable if you want use OPC BINS continuous standard deviation value.

USE_SENSOR_OD3
USE_SENSOR_OE3
USE_SENSOR_LWT

Enable if you want use leaf wetness time continuous value.

USE_SENSOR_HI7

Enable if you want use SI7021 sensor.

USE_SENSOR_BMP

Enable if you want use Bmp085 sensor.

USE_SENSOR_DW1

Enable if you want use DW1 sensor.

USE_SENSOR_TBS

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_TBR

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_STH

Enable if you want use Temperature and humidity oneshot sensor.

USE_SENSOR_ITH

Enable if you want use Temperature and humidity continuous istantaneous sensor.

USE_SENSOR_NTH

Enable if you want use Temperature and humidity continuous minium sensor.

USE_SENSOR_MTH

Enable if you want use Temperature and humidity continuous average sensor.

USE_SENSOR_XTH

Enable if you want use Temperature and humidity continuous maximum sensor.

USE_SENSOR_SSD

Enable if you want use SSD011 oneshot sensor.

USE_SENSOR_ISD

Enable if you want use SSD011 report istantaneous sensor.

USE_SENSOR_NSD

Enable if you want use SSD011 report minium sensor.

USE_SENSOR_MSD

Enable if you want use SSD011 report average sensor.

USE_SENSOR_XSD

Enable if you want use SSD011 report maximum sensor.

USE_SENSOR_SMI

Enable if you want use MICS4514 oneshot sensor.

USE_SENSOR_IMI

Enable if you want use MICS4514 report istantaneous sensor.

USE_SENSOR_NMI

Enable if you want use MICS4514 report minium sensor.

USE_SENSOR_MMI

Enable if you want use MICS4514 report average sensor.

USE_SENSOR_GWS

Enable if you want use Gill Windsonic sensor.

USE_SENSOR_XMI

Enable if you want use MICS4514 report maximum sensor.

USE_SENSOR_RF24

Enable if you want use Radio RF24 sensor.

RAIN_FOR_TIP

How much mm of rain for one tip of tipping bucket rain gauge.

VALUES_TO_READ_FROM_SENSOR_COUNT

Maximum number of values to be read by the sensors.

JSONS_TO_READ_FROM_SENSOR_COUNT
OBSERVATIONS_MINUTES

How much minutes for calculate an observations by processing sampling. Tipically 1-10 minutes.

STATISTICAL_DATA_COUNT

How much observations are needed for generating a report.

OBSERVATION_COUNT

Observations buffer length.

OBSERVATION_COUNT_TOLLERANCE

Tolerance of observations for generating a valid report.

file sensors_config.h

Defines

SENSORS_MAX
SENSORS_UNIQUE_MAX
USE_JSON

Enable if you want use json library for json response (getJson function in SensorDriver).

USE_SENSOR_ADT

Enable if you want use ADT7420 sensor.

USE_SENSOR_HIH

Enable if you want use HIH6100 sensor.

USE_SENSOR_HYT

Enable if you want use HYT271 or HYT221 sensor.

USE_SENSOR_DEP

Enable if you want use DigitEco Power sensor.

USE_SENSOR_OA2

Enable if you want use OPC PM1, PM2.5, PM10 continuous average value.

USE_SENSOR_OA3
USE_SENSOR_OB2

Enable if you want use OPC PM1, PM2.5, PM10 continuous standard deviation value.

USE_SENSOR_OB3
USE_SENSOR_OC2

Enable if you want use OPC BINS continuous average value.

USE_SENSOR_OC3
USE_SENSOR_OD2

Enable if you want use OPC BINS continuous standard deviation value.

USE_SENSOR_OD3
USE_SENSOR_OE3
USE_SENSOR_LWT

Enable if you want use leaf wetness time continuous value.

USE_SENSOR_HI7

Enable if you want use SI7021 sensor.

USE_SENSOR_BMP

Enable if you want use Bmp085 sensor.

USE_SENSOR_DW1

Enable if you want use DW1 sensor.

USE_SENSOR_TBS

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_TBR

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_STH

Enable if you want use Temperature and humidity oneshot sensor.

USE_SENSOR_ITH

Enable if you want use Temperature and humidity continuous istantaneous sensor.

USE_SENSOR_NTH

Enable if you want use Temperature and humidity continuous minium sensor.

USE_SENSOR_MTH

Enable if you want use Temperature and humidity continuous average sensor.

USE_SENSOR_XTH

Enable if you want use Temperature and humidity continuous maximum sensor.

USE_SENSOR_SSD

Enable if you want use SSD011 oneshot sensor.

USE_SENSOR_ISD

Enable if you want use SSD011 report istantaneous sensor.

USE_SENSOR_NSD

Enable if you want use SSD011 report minium sensor.

USE_SENSOR_MSD

Enable if you want use SSD011 report average sensor.

USE_SENSOR_XSD

Enable if you want use SSD011 report maximum sensor.

USE_SENSOR_SMI

Enable if you want use MICS4514 oneshot sensor.

USE_SENSOR_IMI

Enable if you want use MICS4514 report istantaneous sensor.

USE_SENSOR_NMI

Enable if you want use MICS4514 report minium sensor.

USE_SENSOR_MMI

Enable if you want use MICS4514 report average sensor.

USE_SENSOR_GWS

Enable if you want use Gill Windsonic sensor.

USE_SENSOR_XMI

Enable if you want use MICS4514 report maximum sensor.

USE_SENSOR_RF24

Enable if you want use Radio RF24 sensor.

VALUES_TO_READ_FROM_SENSOR_COUNT

Maximum number of values to be read by the sensors.

JSONS_TO_READ_FROM_SENSOR_COUNT
file sensors_config.h

Defines

SENSORS_MAX
SENSORS_UNIQUE_MAX
USE_JSON

Enable if you want use json library for json response (getJson function in SensorDriver).

USE_SENSOR_ADT

Enable if you want use ADT7420 sensor.

USE_SENSOR_HIH

Enable if you want use HIH6100 sensor.

USE_SENSOR_HYT

Enable if you want use HYT271 or HYT221 sensor.

USE_SENSOR_DEP

Enable if you want use DigitEco Power sensor.

USE_SENSOR_OA2

Enable if you want use OPC PM1, PM2.5, PM10 continuous average value.

USE_SENSOR_OA3
USE_SENSOR_OB2

Enable if you want use OPC PM1, PM2.5, PM10 continuous standard deviation value.

USE_SENSOR_OB3
USE_SENSOR_OC2

Enable if you want use OPC BINS continuous average value.

USE_SENSOR_OC3
USE_SENSOR_OD2

Enable if you want use OPC BINS continuous standard deviation value.

USE_SENSOR_OD3
USE_SENSOR_OE3
USE_SENSOR_LWT

Enable if you want use leaf wetness time continuous value.

USE_SENSOR_HI7

Enable if you want use SI7021 sensor.

USE_SENSOR_BMP

Enable if you want use Bmp085 sensor.

USE_SENSOR_DW1

Enable if you want use DW1 sensor.

USE_SENSOR_TBS

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_TBR

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_STH

Enable if you want use Temperature and humidity oneshot sensor.

USE_SENSOR_ITH

Enable if you want use Temperature and humidity continuous istantaneous sensor.

USE_SENSOR_NTH

Enable if you want use Temperature and humidity continuous minium sensor.

USE_SENSOR_MTH

Enable if you want use Temperature and humidity continuous average sensor.

USE_SENSOR_XTH

Enable if you want use Temperature and humidity continuous maximum sensor.

USE_SENSOR_SSD

Enable if you want use SSD011 oneshot sensor.

USE_SENSOR_ISD

Enable if you want use SSD011 report istantaneous sensor.

USE_SENSOR_NSD

Enable if you want use SSD011 report minium sensor.

USE_SENSOR_MSD

Enable if you want use SSD011 report average sensor.

USE_SENSOR_XSD

Enable if you want use SSD011 report maximum sensor.

USE_SENSOR_SMI

Enable if you want use MICS4514 oneshot sensor.

USE_SENSOR_IMI

Enable if you want use MICS4514 report istantaneous sensor.

USE_SENSOR_NMI

Enable if you want use MICS4514 report minium sensor.

USE_SENSOR_MMI

Enable if you want use MICS4514 report average sensor.

USE_SENSOR_GWS

Enable if you want use Gill Windsonic sensor.

USE_SENSOR_XMI

Enable if you want use MICS4514 report maximum sensor.

USE_SENSOR_RF24

Enable if you want use Radio RF24 sensor.

RAIN_FOR_TIP

How much mm of rain for one tip of tipping bucket rain gauge.

VALUES_TO_READ_FROM_SENSOR_COUNT

Maximum number of values to be read by the sensors.

JSONS_TO_READ_FROM_SENSOR_COUNT
file sensors_config.h

Defines

SENSORS_MAX
SENSORS_UNIQUE_MAX
USE_THR

Enable if you want use one module for TH and RAIN. Disable if you want use one module for TH and one for RAIN.

USE_JSON

Enable if you want use json library for json response (getJson function in SensorDriver).

USE_SENSOR_ADT

Enable if you want use ADT7420 sensor.

USE_SENSOR_HIH

Enable if you want use HIH6100 sensor.

USE_SENSOR_HYT

Enable if you want use HYT271 or HYT221 sensor.

USE_SENSOR_DEP

Enable if you want use DigitEco Power sensor.

USE_SENSOR_OA2

Enable if you want use OPC PM1, PM2.5, PM10 continuous average value.

USE_SENSOR_OA3
USE_SENSOR_OB2

Enable if you want use OPC PM1, PM2.5, PM10 continuous standard deviation value.

USE_SENSOR_OB3
USE_SENSOR_OC2

Enable if you want use OPC BINS continuous average value.

USE_SENSOR_OC3
USE_SENSOR_OD2

Enable if you want use OPC BINS continuous standard deviation value.

USE_SENSOR_OD3
USE_SENSOR_OE3
USE_SENSOR_LWT

Enable if you want use leaf wetness time continuous value.

USE_SENSOR_HI7

Enable if you want use SI7021 sensor.

USE_SENSOR_BMP

Enable if you want use Bmp085 sensor.

USE_SENSOR_DW1

Enable if you want use DW1 sensor.

USE_SENSOR_TBS

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_TBR

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_STH

Enable if you want use Temperature and humidity oneshot sensor.

USE_SENSOR_ITH

Enable if you want use Temperature and humidity continuous istantaneous sensor.

USE_SENSOR_NTH

Enable if you want use Temperature and humidity continuous minium sensor.

USE_SENSOR_MTH

Enable if you want use Temperature and humidity continuous average sensor.

USE_SENSOR_XTH

Enable if you want use Temperature and humidity continuous maximum sensor.

USE_SENSOR_SSD

Enable if you want use SSD011 oneshot sensor.

USE_SENSOR_ISD

Enable if you want use SSD011 report istantaneous sensor.

USE_SENSOR_NSD

Enable if you want use SSD011 report minium sensor.

USE_SENSOR_MSD

Enable if you want use SSD011 report average sensor.

USE_SENSOR_XSD

Enable if you want use SSD011 report maximum sensor.

USE_SENSOR_SMI

Enable if you want use MICS4514 oneshot sensor.

USE_SENSOR_IMI

Enable if you want use MICS4514 report istantaneous sensor.

USE_SENSOR_NMI

Enable if you want use MICS4514 report minium sensor.

USE_SENSOR_MMI

Enable if you want use MICS4514 report average sensor.

USE_SENSOR_GWS

Enable if you want use Gill Windsonic sensor.

USE_SENSOR_XMI

Enable if you want use MICS4514 report maximum sensor.

USE_SENSOR_RF24

Enable if you want use Radio RF24 sensor.

VALUES_TO_READ_FROM_SENSOR_COUNT

Maximum number of values to be read by the sensors.

JSONS_TO_READ_FROM_SENSOR_COUNT
OBSERVATIONS_MINUTES

How much minutes for calculate an observations by processing sampling. Tipically 1-10 minutes.

STATISTICAL_DATA_COUNT

How much observations are needed for generating a report.

OBSERVATION_COUNT

Observations buffer length.

OBSERVATION_COUNT_TOLLERANCE

Tolerance of observations for generating a valid report.

USE_TH_SENSORS
USE_RAIN_SENSORS
USE_MODULE_THR
USE_MODULE_TH
USE_MODULE_RAIN
file sensors_config.h

Defines

USE_JSON

Enable if you want use json library for json response (getJson function in SensorDriver).

USE_SENSOR_ADT

Enable if you want use ADT7420 sensor.

USE_SENSOR_HIH

Enable if you want use HIH6100 sensor.

USE_SENSOR_HYT

Enable if you want use HYT271 or HYT221 sensor.

USE_SENSOR_DEP

Enable if you want use DigitEco Power sensor.

USE_SENSOR_DES

Enable if you want use DigitEco Wind Speed sensor.

USE_SENSOR_DED

Enable if you want use DigitEco Wind Direction sensor.

USE_SENSOR_DSR

Enable if you want use DigitEco Global Solar Radiation sensor.

USE_SENSOR_VSR

Enable if you want use 0-5V High Resolution Global Solar Radiation sensor.

USE_SENSOR_DSA

Enable if you want average Global Solar Radiation sensor.

USE_SENSOR_DWA

Enable if you want vectorial average Wind Speed and Direction over 10'.

USE_SENSOR_DWB

Enable if you want vectorial average Wind Speed and Direction over report time.

USE_SENSOR_DWC

Enable if you want gust Wind Speed and Direction over report time.

USE_SENSOR_DWD

Enable if you want average Wind Speed over report time.

USE_SENSOR_DWE

Enable if you want class Wind Speed over report time.

USE_SENSOR_OA2

Enable if you want use OPC PM1, PM2.5, PM10 continuous average value.

USE_SENSOR_OA3
USE_SENSOR_OB2

Enable if you want use OPC PM1, PM2.5, PM10 continuous standard deviation value.

USE_SENSOR_OB3
USE_SENSOR_OC2

Enable if you want use OPC BINS continuous average value.

USE_SENSOR_OC3
USE_SENSOR_OD2

Enable if you want use OPC BINS continuous standard deviation value.

USE_SENSOR_OD3
USE_SENSOR_OE3
USE_SENSOR_LWT

Enable if you want use leaf wetness time continuous value.

USE_SENSOR_HI7

Enable if you want use SI7021 sensor.

USE_SENSOR_BMP

Enable if you want use Bmp085 sensor.

USE_SENSOR_DW1

Enable if you want use DW1 sensor.

USE_SENSOR_TBS

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_TBR

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_STH

Enable if you want use Temperature and humidity oneshot sensor.

USE_SENSOR_ITH

Enable if you want use Temperature and humidity continuous istantaneous sensor.

USE_SENSOR_NTH

Enable if you want use Temperature and humidity continuous minium sensor.

USE_SENSOR_MTH

Enable if you want use Temperature and humidity continuous average sensor.

USE_SENSOR_XTH

Enable if you want use Temperature and humidity continuous maximum sensor.

USE_SENSOR_SSD

Enable if you want use SSD011 oneshot sensor.

USE_SENSOR_ISD

Enable if you want use SSD011 report istantaneous sensor.

USE_SENSOR_NSD

Enable if you want use SSD011 report minium sensor.

USE_SENSOR_MSD

Enable if you want use SSD011 report average sensor.

USE_SENSOR_XSD

Enable if you want use SSD011 report maximum sensor.

USE_SENSOR_SMI

Enable if you want use MICS4514 oneshot sensor.

USE_SENSOR_IMI

Enable if you want use MICS4514 report istantaneous sensor.

USE_SENSOR_NMI

Enable if you want use MICS4514 report minium sensor.

USE_SENSOR_MMI

Enable if you want use MICS4514 report average sensor.

USE_SENSOR_GWS

Enable if you want use Gill Windsonic sensor.

USE_SENSOR_XMI

Enable if you want use MICS4514 report maximum sensor.

USE_SENSOR_RF24

Enable if you want use Radio RF24 sensor.

RAIN_FOR_TIP

How much mm of rain for one tip of tipping bucket rain gauge.

VALUES_TO_READ_FROM_SENSOR_COUNT

Maximum number of values to be read by the sensors.

JSONS_TO_READ_FROM_SENSOR_COUNT
OBSERVATIONS_MINUTES

How much minutes for calculate an observations by processing sampling. Tipically 1-10 minutes.

STATISTICAL_DATA_COUNT

How much observations are needed for generating a report.

OBSERVATION_COUNT

Observations buffer length.

OBSERVATION_COUNT_TOLLERANCE

Tolerance of observations for generating a valid report.

file sensors_config.h

Defines

USE_JSON

Enable if you want use json library for json response (getJson function in SensorDriver).

USE_SENSOR_ADT

Enable if you want use ADT7420 sensor.

USE_SENSOR_HIH

Enable if you want use HIH6100 sensor.

USE_SENSOR_HYT

Enable if you want use HYT271 or HYT221 sensor.

USE_SENSOR_DEP

Enable if you want use DigitEco Power sensor.

USE_SENSOR_OA2

Enable if you want use OPC PM1, PM2.5, PM10 continuous average value.

USE_SENSOR_OA3
USE_SENSOR_OB2

Enable if you want use OPC PM1, PM2.5, PM10 continuous standard deviation value.

USE_SENSOR_OB3
USE_SENSOR_OC2

Enable if you want use OPC BINS continuous average value.

USE_SENSOR_OC3
USE_SENSOR_OD2

Enable if you want use OPC BINS continuous standard deviation value.

USE_SENSOR_OD3
USE_SENSOR_OE3
USE_SENSOR_LWT

Enable if you want use leaf wetness time continuous value.

USE_SENSOR_HI7

Enable if you want use SI7021 sensor.

USE_SENSOR_BMP

Enable if you want use Bmp085 sensor.

USE_SENSOR_DW1

Enable if you want use DW1 sensor.

USE_SENSOR_TBS

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_TBR

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_STH

Enable if you want use Temperature and humidity oneshot sensor.

USE_SENSOR_ITH

Enable if you want use Temperature and humidity continuous istantaneous sensor.

USE_SENSOR_NTH

Enable if you want use Temperature and humidity continuous minium sensor.

USE_SENSOR_MTH

Enable if you want use Temperature and humidity continuous average sensor.

USE_SENSOR_XTH

Enable if you want use Temperature and humidity continuous maximum sensor.

USE_SENSOR_SSD

Enable if you want use SSD011 oneshot sensor.

USE_SENSOR_ISD

Enable if you want use SSD011 report istantaneous sensor.

USE_SENSOR_NSD

Enable if you want use SSD011 report minium sensor.

USE_SENSOR_MSD

Enable if you want use SSD011 report average sensor.

USE_SENSOR_XSD

Enable if you want use SSD011 report maximum sensor.

USE_SENSOR_SMI

Enable if you want use MICS4514 oneshot sensor.

USE_SENSOR_IMI

Enable if you want use MICS4514 report istantaneous sensor.

USE_SENSOR_NMI

Enable if you want use MICS4514 report minium sensor.

USE_SENSOR_MMI

Enable if you want use MICS4514 report average sensor.

USE_SENSOR_GWS

Enable if you want use Gill Windsonic sensor.

USE_SENSOR_XMI

Enable if you want use MICS4514 report maximum sensor.

USE_SENSOR_RF24

Enable if you want use Radio RF24 sensor.

RAIN_FOR_TIP

How much mm of rain for one tip of tipping bucket rain gauge.

VALUES_TO_READ_FROM_SENSOR_COUNT

Maximum number of values to be read by the sensors.

JSONS_TO_READ_FROM_SENSOR_COUNT
OBSERVATIONS_MINUTES

How much minutes for calculate an observations by processing sampling. Tipically 1-10 minutes.

STATISTICAL_DATA_COUNT

How much observations are needed for generating a report.

OBSERVATION_COUNT

Observations buffer length.

OBSERVATION_COUNT_TOLLERANCE

Tolerance of observations for generating a valid report.

file sensors_config.h

Defines

SENSORS_MAX
SENSORS_UNIQUE_MAX
USE_JSON

Enable if you want use json library for json response (getJson function in SensorDriver).

USE_SENSOR_ADT

Enable if you want use ADT7420 sensor.

USE_SENSOR_HIH

Enable if you want use HIH6100 sensor.

USE_SENSOR_HYT

Enable if you want use HYT271 or HYT221 sensor.

USE_SENSOR_DEP

Enable if you want use DigitEco Power sensor.

USE_SENSOR_DES

Enable if you want use DigitEco Wind Speed sensor.

USE_SENSOR_DED

Enable if you want use DigitEco Wind Direction sensor.

USE_SENSOR_DSR

Enable if you want use DigitEco Global Solar Radiation sensor.

USE_SENSOR_VSR

Enable if you want use 0-5V High Resolution Global Solar Radiation sensor.

USE_SENSOR_DSA

Enable if you want average Global Solar Radiation sensor.

USE_SENSOR_DWA

Enable if you want vectorial average Wind Speed and Direction over 10'.

USE_SENSOR_DWB

Enable if you want vectorial average Wind Speed and Direction over report time.

USE_SENSOR_DWC

Enable if you want gust Wind Speed and Direction over report time.

USE_SENSOR_DWD

Enable if you want average Wind Speed over report time.

USE_SENSOR_DWE

Enable if you want class Wind Speed over report time.

USE_SENSOR_OA2

Enable if you want use OPC PM1, PM2.5, PM10 continuous average value.

USE_SENSOR_OA3
USE_SENSOR_OB2

Enable if you want use OPC PM1, PM2.5, PM10 continuous standard deviation value.

USE_SENSOR_OB3
USE_SENSOR_OC2

Enable if you want use OPC BINS continuous average value.

USE_SENSOR_OC3
USE_SENSOR_OD2

Enable if you want use OPC BINS continuous standard deviation value.

USE_SENSOR_OD3
USE_SENSOR_OE3
USE_SENSOR_LWT

Enable if you want use leaf wetness time continuous value.

USE_SENSOR_HI7

Enable if you want use SI7021 sensor.

USE_SENSOR_BMP

Enable if you want use Bmp085 sensor.

USE_SENSOR_DW1

Enable if you want use DW1 sensor.

USE_SENSOR_TBS

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_TBR

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_STH

Enable if you want use Temperature and humidity oneshot sensor.

USE_SENSOR_ITH

Enable if you want use Temperature and humidity continuous istantaneous sensor.

USE_SENSOR_NTH

Enable if you want use Temperature and humidity continuous minium sensor.

USE_SENSOR_MTH

Enable if you want use Temperature and humidity continuous average sensor.

USE_SENSOR_XTH

Enable if you want use Temperature and humidity continuous maximum sensor.

USE_SENSOR_SSD

Enable if you want use SSD011 oneshot sensor.

USE_SENSOR_ISD

Enable if you want use SSD011 report istantaneous sensor.

USE_SENSOR_NSD

Enable if you want use SSD011 report minium sensor.

USE_SENSOR_MSD

Enable if you want use SSD011 report average sensor.

USE_SENSOR_XSD

Enable if you want use SSD011 report maximum sensor.

USE_SENSOR_SMI

Enable if you want use MICS4514 oneshot sensor.

USE_SENSOR_IMI

Enable if you want use MICS4514 report istantaneous sensor.

USE_SENSOR_NMI

Enable if you want use MICS4514 report minium sensor.

USE_SENSOR_MMI

Enable if you want use MICS4514 report average sensor.

USE_SENSOR_GWS

Enable if you want use Gill Windsonic sensor.

USE_SENSOR_XMI

Enable if you want use MICS4514 report maximum sensor.

USE_SENSOR_RF24

Enable if you want use Radio RF24 sensor.

RAIN_FOR_TIP

How much mm of rain for one tip of tipping bucket rain gauge.

VALUES_TO_READ_FROM_SENSOR_COUNT

Maximum number of values to be read by the sensors.

JSONS_TO_READ_FROM_SENSOR_COUNT
file sensors_config.h

Defines

USE_JSON

Enable if you want use json library for json response (getJson function in SensorDriver).

USE_SENSOR_ADT

Enable if you want use ADT7420 sensor.

USE_SENSOR_HIH

Enable if you want use HIH6100 sensor.

USE_SENSOR_HYT

Enable if you want use HYT271 or HYT221 sensor.

USE_SENSOR_DEP

Enable if you want use DigitEco Power sensor.

USE_SENSOR_OA2

Enable if you want use OPC PM1, PM2.5, PM10 continuous average value.

USE_SENSOR_OA3
USE_SENSOR_OB2

Enable if you want use OPC PM1, PM2.5, PM10 continuous standard deviation value.

USE_SENSOR_OB3
USE_SENSOR_OC2

Enable if you want use OPC BINS continuous average value.

USE_SENSOR_OC3
USE_SENSOR_OD2

Enable if you want use OPC BINS continuous standard deviation value.

USE_SENSOR_OD3
USE_SENSOR_OE3
USE_SENSOR_LWT

Enable if you want use leaf wetness time continuous value.

USE_SENSOR_HI7

Enable if you want use SI7021 sensor.

USE_SENSOR_BMP

Enable if you want use Bmp085 sensor.

USE_SENSOR_DW1

Enable if you want use DW1 sensor.

USE_SENSOR_TBS

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_TBR

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_STH

Enable if you want use Temperature and humidity oneshot sensor.

USE_SENSOR_ITH

Enable if you want use Temperature and humidity continuous istantaneous sensor.

USE_SENSOR_NTH

Enable if you want use Temperature and humidity continuous minium sensor.

USE_SENSOR_MTH

Enable if you want use Temperature and humidity continuous average sensor.

USE_SENSOR_XTH

Enable if you want use Temperature and humidity continuous maximum sensor.

USE_SENSOR_SSD

Enable if you want use SSD011 oneshot sensor.

USE_SENSOR_ISD

Enable if you want use SSD011 report istantaneous sensor.

USE_SENSOR_NSD

Enable if you want use SSD011 report minium sensor.

USE_SENSOR_MSD

Enable if you want use SSD011 report average sensor.

USE_SENSOR_XSD

Enable if you want use SSD011 report maximum sensor.

USE_SENSOR_SMI

Enable if you want use MICS4514 oneshot sensor.

USE_SENSOR_IMI

Enable if you want use MICS4514 report istantaneous sensor.

USE_SENSOR_NMI

Enable if you want use MICS4514 report minium sensor.

USE_SENSOR_MMI

Enable if you want use MICS4514 report average sensor.

USE_SENSOR_GWS

Enable if you want use Gill Windsonic sensor.

USE_SENSOR_XMI

Enable if you want use MICS4514 report maximum sensor.

USE_SENSOR_RF24

Enable if you want use Radio RF24 sensor.

RAIN_FOR_TIP

How much mm of rain for one tip of tipping bucket rain gauge.

VALUES_TO_READ_FROM_SENSOR_COUNT

Maximum number of values to be read by the sensors.

JSONS_TO_READ_FROM_SENSOR_COUNT
OBSERVATIONS_MINUTES

How much minutes for calculate an observations by processing sampling. Tipically 1-10 minutes.

STATISTICAL_DATA_COUNT

How much observations are needed for generating a report.

OBSERVATION_COUNT

Observations buffer length.

OBSERVATION_COUNT_TOLLERANCE

Tolerance of observations for generating a valid report.

file sensors_config.h

Defines

USE_JSON

Enable if you want use json library for json response (getJson function in SensorDriver).

USE_SENSOR_ADT

Enable if you want use ADT7420 sensor.

USE_SENSOR_HIH

Enable if you want use HIH6100 sensor.

USE_SENSOR_HYT

Enable if you want use HYT271 or HYT221 sensor.

USE_SENSOR_DEP

Enable if you want use DigitEco Power sensor.

USE_SENSOR_OA2

Enable if you want use OPC PM1, PM2.5, PM10 continuous average value.

USE_SENSOR_OA3
USE_SENSOR_OB2

Enable if you want use OPC PM1, PM2.5, PM10 continuous standard deviation value.

USE_SENSOR_OB3
USE_SENSOR_OC2

Enable if you want use OPC BINS continuous average value.

USE_SENSOR_OC3
USE_SENSOR_OD2

Enable if you want use OPC BINS continuous standard deviation value.

USE_SENSOR_OD3
USE_SENSOR_OE3
USE_SENSOR_LWT

Enable if you want use leaf wetness time continuous value.

USE_SENSOR_HI7

Enable if you want use SI7021 sensor.

USE_SENSOR_BMP

Enable if you want use Bmp085 sensor.

USE_SENSOR_DW1

Enable if you want use DW1 sensor.

USE_SENSOR_TBS

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_TBR

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_STH

Enable if you want use Temperature and humidity oneshot sensor.

USE_SENSOR_ITH

Enable if you want use Temperature and humidity continuous istantaneous sensor.

USE_SENSOR_NTH

Enable if you want use Temperature and humidity continuous minium sensor.

USE_SENSOR_MTH

Enable if you want use Temperature and humidity continuous average sensor.

USE_SENSOR_XTH

Enable if you want use Temperature and humidity continuous maximum sensor.

USE_SENSOR_SSD

Enable if you want use SSD011 oneshot sensor.

USE_SENSOR_ISD

Enable if you want use SSD011 report istantaneous sensor.

USE_SENSOR_NSD

Enable if you want use SSD011 report minium sensor.

USE_SENSOR_MSD

Enable if you want use SSD011 report average sensor.

USE_SENSOR_XSD

Enable if you want use SSD011 report maximum sensor.

USE_SENSOR_SMI

Enable if you want use MICS4514 oneshot sensor.

USE_SENSOR_IMI

Enable if you want use MICS4514 report istantaneous sensor.

USE_SENSOR_NMI

Enable if you want use MICS4514 report minium sensor.

USE_SENSOR_MMI

Enable if you want use MICS4514 report average sensor.

USE_SENSOR_XMI

Enable if you want use MICS4514 report maximum sensor.

USE_SENSOR_RF24

Enable if you want use Radio RF24 sensor.

RAIN_FOR_TIP

How much mm of rain for one tip of tipping bucket rain gauge.

VALUES_TO_READ_FROM_SENSOR_COUNT

Maximum number of values to be read by the sensors.

JSONS_TO_READ_FROM_SENSOR_COUNT
OBSERVATIONS_MINUTES

How much minutes for calculate an observations by processing sampling. Tipically 1-10 minutes.

STATISTICAL_DATA_COUNT

How much observations are needed for generating a report.

OBSERVATION_COUNT

Observations buffer length.

OBSERVATION_COUNT_TOLLERANCE

Tolerance of observations for generating a valid report.

file sensors_config.h

Defines

USE_JSON

Enable if you want use json library for json response (getJson function in SensorDriver).

USE_SENSOR_ADT

Enable if you want use ADT7420 sensor.

USE_SENSOR_HIH

Enable if you want use HIH6100 sensor.

USE_SENSOR_HYT

Enable if you want use HYT271 or HYT221 sensor.

USE_SENSOR_DEP

Enable if you want use DigitEco Power sensor.

USE_SENSOR_OA2

Enable if you want use OPC PM1, PM2.5, PM10 continuous average value.

USE_SENSOR_OA3
USE_SENSOR_OB2

Enable if you want use OPC PM1, PM2.5, PM10 continuous standard deviation value.

USE_SENSOR_OB3
USE_SENSOR_OC2

Enable if you want use OPC BINS continuous average value.

USE_SENSOR_OC3
USE_SENSOR_OD2

Enable if you want use OPC BINS continuous standard deviation value.

USE_SENSOR_OD3
USE_SENSOR_OE3
USE_SENSOR_LWT

Enable if you want use leaf wetness time continuous value.

USE_SENSOR_HI7

Enable if you want use SI7021 sensor.

USE_SENSOR_BMP

Enable if you want use Bmp085 sensor.

USE_SENSOR_DW1

Enable if you want use DW1 sensor.

USE_SENSOR_TBS

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_TBR

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_STH

Enable if you want use Temperature and humidity oneshot sensor.

USE_SENSOR_ITH

Enable if you want use Temperature and humidity continuous istantaneous sensor.

USE_SENSOR_NTH

Enable if you want use Temperature and humidity continuous minium sensor.

USE_SENSOR_MTH

Enable if you want use Temperature and humidity continuous average sensor.

USE_SENSOR_XTH

Enable if you want use Temperature and humidity continuous maximum sensor.

USE_SENSOR_SSD

Enable if you want use SSD011 oneshot sensor.

USE_SENSOR_ISD

Enable if you want use SSD011 report istantaneous sensor.

USE_SENSOR_NSD

Enable if you want use SSD011 report minium sensor.

USE_SENSOR_MSD

Enable if you want use SSD011 report average sensor.

USE_SENSOR_XSD

Enable if you want use SSD011 report maximum sensor.

USE_SENSOR_SMI

Enable if you want use MICS4514 oneshot sensor.

USE_SENSOR_IMI

Enable if you want use MICS4514 report istantaneous sensor.

USE_SENSOR_NMI

Enable if you want use MICS4514 report minium sensor.

USE_SENSOR_MMI

Enable if you want use MICS4514 report average sensor.

USE_SENSOR_XMI

Enable if you want use MICS4514 report maximum sensor.

USE_SENSOR_RF24

Enable if you want use Radio RF24 sensor.

RAIN_FOR_TIP

How much mm of rain for one tip of tipping bucket rain gauge.

VALUES_TO_READ_FROM_SENSOR_COUNT

Maximum number of values to be read by the sensors.

JSONS_TO_READ_FROM_SENSOR_COUNT
OBSERVATIONS_MINUTES

How much minutes for calculate an observations by processing sampling. Tipically 1-10 minutes.

STATISTICAL_DATA_COUNT

How much observations are needed for generating a report.

OBSERVATION_COUNT

Observations buffer length.

OBSERVATION_COUNT_TOLLERANCE

Tolerance of observations for generating a valid report.

file sensors_config.h

Defines

SENSORS_MAX
SENSORS_UNIQUE_MAX
USE_JSON

Enable if you want use json library for json response (getJson function in SensorDriver).

USE_SENSOR_ADT

Enable if you want use ADT7420 sensor.

USE_SENSOR_HIH

Enable if you want use HIH6100 sensor.

USE_SENSOR_HYT

Enable if you want use HYT271 or HYT221 sensor.

USE_SENSOR_DEP

Enable if you want use DigitEco Power sensor.

USE_SENSOR_OA2

Enable if you want use OPC PM1, PM2.5, PM10 continuous average value.

USE_SENSOR_OA3
USE_SENSOR_OB2

Enable if you want use OPC PM1, PM2.5, PM10 continuous standard deviation value.

USE_SENSOR_OB3
USE_SENSOR_OC2

Enable if you want use OPC BINS continuous average value.

USE_SENSOR_OC3
USE_SENSOR_OD2

Enable if you want use OPC BINS continuous standard deviation value.

USE_SENSOR_OD3
USE_SENSOR_OE3
USE_SENSOR_LWT

Enable if you want use leaf wetness time continuous value.

USE_SENSOR_HI7

Enable if you want use SI7021 sensor.

USE_SENSOR_BMP

Enable if you want use Bmp085 sensor.

USE_SENSOR_DW1

Enable if you want use DW1 sensor.

USE_SENSOR_DWA
USE_SENSOR_DWB
USE_SENSOR_DWC
USE_SENSOR_DWD
USE_SENSOR_DWE
USE_SENSOR_DWF
USE_SENSOR_TBS

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_TBR

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_STH

Enable if you want use Temperature and humidity oneshot sensor.

USE_SENSOR_ITH

Enable if you want use Temperature and humidity continuous istantaneous sensor.

USE_SENSOR_NTH

Enable if you want use Temperature and humidity continuous minium sensor.

USE_SENSOR_MTH

Enable if you want use Temperature and humidity continuous average sensor.

USE_SENSOR_XTH

Enable if you want use Temperature and humidity continuous maximum sensor.

USE_SENSOR_SSD

Enable if you want use SSD011 oneshot sensor.

USE_SENSOR_ISD

Enable if you want use SSD011 report istantaneous sensor.

USE_SENSOR_NSD

Enable if you want use SSD011 report minium sensor.

USE_SENSOR_MSD

Enable if you want use SSD011 report average sensor.

USE_SENSOR_XSD

Enable if you want use SSD011 report maximum sensor.

USE_SENSOR_SMI

Enable if you want use MICS4514 oneshot sensor.

USE_SENSOR_IMI

Enable if you want use MICS4514 report istantaneous sensor.

USE_SENSOR_NMI

Enable if you want use MICS4514 report minium sensor.

USE_SENSOR_MMI

Enable if you want use MICS4514 report average sensor.

USE_SENSOR_GWS

Enable if you want use Gill Windsonic sensor.

USE_SENSOR_XMI

Enable if you want use MICS4514 report maximum sensor.

USE_SENSOR_RF24

Enable if you want use Radio RF24 sensor.

RAIN_FOR_TIP

How much mm of rain for one tip of tipping bucket rain gauge.

VALUES_TO_READ_FROM_SENSOR_COUNT

Maximum number of values to be read by the sensors.

JSONS_TO_READ_FROM_SENSOR_COUNT
OBSERVATIONS_MINUTES

How much minutes for calculate an observations by processing sampling. Tipically 1-10 minutes.

STATISTICAL_DATA_COUNT

How much observations are needed for generating a report.

OBSERVATION_COUNT

Observations buffer length.

OBSERVATION_COUNT_TOLLERANCE

Tolerance of observations for generating a valid report.

file sensors_config.h

Defines

USE_JSON

Enable if you want use json library for json response (getJson function in SensorDriver).

USE_SENSOR_ADT

Enable if you want use ADT7420 sensor.

USE_SENSOR_HIH

Enable if you want use HIH6100 sensor.

USE_SENSOR_HYT

Enable if you want use HYT271 or HYT221 sensor.

USE_SENSOR_DEP

Enable if you want use DigitEco Power sensor.

USE_SENSOR_OA2

Enable if you want use OPC PM1, PM2.5, PM10 continuous average value.

USE_SENSOR_OA3
USE_SENSOR_OB2

Enable if you want use OPC PM1, PM2.5, PM10 continuous standard deviation value.

USE_SENSOR_OB3
USE_SENSOR_OC2

Enable if you want use OPC BINS continuous average value.

USE_SENSOR_OC3
USE_SENSOR_OD2

Enable if you want use OPC BINS continuous standard deviation value.

USE_SENSOR_OD3
USE_SENSOR_OE3
USE_SENSOR_LWT

Enable if you want use leaf wetness time continuous value.

USE_SENSOR_HI7

Enable if you want use SI7021 sensor.

USE_SENSOR_BMP

Enable if you want use Bmp085 sensor.

USE_SENSOR_DW1

Enable if you want use DW1 sensor.

USE_SENSOR_TBS

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_TBR

Enable if you want use Tipping bucket rain gauge sensor.

USE_SENSOR_STH

Enable if you want use Temperature and humidity oneshot sensor.

USE_SENSOR_ITH

Enable if you want use Temperature and humidity continuous istantaneous sensor.

USE_SENSOR_NTH

Enable if you want use Temperature and humidity continuous minium sensor.

USE_SENSOR_MTH

Enable if you want use Temperature and humidity continuous average sensor.

USE_SENSOR_XTH

Enable if you want use Temperature and humidity continuous maximum sensor.

USE_SENSOR_SSD

Enable if you want use SSD011 oneshot sensor.

USE_SENSOR_ISD

Enable if you want use SSD011 report istantaneous sensor.

USE_SENSOR_NSD

Enable if you want use SSD011 report minium sensor.

USE_SENSOR_MSD

Enable if you want use SSD011 report average sensor.

USE_SENSOR_XSD

Enable if you want use SSD011 report maximum sensor.

USE_SENSOR_SMI

Enable if you want use MICS4514 oneshot sensor.

USE_SENSOR_IMI

Enable if you want use MICS4514 report istantaneous sensor.

USE_SENSOR_NMI

Enable if you want use MICS4514 report minium sensor.

USE_SENSOR_MMI

Enable if you want use MICS4514 report average sensor.

USE_SENSOR_GWS

Enable if you want use Gill Windsonic sensor.

USE_SENSOR_XMI

Enable if you want use MICS4514 report maximum sensor.

USE_SENSOR_RF24

Enable if you want use Radio RF24 sensor.

RAIN_FOR_TIP

How much mm of rain for one tip of tipping bucket rain gauge.

VALUES_TO_READ_FROM_SENSOR_COUNT

Maximum number of values to be read by the sensors.

JSONS_TO_READ_FROM_SENSOR_COUNT
OBSERVATIONS_MINUTES

How much minutes for calculate an observations by processing sampling. Tipically 1-10 minutes.

STATISTICAL_DATA_COUNT

How much observations are needed for generating a report.

OBSERVATION_COUNT

Observations buffer length.

OBSERVATION_COUNT_TOLLERANCE

Tolerance of observations for generating a valid report.

file i2c-leaf-config.h
#include <sensors_config.h>

Defines

MODULE_VERSION

Module version.

MODULE_TYPE

Type of module. It is defined in registers.h.

CONFIGURATION_DEFAULT_IS_ONESHOT

Oneshot mode for default.

CONFIGURATION_DEFAULT_IS_CONTINUOUS

Continuous mode for default.

CONFIGURATION_DEFAULT_I2C_ADDRESS

Default i2c address.

CONFIGURATION_RESET_PIN

Input pin for reset configuration at startup.

LEAF_POWER_PIN

Output pin for power on and power off leaf sensor.

LEAF_ANALOG_PIN

Input pin for reading leaf sensor value.

SDCARD_CHIP_SELECT_PIN

Chip select for SDcard SPI.

SPI_SPEED

Clock speed for SPI and SDcard.

USE_POWER_DOWN

Enable or disable power down.

DEBOUNCING_POWER_DOWN_TIME_MS

Debounce power down ms.

USE_TIMER_1

Enable or disable timer1.

USE_LEAF_POWER_DOWN

Enable or disable power down for leaf sensor.

WDT_TIMER

Watchdog timer for periodically check microprocessor block states.

Possible value for WDT_TIMER are: WDTO_15MS, WDTO_30MS, WDTO_60MS, WDTO_120MS, WDTO_250MS, WDTO_500MS, WDTO_1S, WDTO_2S, WDTO_4S, WDTO_8S

SENSORS_SAMPLE_TIME_MS

Milliseconds for sampling sensors: 1000 - 60000 [ms] must be integer multiple of TIMER1_INTERRUPT_TIME_MS !!!

SENSORS_SAMPLE_COUNT_MIN

Sample count minimum in OBSERVATIONS_MINUTES minutes.

SENSORS_SAMPLE_COUNT_MAX

Sample count maximum in OBSERVATIONS_MINUTES minutes.

SENSORS_SAMPLE_COUNT_TOLERANCE

Maximum invalid sample count for generate a valid observations.

USE_SENSORS_COUNT

Sensors count.

TIMER1_INTERRUPT_TIME_MS

Value in milliseconds for generating timer1 interrupt: 100 - 8000 [ms].

TIMER1_TCNT1_VALUE

Timer1 timer overflow with 1024 prescaler at 8 MHz.

TIMER_COUNTER_VALUE_MAX_MS

Maximum timer1 counter value for timed tasks.

TIMER_COUNTER_VALUE_MAX_S
LEAF_READ_DELAY_MS

Reading delay.

LEAF_VALUES_READ_DELAY_MS

Reading delay.

LEAF_CALIBRATION_READ_COUNT

Maximum number of retry for leaf reading.

LEAF_READ_COUNT
LEAF_CALIBRATION_OFFSET
file i2c-leaf.h
#include "i2c-leaf-config.h"#include <debug.h>#include <i2c_config.h>#include <avr/sleep.h>#include <avr/power.h>#include <avr/wdt.h>#include <i2c_utility.h>#include <rmap_utility.h>#include <eeprom_utility.h>#include <Wire.h>#include <TimeLib.h>#include <typedef.h>#include <registers-leaf.h>#include <debug_config.h>#include <SdFat.h>#include <StreamUtils.h>#include <ArduinoLog.h>

Defines

leafRead()

Enums

enum state_t

Main loop finite state machine.

Values:

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator REBOOT

reboot the machine

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enum leaf_reading_state_t

Values:

enumerator LEAF_READING_INIT

init task variables

enumerator LEAF_READING_READ
enumerator LEAF_READING_END

performs end operations and deactivate task

enumerator LEAF_READING_WAIT_STATE

non-blocking waiting time

Functions

void init_logging()

Init logging system.

Return

void.

void init_power_down(uint32_t *time_ms, uint32_t debouncing_ms)

Enter power down mode.

Return

void.

Parameters
  • time_ms: pointer to a variable to save the last instant you entered power down.

  • debouncing_ms: delay to power down.

void init_wdt(uint8_t wdt_timer)

Init watchdog.

Return

void.

Parameters
  • wdt_timer: a time value for init watchdog (WDTO_xxxx).

void init_system(void)

Init system.

Return

void.

void init_buffers(void)

Init buffers.

Return

void.

void init_tasks(void)

Init tasks variable and state.

Return

void.

void init_pins(void)

Init hardware pins.

Return

void.

void init_wire(void)

Init wire (i2c) library and performs checks on the bus.

Return

void.

void init_spi(void)

Init SPI library.

Return

void.

void init_rtc(void)

Init RTC module.

Return

void.

void init_sensors(void)

Create and setup sensors.

Return

void.

void print_configuration(void)

Print current configuration.

Return

void.

void load_configuration(void)

Load configuration from EEPROM.

Return

void.

void save_configuration(bool)

Save configuration to EEPROM.

Return

void.

Parameters
  • is_default: if true save default configuration; if false save current configuration.

void commands(void)

Performs specific operations based on the received command.

Return

void.

void reset_samples_buffer(void)

Reset samples buffers to default value.

Return

void.

void reset_report_buffer(void)
void reset_buffer(void)
void exchange_buffers(void)

Exchange reader and writer pointer to buffer.

Return

void.

template<typename sample_g, typename observation_g, typename value_v>
void addSample(sample_g *sample, observation_g *observation, value_v value)
template<typename observation_g, typename value_v>
value_v readCurrentObservation(observation_g *buffer)
template<typename observation_g, typename value_v>
void writeCurrentObservation(observation_g *buffer, value_v value)
template<typename observation_g, typename length_v>
void resetObservation(observation_g *buffer, length_v length)
template<typename observation_g, typename length_v>
void resetBackPmObservation(observation_g *buffer, length_v length)
template<typename observation_g, typename length_v>
void incrementObservation(observation_g *buffer, length_v length)
template<typename observation_g, typename length_v, typename value_v>
void addObservation(observation_g *buffer, length_v length, value_v value)
template<typename observation_g, typename length_v, typename value_v>
value_v readBackObservation(observation_g *buffer, length_v length)
void samples_processing(bool is_force_processing)

Main routine for processing the samples to calculate an observation.

Return

void.

Parameters
  • is_force_processing: if is true, force the calculation of the observation provided there is a minimum number of samples.

void leaf_reading_task(void)

Sensors reading Task. Read data from sensors.

Return

void.

void command_task(void)

Command Task. Execute the command received on i2c bus by reading i2c received data buffer.

Execute the command received on i2c bus by reading i2c received data buffer.

Return

void.

void i2c_request_interrupt_handler(void)

I2C request interrupt handler.

Return

void.

void i2c_receive_interrupt_handler(void)

I2C receive interrupt handler.

Return

void.

Variables

configuration_t configuration

Configuration data.

readable_data_t readable_data_1

First readable i2c register.

readable_data_t readable_data_2

Second readable i2c register.

readable_data_t *readable_data_read_ptr

Pointer for read data in i2c readable register.

readable_data_t *readable_data_write_ptr

Pointer for write data in i2c readable register.

readable_data_t *readable_data_temp_ptr

Temporary pointer for exchange read and write pointer for i2c readable register.

writable_data_t writable_data

Writable i2c register.

writable_data_t *writable_data_ptr

Pointer for read and write data in i2c writable register.

uint8_t readable_data_address

Address of readable i2c register.

uint8_t readable_data_length

Number of bytes to read at readable_data_address.

uint8_t i2c_rx_data[I2C_MAX_DATA_LENGTH]

Buffer for i2c received data.

uint8_t i2c_error

Number of i2c error.

uint8_t ready_tasks_count

Number of tasks ready to execute.

uint32_t awakened_event_occurred_time_ms

System time (in millisecond) when the system has awakened from power down.

bool is_start

Execute start command.

bool is_stop

Execute stop command.

bool is_oneshot

Received command is in oneshot mode.

bool is_continuous

Received command is in continuous mode.

leaf_wetness_t leaf_wetness

leaf_wetness data.

bool is_leaf_init
bool is_leaf_wet
uint8_t samples_count

Number of samples to be acquired for make one observation.

bool do_buffers_reset

Force a buffers reset.

uint16_t timer_counter_ms

Timer counter variable for execute timed task with time multiple of base Timer1 time.

uint16_t timer_counter_s
state_t state

Current main loop state.

leaf_reading_state_t leaf_reading_state
bool is_event_leaf_reading

Enable or disable the Sensors reading task.

bool is_event_command_task

Enable or disable the Command task.

file i2c-leaf.ino
#include "i2c-leaf.h"

Functions

void setup()
void loop()
void logPrefix(Print *_logOutput)
void logSuffix(Print *_logOutput)
void init_logging()

Init logging system.

Return

void.

void init_power_down(uint32_t *time_ms, uint32_t debouncing_ms)

Enter power down mode.

Return

void.

Parameters
  • time_ms: pointer to a variable to save the last instant you entered power down.

  • debouncing_ms: delay to power down.

void init_wdt(uint8_t wdt_timer)

Init watchdog.

Return

void.

Parameters
  • wdt_timer: a time value for init watchdog (WDTO_xxxx).

void init_buffers()

Init buffers.

Return

void.

void init_tasks()

Init tasks variable and state.

Return

void.

void init_pins()

Init hardware pins.

Return

void.

void init_wire()

Init wire (i2c) library and performs checks on the bus.

Return

void.

void init_spi()

Init SPI library.

Return

void.

void init_rtc()

Init RTC module.

Return

void.

void init_system()

Init system.

Return

void.

void print_configuration()

Print current configuration.

Return

void.

void save_configuration(bool is_default)

Save configuration to EEPROM.

Return

void.

Parameters
  • is_default: if true save default configuration; if false save current configuration.

void load_configuration()

Load configuration from EEPROM.

Return

void.

void init_sensors()

Create and setup sensors.

Return

void.

ISR(TIMER1_OVF_vect)

Timer1 overflow interrupts routine.

Return

void.

void i2c_request_interrupt_handler()

I2C request interrupt handler.

Return

void.

void i2c_receive_interrupt_handler(int rx_data_length)

I2C receive interrupt handler.

Return

void.

Parameters
  • [in] rx_data_length: received data length in bytes.

void leaf_reading_task()

Sensors reading Task. Read data from sensors.

Return

void.

void exchange_buffers()

Exchange reader and writer pointer to buffer.

Return

void.

void copy_oneshot_data()
void reset_samples_buffer()

Reset samples buffers to default value.

Return

void.

void reset_buffer()
void reset_report_buffer()
void command_task()

Command Task. Execute the command received on i2c bus by reading i2c received data buffer.

Execute the command received on i2c bus by reading i2c received data buffer.

Return

void.

void tests()

Performs specific operations based on the received command.

Performs tests operations based on the received command.

Return

void.

void commands()

Performs specific operations based on the received command.

Return

void.

file i2c-opc-config.h
#include <sensors_config.h>

Defines

MODULE_VERSION

Module version.

MODULE_TYPE

Type of module. It is defined in registers.h.

CONFIGURATION_DEFAULT_IS_ONESHOT

Oneshot mode for default.

CONFIGURATION_DEFAULT_IS_CONTINUOUS

Continuous mode for default.

CONFIGURATION_DEFAULT_I2C_ADDRESS

Default i2c address.

CONFIGURATION_RESET_PIN

Input pin for reset configuration at startup.

OPC_POWER_PIN

Output pin for power on and power off opc sensor.

OPC_SPI_POWER_PIN
OPC_CHIP_SELECT

Output pin for spi chip select opc sensor.

SDCARD_CHIP_SELECT_PIN

Chip select for SDcard SPI.

SPI_SPEED

Clock speed for SPI and SDcard.

USE_POWER_DOWN

Enable or disable power down.

DEBOUNCING_POWER_DOWN_TIME_MS

Debounce power down ms.

USE_TIMER_1

Enable or disable timer1.

USE_OPC_POWER_DOWN

Enable or disable power down for opc sensor.

WDT_TIMER

Watchdog timer for periodically check microprocessor block states.

Possible value for WDT_TIMER are: WDTO_15MS, WDTO_30MS, WDTO_60MS, WDTO_120MS, WDTO_250MS, WDTO_500MS, WDTO_1S, WDTO_2S, WDTO_4S, WDTO_8S

SENSORS_SAMPLE_TIME_MS

Milliseconds for sampling sensors: 100 - 60000 [ms] must be integer multiple of TIMER1_INTERRUPT_TIME_MS !!!

SENSORS_SAMPLE_COUNT_MIN

Sample count minimum in OBSERVATIONS_MINUTES minutes.

SENSORS_SAMPLE_COUNT_MAX

Sample count maximum in OBSERVATIONS_MINUTES minutes.

SENSORS_SAMPLE_COUNT_TOLERANCE

Maximum invalid sample count for generate a valid observations.

USE_SENSORS_COUNT

Sensors count.

TIMER1_INTERRUPT_TIME_MS

Value in milliseconds for generating timer1 interrupt: 100 - 8000 [ms].

TIMER1_OVERFLOW_TIME_MS

Timer1 timer overflow with 1024 prescaler at 8 or 16 MHz.

Timer1 timer overflow with 1024 prescaler at 8 MHz.

Timer1 timer overflow with 1024 prescaler at 16 MHz.

TIMER1_TCNT1_VALUE

Timer1 timer overflow with 1024 prescaler at 8 MHz.

TIMER1_VALUE_MAX_MS

Maximum timer1 counter value for timed tasks.

OPC_RETRY_COUNT_MAX

Maximum number of retry for opc reading.

file i2c-opc.h
#include "i2c-opc-config.h"#include <debug.h>#include <i2c_config.h>#include <avr/sleep.h>#include <avr/power.h>#include <avr/wdt.h>#include <i2c_utility.h>#include <rmap_utility.h>#include <eeprom_utility.h>#include <Wire.h>#include <TimeLib.h>#include <typedef.h>#include <registers-opc.h>#include <opcxx.h>#include <debug_config.h>#include <SdFat.h>#include <StreamUtils.h>#include <ArduinoLog.h>

Enums

enum state_t

Main loop finite state machine.

Values:

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator REBOOT

reboot the machine

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enum opc_state_t

OPC setup and reading task finite state machine.

Values:

enumerator OPC_INIT
enumerator OPC_SWITCH_ON
enumerator OPC_SEND_COMMAND_FAN_DAC
enumerator OPC_WAIT_RESULT_FAN_DAC
enumerator OPC_SEND_COMMAND_FAN_ON
enumerator OPC_WAIT_RESULT_FAN_ON
enumerator OPC_SEND_COMMAND_LASER_ON
enumerator OPC_WAIT_RESULT_LASER_ON
enumerator OPC_SEND_COMMAND_READ_HISTOGRAM
enumerator OPC_WAIT_RESULT_READ_HISTOGRAM
enumerator OPC_READ_HISTOGRAM
enumerator OPC_END

performs end operations and deactivate task

enumerator OPC_WAIT_STATE

non-blocking waiting time

Functions

void init_logging()

Init logging system.

Return

void.

void init_power_down(uint32_t *time_ms, uint32_t debouncing_ms)

Enter power down mode.

Return

void.

Parameters
  • time_ms: pointer to a variable to save the last instant you entered power down.

  • debouncing_ms: delay to power down.

void init_wdt(uint8_t wdt_timer)

Init watchdog.

Return

void.

Parameters
  • wdt_timer: a time value for init watchdog (WDTO_xxxx).

void init_system(void)

Init system.

Return

void.

void init_buffers(void)

Init buffers.

Return

void.

void init_tasks(void)

Init tasks variable and state.

Return

void.

void init_pins(void)

Init hardware pins.

Return

void.

void init_wire(void)

Init wire (i2c) library and performs checks on the bus.

Return

void.

void init_spi(void)

Init SPI library.

Return

void.

void init_rtc(void)

Init RTC module.

Return

void.

void init_sensors(void)

Create and setup sensors.

Return

void.

void print_configuration(void)

Print current configuration.

Return

void.

void load_configuration(void)

Load configuration from EEPROM.

Return

void.

void save_configuration(bool)

Save configuration to EEPROM.

Return

void.

Parameters
  • is_default: if true save default configuration; if false save current configuration.

void commands(void)

Performs specific operations based on the received command.

Return

void.

void reset_samples_buffer(void)

Reset samples buffers to default value.

Return

void.

void exchange_buffers(void)

Exchange reader and writer pointer to buffer.

Return

void.

template<typename sample_g, typename observation_g, typename values_v, typename value_v>
void addSample(sample_g *sample, observation_g *observation, values_v *values, value_v value)
template<typename observation_g, typename value_v>
value_v readCurrentObservation(observation_g *buffer)
template<typename observation_g, typename value_v>
void writeCurrentObservation(observation_g *buffer, value_v value)
template<typename observation_g, typename length_v>
void resetObservation(observation_g *buffer, length_v length)
template<typename observation_g, typename length_v>
void resetBackPmObservation(observation_g *buffer, length_v length)
template<typename observation_g, typename length_v>
void incrementObservation(observation_g *buffer, length_v length)
template<typename observation_g, typename length_v, typename value_v>
void addObservation(observation_g *buffer, length_v length, value_v value)
template<typename observation_g, typename length_v, typename value_v>
value_v readBackObservation(observation_g *buffer, length_v length)
void samples_processing(bool is_force_processing)

Main routine for processing the samples to calculate an observation.

Return

void.

Parameters
  • is_force_processing: if is true, force the calculation of the observation provided there is a minimum number of samples.

bool observations_processing(void)

Main routine for processing the observations to calculate a value for report.

Return

void.

template<typename sample_g, typename observation_g>
bool make_observation_from_samples(bool is_force_processing, sample_g *sample, observation_g *observation)
template<typename sample_g, typename observation_g, typename value_v, typename val_v>
bool make_value_from_samples_and_observations(sample_g *sample, observation_g *observation, value_v *value)
void opc_task(void)

Opc setup and reading Task. Read data from OPC.

Return

void.

void command_task(void)

Command Task. Execute the command received on i2c bus by reading i2c received data buffer.

Execute the command received on i2c bus by reading i2c received data buffer.

Return

void.

void i2c_request_interrupt_handler(void)

I2C request interrupt handler.

Return

void.

void i2c_receive_interrupt_handler(void)

Variables

configuration_t configuration
readable_data_t readable_data_1
readable_data_t readable_data_2
readable_data_t *readable_data_read_ptr
readable_data_t *readable_data_write_ptr
readable_data_t *readable_data_temp_ptr
writable_data_t writable_data
writable_data_t *writable_data_ptr
uint8_t readable_data_address
uint8_t readable_data_length
uint8_t i2c_rx_data[I2C_MAX_DATA_LENGTH]
uint8_t i2c_error
uint8_t ready_tasks_count
uint32_t awakened_event_occurred_time_ms
bool is_start
bool is_stop
bool is_oneshot
bool is_continuous
sample_t pm1_samples
sample_t pm25_samples
sample_t pm10_samples
sample_t bins_samples[OPC_BINS_LENGTH]
float_observation_t pm1_observations
float_observation_t pm25_observations
float_observation_t pm10_observations
uint16_observation_t bins_observations[OPC_BINS_LENGTH]
uint8_t samples_count
bool do_buffers_reset
uint16_t timer_counter

Timer counter variable for execute timed task with time multiple of base Timer1 time.

state_t state
opc_state_t opc_state

Current sensors reading task state.

bool is_opc_setted
bool is_opc_first_read
uint8_t histogram_error_count
bool is_event_opc_task

Enable or disable the OPC task.

bool is_event_command_task
file i2c-opc.ino
#include "i2c-opc.h"

Functions

void setup()
void loop()
void logPrefix(Print *_logOutput)
void logSuffix(Print *_logOutput)
void init_logging()

Init logging system.

Return

void.

void init_power_down(uint32_t *time_ms, uint32_t debouncing_ms)

Enter power down mode.

Return

void.

Parameters
  • time_ms: pointer to a variable to save the last instant you entered power down.

  • debouncing_ms: delay to power down.

void init_wdt(uint8_t wdt_timer)

Init watchdog.

Return

void.

Parameters
  • wdt_timer: a time value for init watchdog (WDTO_xxxx).

void init_buffers()

Init buffers.

Return

void.

void init_tasks()

Init tasks variable and state.

Return

void.

void init_pins()

Init hardware pins.

Return

void.

void init_wire()

Init wire (i2c) library and performs checks on the bus.

Return

void.

void init_spi()

Init SPI library.

Return

void.

void init_rtc()

Init RTC module.

Return

void.

void init_system()

Init system.

Return

void.

void print_configuration()

Print current configuration.

Return

void.

void save_configuration(bool is_default)

Save configuration to EEPROM.

Return

void.

Parameters
  • is_default: if true save default configuration; if false save current configuration.

void load_configuration()

Load configuration from EEPROM.

Return

void.

void init_sensors()

Create and setup sensors.

Return

void.

ISR(TIMER1_OVF_vect)
void i2c_request_interrupt_handler()

I2C request interrupt handler.

Return

void.

void i2c_receive_interrupt_handler(int rx_data_length)

I2C receive interrupt handler.

Return

void.

Parameters
  • [in] rx_data_length: received data length in bytes.

template<typename sample_g, typename observation_g, typename values_v, typename value_v>
void addSample(sample_g *sample, observation_g *observation, values_v *values, value_v value)
template<typename observation_g, typename value_v>
value_v readCurrentObservation(observation_g *buffer)
template<typename observation_g, typename value_v>
void writeCurrentObservation(observation_g *buffer, value_v value)
template<typename observation_g, typename length_v>
void resetObservation(observation_g *buffer, length_v length)
template<typename observation_g, typename length_v>
void resetBackObservation(observation_g *buffer, length_v length)
template<typename observation_g, typename length_v>
void incrementObservation(observation_g *buffer, length_v length)
template<typename observation_g, typename length_v, typename value_v>
void addObservation(observation_g *buffer, length_v length, value_v value)
template<typename observation_g, typename length_v, typename value_v>
value_v readBackObservation(observation_g *buffer, length_v length)
void samples_processing(bool is_force_processing)

Main routine for processing the samples to calculate an observation.

Return

void.

Parameters
  • is_force_processing: if is true, force the calculation of the observation provided there is a minimum number of samples.

template<typename sample_g, typename observation_g>
bool make_observation_from_samples(bool is_force_processing, sample_g *sample, observation_g *observation)
bool observations_processing()

Main routine for processing the observations to calculate a value for report.

Return

void.

template<typename sample_g, typename observation_g, typename value_v, typename val_v>
bool make_value_from_samples_and_observations(sample_g *sample, observation_g *observation, value_v *value)
void opc_task()

Opc setup and reading Task. Read data from OPC.

Return

void.

void exchange_buffers()

Exchange reader and writer pointer to buffer.

Return

void.

void reset_samples_buffer()

Reset samples buffers to default value.

Return

void.

void reset_observations_buffer()

Reset observations buffers to default value.

Return

void.

void command_task()

Command Task. Execute the command received on i2c bus by reading i2c received data buffer.

Execute the command received on i2c bus by reading i2c received data buffer.

Return

void.

void tests()

Performs specific operations based on the received command.

Performs tests operations based on the received command.

Return

void.

void commands()

Performs specific operations based on the received command.

Return

void.

file i2c-radiation-config.h
#include <sensors_config.h>

Defines

MODULE_VERSION

Module version.

MODULE_TYPE

Type of module. It is defined in registers.h.

IS_CALIBRATION
CONFIGURATION_DEFAULT_IS_ONESHOT

Oneshot mode for default.

CONFIGURATION_DEFAULT_IS_CONTINUOUS

Continuous mode for default.

CONFIGURATION_DEFAULT_I2C_ADDRESS

Default i2c address.

CONFIGURATION_RESET_PIN

Input pin for reset configuration at startup.

ADC_0
ADC_1
ADC_2
ADC_1_I2C_ADDRESS
ADC_2_I2C_ADDRESS
ADC_3_I2C_ADDRESS
ADC_4_I2C_ADDRESS
CONFIGURATION_DEFAULT_ADC_VOLTAGE_OFFSET_1
CONFIGURATION_DEFAULT_ADC_VOLTAGE_OFFSET_2
CONFIGURATION_DEFAULT_ADC_VOLTAGE_MIN
CONFIGURATION_DEFAULT_ADC_VOLTAGE_MAX
ACQUISITION_COUNT_FOR_POWER_RESET
SDCARD_CHIP_SELECT_PIN

Chip select for SDcard SPI.

SPI_SPEED

Clock speed for SPI and SDcard.

USE_POWER_DOWN

Enable or disable power down.

DEBOUNCING_POWER_DOWN_TIME_MS

Debounce power down ms.

USE_TIMER_1

Enable or disable timer1.

WDT_TIMER

Watchdog timer for periodically check microprocessor block states.

Possible value for WDT_TIMER are: WDTO_15MS, WDTO_30MS, WDTO_60MS, WDTO_120MS, WDTO_250MS, WDTO_500MS, WDTO_1S, WDTO_2S, WDTO_4S, WDTO_8S

SENSORS_SAMPLE_TIME_MS

Milliseconds for sampling sensors: 100 - 60000 [ms] must be integer multiple of TIMER1_INTERRUPT_TIME_MS !!!

OBSERVATION_SAMPLES_COUNT_MIN

Sample count minimum in OBSERVATIONS_MINUTES minutes.

OBSERVATION_SAMPLES_COUNT_MAX

Sample count maximum in OBSERVATIONS_MINUTES minutes.

RMAP_REPORT_SAMPLE_VALID
RMAP_REPORT_SAMPLES_COUNT
OBSERVATION_SAMPLE_ERROR_MAX

Maximum invalid sample count for generate a valid observations.

OBSERVATION_SAMPLE_VALID_MIN
RMAP_REPORT_SAMPLE_ERROR_MAX
RMAP_REPORT_SAMPLE_VALID_MIN
RMAP_REPORT_ERROR_MAX
RMAP_REPORT_VALID_MIN
SAMPLES_COUNT
RMAP_REPORT_INTERVAL_S
USE_SENSORS_COUNT

Sensors count.

TIMER1_INTERRUPT_TIME_MS

Value in milliseconds for generating timer1 interrupt: 100 - 8000 [ms].

TIMER1_TCNT1_VALUE

Timer1 timer overflow with 1024 prescaler at 16 MHz.

TIMER_COUNTER_VALUE_MAX_MS

Maximum timer1 counter value for timed tasks.

TIMER_COUNTER_VALUE_MAX_S
SOLAR_RADIATION_READ_DELAY_MS

Reading delay.

SOLAR_RADIATION_VALUES_READ_DELAY_MS

Reading delay.

SOLAR_RADIATION_READ_COUNT

number of read.

file i2c-radiation.h
#include "i2c-radiation-config.h"#include <debug.h>#include <i2c_config.h>#include <avr/sleep.h>#include <avr/power.h>#include <avr/wdt.h>#include <i2c_utility.h>#include <rmap_utility.h>#include <eeprom_utility.h>#include <Wire.h>#include <TimeLib.h>#include <typedef.h>#include <registers-radiation.h>#include <debug_config.h>#include <SdFat.h>#include <StreamUtils.h>#include <ArduinoLog.h>

Enums

enum state_t

Main loop finite state machine.

Values:

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enumerator REBOOT

reboot the machine

enumerator INIT

init tasks and sensors

enumerator TASKS_EXECUTION

execute active tasks

enumerator END

go to ENTER_POWER_DOWN or TASKS_EXECUTION

enum solar_radiation_state_t

RADIATION setup and reading task finite state machine.

Values:

enumerator SOLAR_RADIATION_INIT
enumerator SOLAR_RADIATION_READING
enumerator SOLAR_RADIATION_ELABORATE
enumerator SOLAR_RADIATION_END

performs end operations and deactivate task

enumerator SOLAR_RADIATION_WAIT_STATE

non-blocking waiting time

enum solar_radiation_hr_state_t

Values:

enumerator SOLAR_RADIATION_HR_INIT
enumerator SOLAR_RADIATION_HR_SET
enumerator SOLAR_RADIATION_HR_READ
enumerator SOLAR_RADIATION_HR_EVALUATE
enumerator SOLAR_RADIATION_HR_PROCESS
enumerator SOLAR_RADIATION_HR_END

performs end operations and deactivate task

enumerator SOLAR_RADIATION_HR_WAIT_STATE

non-blocking waiting time

Functions

void init_logging()

Init logging system.

Return

void.

void init_power_down(uint32_t *time_ms, uint32_t debouncing_ms)

Enter power down mode.

Return

void.

Parameters
  • time_ms: pointer to a variable to save the last instant you entered power down.

  • debouncing_ms: delay to power down.

void init_wdt(uint8_t wdt_timer)

Init watchdog.

Return

void.

Parameters
  • wdt_timer: a time value for init watchdog (WDTO_xxxx).

void init_system(void)

Init system.

Return

void.

void init_buffers(void)

Init buffers.

Return

void.

void init_tasks(void)

Init tasks variable and state.

Return

void.

void init_pins(void)

Init hardware pins.

Return

void.

void init_wire(void)

Init wire (i2c) library and performs checks on the bus.

Return

void.

void init_spi(void)

Init SPI library.

Return

void.

void init_rtc(void)

Init RTC module.

Return

void.

void init_sensors(void)

Create and setup sensors.

Return

void.

void print_configuration(void)

Print current configuration.

Return

void.

void load_configuration(void)

Load configuration from EEPROM.

Return

void.

void save_configuration(bool)

Save configuration to EEPROM.

Return

void.

Parameters
  • is_default: if true save default configuration; if false save current configuration.

void commands(void)

Performs specific operations based on the received command.

Return

void.

void tests(void)

Performs specific operations based on the received command.

Performs tests operations based on the received command.

Return

void.

void reset_samples_buffer(void)

Reset samples buffers to default value.

Return

void.

void reset_report_buffer(void)
void exchange_buffers(void)

Exchange reader and writer pointer to buffer.

Return

void.

template<typename buffer_g, typename length_v, typename value_v>
value_v bufferRead(buffer_g *buffer, length_v length)
template<typename buffer_g, typename length_v, typename value_v>
value_v bufferReadBack(buffer_g *buffer, length_v length)
template<typename buffer_g, typename value_v>
void bufferWrite(buffer_g *buffer, value_v value)
template<typename buffer_g>
void bufferPtrReset(buffer_g *buffer)
template<typename buffer_g, typename length_v>
void bufferPtrResetBack(buffer_g *buffer, length_v length)
template<typename buffer_g, typename length_v>
void incrementBuffer(buffer_g *buffer, length_v length)
template<typename buffer_g, typename length_v, typename value_v>
void bufferReset(buffer_g *buffer, length_v length)
template<typename buffer_g, typename length_v, typename value_v>
void addValue(buffer_g *buffer, length_v length, value_v value)
void samples_processing()

Main routine for processing the samples to calculate an observation.

Return

void.

void make_report()
void solar_radiation_task(void)

Wind setup and reading Task. Read data from RADIATION.

Return

void.

void command_task(void)

Command Task. Execute the command received on i2c bus by reading i2c received data buffer.

Execute the command received on i2c bus by reading i2c received data buffer.

Return

void.

void i2c_request_interrupt_handler(void)

I2C request interrupt handler.

Return

void.

void i2c_receive_interrupt_handler(void)

Variables

configuration_t configuration
readable_data_t readable_data_1
readable_data_t readable_data_2
readable_data_t *readable_data_read_ptr
readable_data_t *readable_data_write_ptr
readable_data_t *readable_data_temp_ptr