Takhle:
Public Class Form1
Dim data As Byte()
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
SerialPort4.Close()
SerialPort4.PortName = "com4"
SerialPort4.BaudRate = 9600
SerialPort4.DataBits = 8
SerialPort4.Parity = IO.Ports.Parity.None
SerialPort4.StopBits = IO.Ports.StopBits.One
SerialPort4.Handshake = IO.Ports.Handshake.None
End Sub
Private Sub zapis_sloupec_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles zapis_sloupec.Click
'posli na seriovy port 90d - prepis 16 bodu vertikalne + posun o sloupec vlevo
SerialPort4.Open()
data = {90}
SerialPort4.Write(data, 0, 1)
SerialPort4.Close()
End Sub
Private Sub zapis_data_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles zapis_data.Click
'posli na seriovy port 0 - 63d (adresa + barva := 00aaaacc, kdy aaaa = 4 bity adresa bodu; cc = 2 bity barva bodu)
SerialPort4.Open()
data = {vstup_dat.Text}
SerialPort4.Write(data, 0, 1)
SerialPort4.Close()
End Sub
....aneb VYŘEŠENO....