Capturing data from a Serial Port

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
aircooled76
Posts: 38
Joined: Mon May 20, 2013 3:14 pm

Capturing data from a Serial Port

Post by aircooled76 » Thu Jan 30, 2014 4:31 am

Hi Guys,

I am bringing in some Serial data from a scoreboard controller... and I am having trouble bringing it into LiveCode...

I read that the serial input is read from the COM port like reading a file...

I tried

Code: Select all

read from file "COM14" until empty
   put  it after field "SerialOutput"
But no luck... I have also had several LiveCode crashes while playing with the COM info... I have found some posts about Serial data in the forums... but no complete answer that helps me http://ftp.runrev.com/forums/viewtopic. ... 42&p=50853 for example.

Any help appreciated!

dave_probertGA6e24
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 328
Joined: Mon Dec 05, 2011 5:34 pm
Contact:

Re: Capturing data from a Serial Port

Post by dave_probertGA6e24 » Thu Jan 30, 2014 1:26 pm

Hi,

Haven't tried this but I think the "COM14" you have should have a Colon at the end, ie. "COM14:"

Cheers,
Dave
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.

aircooled76
Posts: 38
Joined: Mon May 20, 2013 3:14 pm

Re: Capturing data from a Serial Port

Post by aircooled76 » Fri Jan 31, 2014 10:44 am

Hi Guys...

Adding the ":" got me the data... I now need some kind of read loop as the application crashes if I try to bring in the whole feed at once...

Thank you!

Mike

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: Capturing data from a Serial Port

Post by BvG » Fri Jan 31, 2014 1:13 pm

make sure to report crashes here: http://quality.runrev.com
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

Post Reply