Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (31 sloc) 931 Bytes

Grove SoundSensor modules

Version: 1.0.0-preview3

Connections

Grove SoundSensor is connected as followed on Netduino3:

Schematic

Grove SoundSensor Mainboard with base shield
Yellow wire Socket A0

Example of code:

using System.Diagnostics;
using System.Threading;
using Bauland.Grove;
using Bauland.Pins;

namespace TestSoundSensor
{
    static class Program
    {
        static void Main()
        {
            // Grove SoundSensor module is connected on pin A0 of Netduino3 with base shield
            SoundSensor soundSensor=new SoundSensor(Netduino3.AdcChannel.A0);

            while (true)
            {
                Debug.WriteLine("Level: "+soundSensor.ReadLevel().ToString("F"));
                Thread.Sleep(1000);
            }
        }
    }
}