RE: [libertybasic] Opening serial port
Your method should work OK.
This is what I use:
comport$="com7" ' you can create this string by any convenient means
oncomerror [handleComError] ' having a routine to handle an incorrect com
'port is a good idea.
open comspec$ for random as #MM
You could try each com port in turn until it opens without error but the
command line method is quicker.
From: firstname.lastname@example.org [mailto:email@example.com] On
Behalf Of Fred Jensen
Sent: Monday, 22 July 2013 08:47
Subject: [libertybasic] Opening serial port
I need to start LB with a command line argument indicating the specific
COM port to be used. I know how to get the command line argument from
My system works fine with the line:
open "COM4:9600,N,8,1,CS0,RS,DS0" for random as #PORT
but only on the computer that installs the USB-serial adapter as COM4.
The other machines pick their own COM#'s. Can I use the number from
CommandLine$ to build a string variable and then open that string
variable such as:
open com$ for random as #PORT
Auburn CA USA