Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.
0 Members and 1 Guest are viewing this topic.
Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load End SubEnd Class
ComboBox1.Items.Add(115200)ComboBox1.Items.Add(57600)ComboBox1.Items.Add(38400)ComboBox1.Items.Add(28800)ComboBox1.Items.Add(19200)ComboBox1.Items.Add(14400)ComboBox1.Items.Add(9600)ComboBox1.SelectedIndex = 0
MySerialPort.BaudRate = Convert.ToInt32(ComboBox1.SelectedItem.ToString)
Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged If ListBox1.SelectedIndex <> -1 Then If CheckBox1.CheckState = CheckState.Checked Then Send_Button.Enabled = True End If End If End Sub
Private Sub Send_Button_Click(sender As Object, e As EventArgs) Handles Send_Button.Click If MySerialPort.IsOpen() Then incomingData = "" outgoingData = Sending_TextBox.Text 'If you wanted the ability to automatically progress through a list of commands, 'then this is where you would start the process by sending the first command in the list of commands to send. SendOutgoingData() Receiving_TextBox.Text = "" If CheckBox1.CheckState = CheckState.Unchecked Then Send_Button.Enabled = False End If End If End Sub