Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (34 sloc) 945 Bytes

Grove Buzzer modules

Version: 1.0.0-preview3

Connections

Grove Buzzer is connected as followed on Netduino3:

Schematic

Grove Buzzer Mainboard
Yellow wire Socket D5 (D5)

Example of code:

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

namespace TestBuzzer
{
    static class Program
    {
        static void Main()
        {
            // Buzzer module is connected on pin D5 of Netduino3
            Buzzer buzzer=new Buzzer(Netduino3.GpioPin.D5);

            while (true)
            {
                buzzer.TurnOn();
                Thread.Sleep(500);
                buzzer.TurnOff();
                Thread.Sleep(2000);
                buzzer.Beep();
                Thread.Sleep(2000);
            }
        }
    }
}