Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.SerialPort1.DataBits = 8
Me.SerialPort1.BaudRate = 115200
Me.SerialPort1.StopBits = Ports.StopBits.One
Me.SerialPort1.Parity = Ports.Parity.None
If (Me.SerialPort1.IsOpen) Then
Me.SerialPort1.Close()
Else
Me.SerialPort1.Open()
Me.SerialPort1.Write("#1 P1500 T100" & Chr(13))
Sleep(1000)
Me.SerialPort1.Write("#1 P800 T100" & Chr(13))
End If
End Sub