private static string UID = "XYZ"; // Change XYZ to the UID of your LCD 16x2 Bricklet #endregion Fields #region Methods static void Main() { IPConnection ipcon = new IPConnection(); // Create IP connection BrickletLCD16x2 lcd = new BrickletLCD16x2(UID, ipcon); // Create device object ipcon.Connect(HOST, PORT); // Connect to brickd // Don't use device before ipcon is connected // Turn backlight on lcd.BacklightOn(); // Write "Hello World" lcd.WriteLine(0, 0, "Hello World"); Console.WriteLine("Press enter to exit"); Console.ReadLine(); ipcon.Disconnect(); }
private static string UID = "XYZ"; // Change XYZ to the UID of your LCD 16x2 Bricklet #endregion Fields #region Methods static void Main() { IPConnection ipcon = new IPConnection(); // Create IP connection BrickletLCD16x2 lcd = new BrickletLCD16x2(UID, ipcon); // Create device object ipcon.Connect(HOST, PORT); // Connect to brickd // Don't use device before ipcon is connected // Turn backlight on lcd.BacklightOn(); // Write a string using the UTF16ToKS0066U function to map to the LCD charset lcd.WriteLine(0, 0, UTF16ToKS0066U("Stromstärke: 5µA")); // Write a string directly including characters from the LCD charset lcd.WriteLine(1, 0, "Drehzahl: 1000s\xe9"); Console.WriteLine("Press enter to exit"); Console.ReadLine(); ipcon.Disconnect(); }