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
Diff: include/LED.h
- Revision:
- 0:4b83b332b327
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/LED.h Fri Feb 24 11:25:05 2017 +0000 @@ -0,0 +1,29 @@ +/* Developed by Jean-Paul Saysana - jls44 - MSc Student in Computer Security*/ +/* Internet of Things and Mobile Devices - CO838 University of Kent*/ +/* class LED which contains 3 colors of led*/ +#ifndef LED_H_ +#define LED_H_ + +#include "mbed.h" + +class LED { +public: + LED(PinName R, PinName G, PinName B); + ~LED() {}; + + /* enum to see which LED to switch on and off. */ + enum eLED {RED = 0, GREEN = 1, BLUE = 2}; + /* switch on LED */ + void SwitchOn(eLED); + /* switch Off selected led*/ + void SwitchOff(DigitalOut); + /* switch off all led */ + void SwitchOffAll(); + +private: + DigitalOut red; //D5 + DigitalOut green; //D8 + DigitalOut blue; //D9 +}; + +#endif /* LED_H_ */ \ No newline at end of file