Keiarash Zoughi's Multi-Sensor for weather detection.
Dependencies: BMP180 N5110 mbed
main.h@10:d62ac368381c, 2015-05-12 (annotated)
- Committer:
- el13kz
- Date:
- Tue May 12 21:57:36 2015 +0000
- Revision:
- 10:d62ac368381c
Final Version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el13kz | 10:d62ac368381c | 1 | /** |
el13kz | 10:d62ac368381c | 2 | @file main.h |
el13kz | 10:d62ac368381c | 3 | @brief Header file containing functions prototypes, defines and global variables. |
el13kz | 10:d62ac368381c | 4 | @brief Shows examples of creating Doxygen documentation. |
el13kz | 10:d62ac368381c | 5 | @brief Revision 1.0. |
el13kz | 10:d62ac368381c | 6 | */ |
el13kz | 10:d62ac368381c | 7 | |
el13kz | 10:d62ac368381c | 8 | #ifndef MAIN_H |
el13kz | 10:d62ac368381c | 9 | #define MAIN_H |
el13kz | 10:d62ac368381c | 10 | |
el13kz | 10:d62ac368381c | 11 | #define PI 3.14159265359 |
el13kz | 10:d62ac368381c | 12 | |
el13kz | 10:d62ac368381c | 13 | #include "mbed.h" |
el13kz | 10:d62ac368381c | 14 | |
el13kz | 10:d62ac368381c | 15 | |
el13kz | 10:d62ac368381c | 16 | |
el13kz | 10:d62ac368381c | 17 | N5110 lcd(p7,p8,p9,p10,p11,p13,p26); |
el13kz | 10:d62ac368381c | 18 | /** |
el13kz | 10:d62ac368381c | 19 | @namespace lcd |
el13kz | 10:d62ac368381c | 20 | @brief input for lcd screen |
el13kz | 10:d62ac368381c | 21 | */ |
el13kz | 10:d62ac368381c | 22 | |
el13kz | 10:d62ac368381c | 23 | Serial serial(USBTX,USBRX); |
el13kz | 10:d62ac368381c | 24 | /** |
el13kz | 10:d62ac368381c | 25 | @namespace serial |
el13kz | 10:d62ac368381c | 26 | @brief serial port for debugging |
el13kz | 10:d62ac368381c | 27 | */ |
el13kz | 10:d62ac368381c | 28 | |
el13kz | 10:d62ac368381c | 29 | BusOut leds(LED4,LED3,LED2,LED1); |
el13kz | 10:d62ac368381c | 30 | /** |
el13kz | 10:d62ac368381c | 31 | @namespace leds |
el13kz | 10:d62ac368381c | 32 | @brief output for mbed leds |
el13kz | 10:d62ac368381c | 33 | */ |
el13kz | 10:d62ac368381c | 34 | DigitalIn pushbutton1(p19); |
el13kz | 10:d62ac368381c | 35 | /** |
el13kz | 10:d62ac368381c | 36 | @namespace |
el13kz | 10:d62ac368381c | 37 | @brief output for onboard button |
el13kz | 10:d62ac368381c | 38 | */ |
el13kz | 10:d62ac368381c | 39 | |
el13kz | 10:d62ac368381c | 40 | BMP180 bmp180(p28,p27); |
el13kz | 10:d62ac368381c | 41 | /** |
el13kz | 10:d62ac368381c | 42 | @namespace |
el13kz | 10:d62ac368381c | 43 | @brief SDA and SCL line for sensor |
el13kz | 10:d62ac368381c | 44 | */ |
el13kz | 10:d62ac368381c | 45 | |
el13kz | 10:d62ac368381c | 46 | PwmOut Redled(p24); |
el13kz | 10:d62ac368381c | 47 | /** |
el13kz | 10:d62ac368381c | 48 | @namespace |
el13kz | 10:d62ac368381c | 49 | @brief PWM output for onboard led |
el13kz | 10:d62ac368381c | 50 | */ |
el13kz | 10:d62ac368381c | 51 | |
el13kz | 10:d62ac368381c | 52 | int selectedOption1 = 0; |
el13kz | 10:d62ac368381c | 53 | int selectedOption2 = 0; |
el13kz | 10:d62ac368381c | 54 | int selectedOption3 = 0; |
el13kz | 10:d62ac368381c | 55 | int selectedOption4 = 0; |
el13kz | 10:d62ac368381c | 56 | |
el13kz | 10:d62ac368381c | 57 | /** |
el13kz | 10:d62ac368381c | 58 | @brief the variables for the menus |
el13kz | 10:d62ac368381c | 59 | */ |
el13kz | 10:d62ac368381c | 60 | int buttonPressed = 0; |
el13kz | 10:d62ac368381c | 61 | |
el13kz | 10:d62ac368381c | 62 | /** |
el13kz | 10:d62ac368381c | 63 | @brief the button initalized as not pressed |
el13kz | 10:d62ac368381c | 64 | */ |
el13kz | 10:d62ac368381c | 65 | |
el13kz | 10:d62ac368381c | 66 | int cells[84][48]; |
el13kz | 10:d62ac368381c | 67 | /** |
el13kz | 10:d62ac368381c | 68 | @brief boundary conditions of lcd pixels*/ |
el13kz | 10:d62ac368381c | 69 | |
el13kz | 10:d62ac368381c | 70 | Timer t1; |
el13kz | 10:d62ac368381c | 71 | Timer t2; |
el13kz | 10:d62ac368381c | 72 | Timer t3; |
el13kz | 10:d62ac368381c | 73 | Timer t4; |
el13kz | 10:d62ac368381c | 74 | Timer t5; |
el13kz | 10:d62ac368381c | 75 | Timer t6; |
el13kz | 10:d62ac368381c | 76 | /** |
el13kz | 10:d62ac368381c | 77 | @namespace |
el13kz | 10:d62ac368381c | 78 | @brief the timers used for while loops in measure/graph functions |
el13kz | 10:d62ac368381c | 79 | */ |
el13kz | 10:d62ac368381c | 80 | |
el13kz | 10:d62ac368381c | 81 | |
el13kz | 10:d62ac368381c | 82 | |
el13kz | 10:d62ac368381c | 83 | #endif |