|
USB
Jan 23, 2008 9:26:17 GMT -5
Post by knoware on Jan 23, 2008 9:26:17 GMT -5
Anyone have any information on how to open a USB port and read and write to it.
|
|
|
USB
Jan 23, 2008 11:53:07 GMT -5
Post by mikeukmid on Jan 23, 2008 11:53:07 GMT -5
I think the only way for now is by using LibertyBASIC (or another language) in conjunction with the USB device DLL and passing info to RunBASIC via a ramdisk file. Using this method I am able to remotely control a Velleman IO board.
Port IO is coming later I believe, but not sure whether that will include USB.
Mike.
|
|
|
USB
Jan 23, 2008 14:34:08 GMT -5
Post by knoware on Jan 23, 2008 14:34:08 GMT -5
I guess my concern is that with any language, the Serial Port is becoming a thing of the past. Even the USB port is giving way to wireless.
I've done USB stuff with Liberty Basic. But the world is moving to the web, and would really like a language that can do web and USB.
I hope, RunBasic, gives us some guidance into what there plans are.
|
|
|
USB
Jan 23, 2008 14:59:15 GMT -5
Post by carlgundel on Jan 23, 2008 14:59:15 GMT -5
I guess my concern is that with any language, the Serial Port is becoming a thing of the past. Even the USB port is giving way to wireless. I've done USB stuff with Liberty Basic. But the world is moving to the web, and would really like a language that can do web and USB. I hope, RunBasic, gives us some guidance into what there plans are. In the near future our focus is going to be mostly multiplatform. This means that USB is not on our radar right now. -Carl
|
|
|
USB
Jan 24, 2008 6:07:22 GMT -5
Post by mikeukmid on Jan 24, 2008 6:07:22 GMT -5
My current opinion is that calldll is now more important than including port IO. As someone else said, LPT and serial ports are fast disappearing. USB IO cards are readily available with dll drivers supplied.
So USB support in a round about way may be easily achievable.
Mike.
|
|
|
USB
Jan 24, 2008 7:26:49 GMT -5
Post by mackrackit on Jan 24, 2008 7:26:49 GMT -5
The good old serial port is alive and well in industrial apps. USB, and the like do not quite make the grade once you leave the office. Wireless with serial protocols is an option for the very long distance. Call dll would be great for windows, but what about linux? Could end up being a "mess" like java IO. Just my two and one half cents.
|
|
rod
New Member
Posts: 40
|
USB
Jan 24, 2008 8:09:01 GMT -5
Post by rod on Jan 24, 2008 8:09:01 GMT -5
USB gets a hard time, sometimes better to think what is on the end of the USB wire. If it is a serial converter then it looks just like a serial port to Windows, if it is a gamepad it looks just like a gamepad to Windows, if it is a camera, memory drive........ etc. The only exception is that Windows does not support analog and digital I/O as a recognised device so a .dll is essential. Now Liberty can hook up to all of these easily, even the I/O .dll.
But I am interested to know what need is seen for Run BASIC, keeping in mind it runs within a browser that has limited access to the client PC?
Really nice to see that folks are interfacing cameras and such but do we expect Run BASIC to have such functionality built in? joystick() to pick an example from Liberty.
|
|
|
USB
Jan 24, 2008 8:27:35 GMT -5
Post by mackrackit on Jan 24, 2008 8:27:35 GMT -5
USB gets a hard time, sometimes better to think what is on the end of the USB wire. If it is a serial converter then it looks just like a serial port to Windows, if it is a gamepad it looks just like a gamepad to Windows, if it is a camera, memory drive........ etc. The only exception is that Windows does not support analog and digital I/O as a recognised device so a .dll is essential. Now Liberty can hook up to all of these easily, even the I/O .dll. But I am interested to know what need is seen for Run BASIC, keeping in mind it runs within a browser that has limited access to the client PC? Really nice to see that folks are interfacing cameras and such but do we expect Run BASIC to have such functionality built in? joystick() to pick an example from Liberty. Yup, everything has its place, even bluetooth I would guess most RB users will not need port IO, so I think RB is good the way it is in that respect. Port IO is platform dependent, so as long as you can do the ramdisk work around when port IO is needed for remote apps I do not think port IO should be built in.
|
|
|
USB
Jan 24, 2008 18:57:20 GMT -5
Post by zoomkat on Jan 24, 2008 18:57:20 GMT -5
Unless you are use to I/O with gizmos, you may not see the need for the capability. Web servers can serve up info, wether it is from files, or hardware connected to the serving computer. Below is a link to the Homeseer home page and the Homeseer forum. Homeseer is a web based home automation application that has done well. With a little tweeking, Run basic could probably do the same. www.homeseer.com/store.homeseer.com/store/Control-Software-C5.aspxforums.homeseer.com/
|
|
Microchip
New Member
I hate computers because I'm sure they hate me. :)
Posts: 7
|
USB
Jan 24, 2008 22:12:24 GMT -5
Post by Microchip on Jan 24, 2008 22:12:24 GMT -5
The use of serial ports are common across Windows, Linux and Apple platforms. It seems pretty natural to me that all three Run BASIC platforms would have a 'open "COMx" for random as #' statement. My current PC has four COM port devices connected to it and it would be great if I could access some of them directly with RB instead of having to resort to data files and semaphore files. It might be fun to tune my DirecTV box through a web interface on my Pocket PC. However, I want instant response not a half second or longer delays made necessary by having two different applications handshake the data back and forth in order to access the serial port.
--Microchip
|
|
|
USB
Jan 25, 2008 0:00:55 GMT -5
Post by carlgundel on Jan 25, 2008 0:00:55 GMT -5
The use of serial ports are common across Windows, Linux and Apple platforms. It seems pretty natural to me that all three Run BASIC platforms would have a 'open "COMx" for random as #' statement. I agree with your angle on this. I am also sensitive to people's desire for access to I/O ports, and DLLs too. I think that Run BASIC could be a great frontend for home automation and remote control for office and industry. -Carl
|
|
|
USB
Jan 25, 2008 12:07:16 GMT -5
Post by zoomkat on Jan 25, 2008 12:07:16 GMT -5
If you want to simplify sending something to the serial port before a more direct solution is offered, you might want to try the below batch file. Have runbasic execute the batch file. I've tried using JB in then past for serial port access with apache, and it was way too clunky to deal with.
@echo off echo status: 204 echo. echo. mode com5:9600,N,8,1 >nul echo.com %QUERY_STRING% >com5 cls
|
|
|
USB
Jan 25, 2008 12:45:00 GMT -5
Post by Alyce on Jan 25, 2008 12:45:00 GMT -5
Have runbasic execute the batch file. How? To be more clear, how does RB execute a BAT or other type of executable file?
|
|
|
USB
Jan 25, 2008 13:55:51 GMT -5
Post by zoomkat on Jan 25, 2008 13:55:51 GMT -5
Have runbasic execute the batch file. How? To be more clear, how does RB execute a BAT or other type of executable file? Probably an erronious assumption on my part based on the reference to running LB in conjunction with RB as a workaround to access the serial port. Then am I to assume RB has no "run" (or equivlent) command?
|
|
|
USB
Jan 25, 2008 14:51:25 GMT -5
Post by billw on Jan 25, 2008 14:51:25 GMT -5
In Run BASIC, the RUN command is used to run a program module. There is currently no built-in way to do that. In a thread I started during the beta testing period, Jarod posted some Just BASIC code that checks a text file for commands at a specified interval and then runs them. HTH, Bill
|
|