Hi,
I have plugged my little Garmin 12X GPS receiver into my serial port (COM1).
I can read anything coming into the port, and do whatever I need to with it.
This is done by simply opening the port, and inputting from it.
(See Code Below)
What I want to know is: How can I tell if my GPS is connected before I do an input there?
If my GPS has shut itself down for no battery or no GPS coverage, it hangs up.
I'm hoping that someone can show me how to do this with 10 lines of code or less -- I can't always follow explanations, but could really appreciate seeing a "Simplest Common Solution" for this.
Thanks,
Ken
Code Follows:
t = FreeFile
open "Com1" for input as #t
10 Rem
input #t, k$
print k$
G$ = Ucase$(Inkey$)
IF G$ <> "Q" then GoTo 10
'otherwise
Close #t
End
------------------
I have plugged my little Garmin 12X GPS receiver into my serial port (COM1).
I can read anything coming into the port, and do whatever I need to with it.
This is done by simply opening the port, and inputting from it.
(See Code Below)
What I want to know is: How can I tell if my GPS is connected before I do an input there?
If my GPS has shut itself down for no battery or no GPS coverage, it hangs up.
I'm hoping that someone can show me how to do this with 10 lines of code or less -- I can't always follow explanations, but could really appreciate seeing a "Simplest Common Solution" for this.
Thanks,
Ken
Code Follows:
t = FreeFile
open "Com1" for input as #t
10 Rem
input #t, k$
print k$
G$ = Ucase$(Inkey$)
IF G$ <> "Q" then GoTo 10
'otherwise
Close #t
End
------------------
Comment