This library sets up and LED volume indication function and reading values from the Electret Microphone - MAX4466 Amplifier
Dependents: MAX4466_Hello_World
MAX4466.h
00001 #ifndef MBED_MIC_H 00002 #define MBED_MIC_H 00003 00004 #include "mbed.h" 00005 00006 class MAX4466 { 00007 00008 public: 00009 00010 MAX4466(PinName pin); 00011 00012 void led_array(float x); 00013 00014 void volume_indicator(); 00015 00016 float calibration(); 00017 00018 float sound_level(); 00019 00020 protected: 00021 AnalogIn _pin; 00022 BusOut _led1, _led2, _led3, _led4; 00023 float _value; 00024 float _sum; 00025 float _average; 00026 int _count; 00027 float _sample; 00028 Timer _t; 00029 Timer _t1; 00030 }; 00031 00032 #endif
Generated on Fri Jul 15 2022 02:23:38 by 1.7.2