Beispiel #1
0
        public static void Clear(this SerialPort port)
        {
            if (!port.IsOpen)
            {
                port.Open();
            }
            var command = VfdCommand.ClearScreen();

            port.Write(command.Command, 0, command.Lenght);
            port.Close();
        }
Beispiel #2
0
 public static void Write(this SerialPort port, VfdCommand command)
 {
     port.EnsureIsOpen();
     port.Write(command.Command, 0, command.Lenght);
     port.Close();
 }
Beispiel #3
0
 /// <summary>
 /// Displays the time counter.
 /// </summary>
 public void DisplayTimeCounter()
 {
     _sp.Write(VfdCommand.DisplayTimeCounter());
 }
Beispiel #4
0
 /// <summary>
 /// Brighnesses the adjustment.
 /// </summary>
 /// <param name="level">The level.</param>
 public void BrighnessAdjustment(byte level)
 {
     _sp.Write(VfdCommand.BrightnessAdjustment(level));
 }
Beispiel #5
0
 /// <summary>
 /// Tests this instance.
 /// </summary>
 public void Test()
 {
     _sp.Write(VfdCommand.Test());
 }