Hi everybody
I want to use the serial port class in the .Net Framework to access COM-port devices.
I am presently able to open a port and send some data over the port as follows:
#light
open
System.IO.Ports
let
availablePortsArray = SerialPort.GetPortNames
let
s1 = new SerialPort ("COM5",9600)
if
s1.IsOpen then print_endline "Port is Open"
s1.Open()
s1.Write
"0xFF"
s1.Write
"Hello World"
s1.Close()
if
s1.IsOpen then print_endline "Port is Open"//end of code
FSI output:
val availablePortsArray : unit -> string []
val s1 : SerialPort
How do I access the array "availablePortsArray" to see what ports are
available for the current computer?
Kind Regards