Sensor Data - first assignment CO838
Dependencies: mbed C12832 FXOS8700Q LM75B eCompass_FPU_Lib
Sensor Data - Project developed by Jean-Paul Saysana (jls44)
First assignment for the Internet of Things and Mobile Devices CO838 module
University of Kent (2016-2017)
Functionalities:
- Temperature Sensor
- Compass
- Music box
- Potentiometer that changes LED colours
Libraries used: C12832, eCompass_FPU_Lib, FXOS8700Q, LM75B
include/LCD.h@0:4b83b332b327, 2017-02-24 (annotated)
- Committer:
- co838_jls44
- Date:
- Fri Feb 24 11:25:05 2017 +0000
- Revision:
- 0:4b83b332b327
assignement 1 jls44 finished !
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
co838_jls44 | 0:4b83b332b327 | 1 | /* Developed by Jean-Paul Saysana - jls44 - MSc Student in Computer Security*/ |
co838_jls44 | 0:4b83b332b327 | 2 | /* Internet of Things and Mobile Devices - CO838 University of Kent*/ |
co838_jls44 | 0:4b83b332b327 | 3 | /* Class LCD which contains C12832 sensor*/ |
co838_jls44 | 0:4b83b332b327 | 4 | |
co838_jls44 | 0:4b83b332b327 | 5 | #ifndef LCD_H_ |
co838_jls44 | 0:4b83b332b327 | 6 | #define LCD_H_ |
co838_jls44 | 0:4b83b332b327 | 7 | |
co838_jls44 | 0:4b83b332b327 | 8 | #include <iostream> |
co838_jls44 | 0:4b83b332b327 | 9 | #include "C12832/C12832.h" |
co838_jls44 | 0:4b83b332b327 | 10 | |
co838_jls44 | 0:4b83b332b327 | 11 | #include <vector> |
co838_jls44 | 0:4b83b332b327 | 12 | #include <iterator> |
co838_jls44 | 0:4b83b332b327 | 13 | |
co838_jls44 | 0:4b83b332b327 | 14 | class LCD { |
co838_jls44 | 0:4b83b332b327 | 15 | public: |
co838_jls44 | 0:4b83b332b327 | 16 | LCD(PinName mosi, PinName sck, PinName reset, PinName a0, PinName ncs); |
co838_jls44 | 0:4b83b332b327 | 17 | ~LCD() {} |
co838_jls44 | 0:4b83b332b327 | 18 | |
co838_jls44 | 0:4b83b332b327 | 19 | /* Welcome message when you launch the mbed */ |
co838_jls44 | 0:4b83b332b327 | 20 | void Welcome(); |
co838_jls44 | 0:4b83b332b327 | 21 | /* Clear LCD screen */ |
co838_jls44 | 0:4b83b332b327 | 22 | void Clear(); |
co838_jls44 | 0:4b83b332b327 | 23 | /* Print string in the LCD screen */ |
co838_jls44 | 0:4b83b332b327 | 24 | void Print(std::string const &); |
co838_jls44 | 0:4b83b332b327 | 25 | /* Print the speed for getting data from the mbed */ |
co838_jls44 | 0:4b83b332b327 | 26 | void PrintDelay(float); |
co838_jls44 | 0:4b83b332b327 | 27 | /* Print temperature */ |
co838_jls44 | 0:4b83b332b327 | 28 | void PrintTemperature(float, char); |
co838_jls44 | 0:4b83b332b327 | 29 | /* Print compass */ |
co838_jls44 | 0:4b83b332b327 | 30 | void PrintCompass(float, std::string const &); |
co838_jls44 | 0:4b83b332b327 | 31 | /* Print the main menu */ |
co838_jls44 | 0:4b83b332b327 | 32 | void PrintMenu(int p); |
co838_jls44 | 0:4b83b332b327 | 33 | /* Print quit */ |
co838_jls44 | 0:4b83b332b327 | 34 | void PrintQuit(); |
co838_jls44 | 0:4b83b332b327 | 35 | |
co838_jls44 | 0:4b83b332b327 | 36 | private: |
co838_jls44 | 0:4b83b332b327 | 37 | /* LCD screen */ |
co838_jls44 | 0:4b83b332b327 | 38 | C12832 c_lcd; |
co838_jls44 | 0:4b83b332b327 | 39 | /* vector which contains the options to choose for the main menu*/ |
co838_jls44 | 0:4b83b332b327 | 40 | std::vector<std::string> v_menu; |
co838_jls44 | 0:4b83b332b327 | 41 | }; |
co838_jls44 | 0:4b83b332b327 | 42 | |
co838_jls44 | 0:4b83b332b327 | 43 | #endif /* LCD_H_ */ |