-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject_config.h
More file actions
84 lines (62 loc) · 1.53 KB
/
Copy pathproject_config.h
File metadata and controls
84 lines (62 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#include "mbed.h"
#ifndef __MAIN_CONFIG_STATION_DATA__
#define __MAIN_CONFIG_STATION_DATA__
#define MMA8451Q_I2C_ADDRESS (0x1d<<1)
#define TCS34725_I2C_ADDRESS (0x41<<1)
#define TEST_MODE 0
#define NORMAL_MODE 1
#define LOWPOWER_MODE 2
#define ADVANCED_MODE 3
#define NORMAL_MODE_LABEL "NORMAL"
#define TEST_MODE_LABEL "TEST"
#define LOWPOWER_MODE_LABEL "LOWPOWER"
#define ADVANCED_MODE_LABEL "ADVANCED"
//Colors definition
#define NA "N/A"
#define RED "RED"
#define GREEN "GREEN"
#define BLUE "BLUE"
#define TEST_SAMPLING 2
#define NORMAL_SAMPLING 30
#define TEST_SAMPLING_MS 2000
#define NORMAL_SAMPLING_MS 30000
#define TIME_OFFSET 2
#define SAMPLING_TIME 2000
#define STATISTIC_TIME 3600000
#define MAX_MODES 2
//Ranges
#define TEMP_MIN_VALUE -10
#define TEMP_MAX_VALUE 50
#define HUMIDITY_MIN_VALUE 25
#define HUMIDITY_MAX_VALUE 75
#define LIGHT_MIN_VALUE 0
#define LIGHT_MAX_VALUE 100
#define SM_MIN_VALUE 0
#define SM_MAX_VALUE 100
typedef struct {
float max, min, mean;
bool bounds_error;
} sensor_sumary_data;
typedef struct {
float xmax, xmin, ymax, ymin, zmax, zmin;
} acc_sumary_data;
typedef struct {
uint8_t hour, minute, seconds;
float latitude, longitude, altitude, time;
int satellites;
} gps_data;
//Data Structure for RGB
typedef struct {
uint16_t red,green,blue,clear;
char* color;
} rgb_data;
//Data Structure for Accelerometer
typedef struct {
float xPos, yPos, zPos;
bool fall;
} acc_data;
typedef struct {
int sm, light, humidity, temperature;
int red, green, blue;
} sensor_alert_data;
#endif