private static string UID = "XYZ"; // Change XYZ to the UID of your Piezo Buzzer Bricklet #endregion Fields #region Methods static void Main() { IPConnection ipcon = new IPConnection(); // Create IP connection BrickletPiezoBuzzer pb = new BrickletPiezoBuzzer(UID, ipcon); // Create device object ipcon.Connect(HOST, PORT); // Connect to brickd // Don't use device before ipcon is connected // Morse SOS pb.MorseCode("... --- ..."); Console.WriteLine("Press enter to exit"); Console.ReadLine(); ipcon.Disconnect(); }
private static string UID = "XYZ"; // Change XYZ to the UID of your Piezo Buzzer Bricklet #endregion Fields #region Methods static void Main() { IPConnection ipcon = new IPConnection(); // Create IP connection BrickletPiezoBuzzer pb = new BrickletPiezoBuzzer(UID, ipcon); // Create device object ipcon.Connect(HOST, PORT); // Connect to brickd // Don't use device before ipcon is connected // Make 2 second beep pb.Beep(2000); Console.WriteLine("Press enter to exit"); Console.ReadLine(); ipcon.Disconnect(); }