Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Electrit Microphone Sensor


  • Please log in to reply
1 reply to this topic

#1 mohammad

mohammad

    Advanced Member

  • Members
  • PipPipPip
  • 79 posts

Posted 27 May 2013 - 06:03 PM

Hi,

 

Is there anyone who has already worked with Electret Micrphone Sensor? I need to detect the noise in my room, so I wired the sensor simply to my Netduino Plus (5v, GND, Analog Pin 0), and I am getting random values (70 to 130) which are independent to the existing noise.

 

-My code:

    public class Program    {        public static void Main()        {            SecretLabs.NETMF.Hardware.AnalogInput inp = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A0);                        while(true)            {                Debug.Print(inp.Read().ToString());                Thread.Sleep(100);            }            }    }


#2 mohammad

mohammad

    Advanced Member

  • Members
  • PipPipPip
  • 79 posts

Posted 28 May 2013 - 07:05 PM

According to the comments on the Sparkfun page https://www.sparkfun.com/products/9964, [color=#008000;]I could solve the problem[/color]. Somebody recommended to write a tight loop (e.g. 100ms) to get the min and max values. The difference between the two will give us the volume (sound pressure) during that time.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.