Merhaba
Aşağıdaki bu yazılım ile PC'nin Seriport TX çıkışını RX girişine vererek(kısa devre)yaparsak text boxtan girilen data "GÖNDER"e bastıktan sonra mesaj boxta görebilir miyiz?Yanlış bir komut ile seriporta zarar vermek istemiyorum.Teşekkürler.
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'BAĞLAN
SerialPort1.PortName = ComboBox1.Text
SerialPort1.Open()
Button1.Enabled = False
Button3.Enabled = True
Button2.Enabled = True
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
'GÖNDER
SerialPort1.Write(TextBox1.Text)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'BAĞLANTIYI KES
SerialPort1.Close()
Button1.Enabled = True
Button3.Enabled = False
Button2.Enabled = False
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ComboBox1.Text = "COM1"
Button3.Enabled = False
Button2.Enabled = False
End Sub
Private Sub SerialPort1_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
'DATA ALINMASI
Dim gelen_data As String = SerialPort1.ReadLine
MsgBox(gelen_data)
End Sub
End Class