Project Digora IOT
Dependencies: libmDot-dev-mbed5
Diff: Sound_sensor.h
- Revision:
- 0:522ad8e780f6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sound_sensor.h Fri May 19 09:26:49 2017 +0000 @@ -0,0 +1,19 @@ +#ifndef SOUND_SENSOR_H +#define SOUND_SENSOR_H + +#include "mbed.h" //inclusion de mbed_os pour l'utilisation de la library + + +class Capt_Son +{ + private: + AnalogIn SonPin; //pin d'entrée analogique initialisé par le constructeur + float Son; //variable dans laquelle on stocke le niveau sonore mesuré + + public: + Capt_Son(); //constructeur + float obtenirSon(); //mesure,affiche et retourne le niveau sonore + +}; + +#endif \ No newline at end of file