Page 1 of 1
how can i monitor the serial port for reading
Posted: Mon Jan 18, 2016 12:05 pm
by zhanghuanqian
hello:
I want to read arduino board by serial port. And how can I monitor when the buffer has some data arrived? I try it by "wait for 3000 milliseconds", but I loss some data. how can I get total data?
thanks!
Re: how can i monitor the serial port for reading
Posted: Mon Jan 18, 2016 1:25 pm
by zhanghuanqian
Code: Select all
open driver "COM5:" for binary update
wait for 3000 milliseconds//if read directly, it will get nothing because Arduino will restart after a cup of and then send data by serial port
read from "COM5:" for 128 uInt1
put it//it can get part of data , not all data
close driver "COM5:"
And, the progress not know when the datas are sended by Arduino board.
so, how can i monitor the serial port for the comming datas and read them crectly?
thanks!
Re: how can i monitor the serial port for reading
Posted: Tue Jan 19, 2016 2:42 am
by zhanghuanqian
My Arduino board send a number every 100 milliseconds from 0 to 65535, but the LC process read the data like "50 48 51 57 51" ,it is not right!
Is it a interrupt or another methods to monitor whether the data is send by Arduino or not?
Re: how can i monitor the serial port for reading
Posted: Wed Jan 20, 2016 10:18 am
by zhanghuanqian
Re: how can i monitor the serial port for reading
Posted: Fri Jan 22, 2016 7:28 am
by zhanghuanqian
mm, perhaps it is not clearly.
I write a program by LC7.0(os:win 7) to read the data sent by Arduino board, the data is large and random. So I cant deal with it.
Re: how can i monitor the serial port for reading
Posted: Fri Feb 12, 2016 10:17 am
by mexicanto
Check this two files
I made this about a year ago, and i uploaded to facebook, livecode latinamerican group
hope this can help you
the two files (arduino and LC) are the ones with the name full_control_01
www facebook com/groups/livecodela/files/
just add the dots in the right place in the web address
Re: how can i monitor the serial port for reading
Posted: Sun Feb 14, 2016 1:34 pm
by zhanghuanqian
thanks very much!
Re: how can i monitor the serial port for reading
Posted: Mon Feb 15, 2016 6:23 am
by mexicanto
You are welcome
Please, let me know your experience working with the codes
Another thing, i recommend you to start playing with the ESP8266 module, is like arduino, but wifi, that means, no cables attached!