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/Speaker.h@0:4b83b332b327, 2017-02-24 (annotated)
- Committer:
- co838_jls44
- Date:
- Fri Feb 24 11:25:05 2017 +0000
- Revision:
- 0:4b83b332b327
- Child:
- 1:c54902f21aa8
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 speaker to play sound */ |
co838_jls44 | 0:4b83b332b327 | 4 | /* The PlayNote method was inspired by an example of the Speaker */ |
co838_jls44 | 0:4b83b332b327 | 5 | |
co838_jls44 | 0:4b83b332b327 | 6 | #ifndef SPEAKER_H_ |
co838_jls44 | 0:4b83b332b327 | 7 | #define SPEAKER_H_ |
co838_jls44 | 0:4b83b332b327 | 8 | |
co838_jls44 | 0:4b83b332b327 | 9 | #include "mbed.h" |
co838_jls44 | 0:4b83b332b327 | 10 | |
co838_jls44 | 0:4b83b332b327 | 11 | class Speaker { |
co838_jls44 | 0:4b83b332b327 | 12 | public: |
co838_jls44 | 0:4b83b332b327 | 13 | Speaker(PinName p); |
co838_jls44 | 0:4b83b332b327 | 14 | ~Speaker() {}; |
co838_jls44 | 0:4b83b332b327 | 15 | |
co838_jls44 | 0:4b83b332b327 | 16 | /* Play note of a piano by taking its frequency, duration */ |
co838_jls44 | 0:4b83b332b327 | 17 | void PlayNote(float frequency, float duration); |
co838_jls44 | 0:4b83b332b327 | 18 | /* Play Spirited away's music */ |
co838_jls44 | 0:4b83b332b327 | 19 | void PlayMusic(); |
co838_jls44 | 0:4b83b332b327 | 20 | /* Play fire sound when player press on enter or back btn */ |
co838_jls44 | 0:4b83b332b327 | 21 | void Fire(); |
co838_jls44 | 0:4b83b332b327 | 22 | /* Play move sound when player move */ |
co838_jls44 | 0:4b83b332b327 | 23 | void Move(); |
co838_jls44 | 0:4b83b332b327 | 24 | |
co838_jls44 | 0:4b83b332b327 | 25 | private: |
co838_jls44 | 0:4b83b332b327 | 26 | PwmOut pin; |
co838_jls44 | 0:4b83b332b327 | 27 | |
co838_jls44 | 0:4b83b332b327 | 28 | }; |
co838_jls44 | 0:4b83b332b327 | 29 | #endif /* SPEAKER_H_ */ |