Weather control switch for connected day. NXP LPC 1768 module. Ethernet connectivity.
Dependencies: EthernetInterface mbed-rtos mbed nanoservice_client_1_12
Fork of Trenton_Switch_LPC1768_WIFLY by
Diff: MAX9814/MAX9814.h
- Revision:
- 25:cb16c5248769
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MAX9814/MAX9814.h Wed Dec 03 09:03:29 2014 +0000 @@ -0,0 +1,45 @@ +/* + MAX9814.h - MAX9814 sensor library + Developed by Andrea Corrado +*/ + +/* + Example 'main.cpp' + +#include "mbed.h" +#include "MAX9814.h" +Serial pc (USBTX, USBRX); + + +MAX9814 mic(p20); + +int main() +{ + while (1) { + mic.volume_indicator(); + pc.printf("\n\r Level is %f", mic.sound_level()); + } +} + +*/ + +#ifndef MBED_MIC_H +#define MBED_MIC_H + +#include "mbed.h" + +class MAX9814 { + +public: + + MAX9814(PinName pin); //Analogue in + float sound_level(); + +protected: + AnalogIn _pin; + float _value; + float _sample; + Timer _t,_t1; +}; + +#endif \ No newline at end of file