|
Post by rabaggett on Dec 12, 2008 12:04:50 GMT -5
Open seems to expect only a file path, looking for "com1" as a file.
Is it possible to access a serial port in windows?
(I haven't tried Linux, but I imagine this would be no problem as everything is a file in linux..)
This could be so cool for home control over the internet.
|
|
|
Post by mackrackit on Dec 12, 2008 14:47:03 GMT -5
|
|
|
Post by meerkat on Dec 12, 2008 17:25:20 GMT -5
|
|
|
Post by Carl Gundel - admin on Dec 12, 2008 17:32:21 GMT -5
I don't have a built-in solution in the short term. Sorry. :-(
Perhaps it's possible to hack a solution using the shell$() function and some external utility.
-Carl
|
|
|
Post by mackrackit on Dec 12, 2008 17:44:22 GMT -5
Looks interesting! At one time I was playing with python, pyserial seemed to have some possibilities. Cross platform too.
|
|
|
Post by zoomkat on Dec 13, 2008 20:32:59 GMT -5
I noticed the below reference to the "run" command in another thread. If run basic can execute another application, then simple serial port output might can be done by running a batch file like below to send "your_string" to the serial port. I use a setup like this with apache to operate my pan/tilt cam (bottom). "The only way this can be done now is to write some code to a file and then use the RUN statement to execute it." serial.bat @echo off mode com1:9600,N,8,1 >nul echo your_string >com1
www.geocities.com/zoomkat/ezservo1.htm
|
|
|
Post by StefanPendl on Dec 15, 2008 2:23:52 GMT -5
"The only way this can be done now is to write some code to a file and then use the RUN statement to execute it." serial.bat @echo off mode com1:9600,N,8,1 >nul echo your_string >com1
Run BASIC 1.01 supports the SHELL() function now, which waits for the launched process to end and returns the output as a string.
|
|
|
Post by zoomkat on Dec 16, 2008 0:52:50 GMT -5
You might try the below batch file with the SHELL() function to see if "hello world" is the string returned. If it is, then it would probably be easy to make a helper application to communicate with serial port gizmos and get the returned data from the gizmo.
test.bat
@echo off echo hello world
|
|