mbed Sensor node for Instrumented Booth over ETH.

Dependencies:   EthernetInterface-1 MaxbotixDriver Presence HTU21D_TEMP_HUMID_SENSOR_SAMPLE Resources SHARPIR mbed-rtos mbed-src WDT_K64F nsdl_lib

Fork of Trenton_Switch_LPC1768_ETH by Demo Team

MAX9814/MAX9814.h

Committer:
andcor02
Date:
2015-07-16
Revision:
46:807e9cf63f4c
Parent:
25:cb16c5248769

File content as of revision 46:807e9cf63f4c:

/*
    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