Below is some of my robot control code, you can see the listed number of serial ports and their numbers in listbox "SPreportLB" then open the one you want with "Serial1.port = 1
connected = Serial1.open" (serial port number one in this case!)
Its easy once you get some example code,
Email me if you have any problems,
mullins@deakin.edu.au
Dim serialPortNum As Integer
Dim i As Integer
dim connected as boolean
// Get the number of serial ports available
serialPortNum = System.SerialPortCount
// Show the number of Serial Ports
SPreportLB.AddRow ""
SPreportLB.Cell(SPreportLB.LastIndex,0) = "Number of Serial Ports: " + Str(serialPortNum)
// Loop through the available serial ports
For i = 0 To serialPortNum - 1
// Add a line for each serial port
SPreportLB.AddRow "Serial Port " + Str(i)+ " ="
SPreportLB.Cell(SPreportLB.LastIndex,1) = System.SerialPort(i).Name
Next
Serial1.port = 1
connected = Serial1.open
if connected then
DisplayField.text=DisplayField.text+"Robot Online"+chr(13)
else
msgBox "There is a problem connecting to the current serial port."
end
