Sign in to follow this  
Followers 0
paulpmeier

Reading from serial ports with FileRead

7 posts in this topic

A usefull feature of the FileOpen function:

FileOpen("Com1", 4) opens the first serial port for binary input.

The exsample shows reading NMEA-data from a GPS receiver via Com4.

HotKeySet("{ESC}", "Terminate")

$file = FileOpen("COM4", 4)
While 1
    $chr = FileRead($file, 1)
    ConsoleWrite($chr)
WEnd

Func Terminate()
  FileClose($file)
  Exit
EndFunc

Posted Image

See also: Console Input - Read from console with FileRead

Share this post


Link to post
Share on other sites



omg, awesome :)

thank you >_<


[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
Share on other sites

Great, thanks!


UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt.

Share this post


Link to post
Share on other sites

I think you for this. It came up in a google search for gps nmea reading and has helped me greatly.

Share this post


Link to post
Share on other sites

I cannot seem to get this to work, does this work with the current autoit build?


0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

Share this post


Link to post
Share on other sites

No.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Some times I wish the raw read mode was not removed... Its removal also meant that random fun things like this can't be done as easily anymore :oops:


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0