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