Degree Computation

Dependencies:   aconno_SEGGER_RTT LSM9DS1 Si7006A20 adc52832_common aconnoMPL115A1 aconno_bsp

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers aconnoConfig.h Source File

aconnoConfig.h

00001 /**
00002  * Made by Jurica @ aconno
00003  * jurica@aconno.com
00004  * More info @ aconno.de
00005  */
00006 
00007 #ifndef __ACONNO_CONFIG_H__
00008 #define __ACONNO_CONFIG_H__
00009 
00010 #define V0                      (0.47)      // In volts 
00011 #define TC                      (0.01)      // In volts 
00012 #define VCC                     (3.6)
00013 #define VALUE_TO_PERCENTAGE     (100)
00014 #define APPLICATION_ID          (0xCF170059)
00015 
00016 #define ADC_REFERENCE           (3.6f)      // adc reference voltage 
00017 #define ADC_RESOLUTION          (1024)      // 10-bit adc            
00018 #define CALIBRATION_STEPS       (20)
00019 #define WAKEUP_TIME_DELAY_MS    (150)       // Time for sensors to wake up
00020 
00021 #define I2C_DATA                (p19)
00022 #define I2C_CLK                 (p20)
00023 #define SPI_MISO                (p5)
00024 #define SPI_MOSI                (p3)
00025 #define SPI_SCLK                (p4)
00026 
00027 #define SENSORS_REFRESH_RATE_MS (1000)      // NOT IN USE!!
00028 // The beacon wakes up every ADV_PERIOD_TIME_MS
00029 #define USER_ADV_PERIOD_TIME_MS (1000-125)
00030 #define ADV_PERIOD_TIME_MS      (USER_ADV_PERIOD_TIME_MS-WAKEUP_TIME_DELAY_MS)      
00031 // The beacon advertises for RADIO_ACTIVE_TIME_MS
00032 #define BLE_PACKETS_TO_SEND     (3)
00033 #define ADV_INTERVAL_MS         (100)        // Adv interval in ms (BLE level!)
00034 #define RADIO_ACTIVE_TIME_MS    (ADV_INTERVAL_MS*BLE_PACKETS_TO_SEND)
00035 #define TX_POWER_DB             (4)
00036 
00037 struct __attribute__((packed, aligned(1))) advertising_packet
00038 {
00039     uint32_t header;
00040     float degree;
00041 };
00042 
00043 #endif  // __ACONNO_CONFIG_H__