how can i monitor the serial port for reading
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 20
- Joined: Sat Jan 24, 2015 2:27 pm
how can i monitor the serial port for reading
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!
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!
Last edited by zhanghuanqian on Tue Jan 19, 2016 2:44 am, edited 1 time in total.
-
- Posts: 20
- Joined: Sat Jan 24, 2015 2:27 pm
Re: how can i monitor the serial port for reading
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:"
so, how can i monitor the serial port for the comming datas and read them crectly?
thanks!
Last edited by zhanghuanqian on Tue Jan 19, 2016 2:46 am, edited 1 time in total.
-
- Posts: 20
- Joined: Sat Jan 24, 2015 2:27 pm
Re: how can i monitor the serial port for reading
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?
Is it a interrupt or another methods to monitor whether the data is send by Arduino or not?
-
- Posts: 20
- Joined: Sat Jan 24, 2015 2:27 pm
-
- Posts: 20
- Joined: Sat Jan 24, 2015 2:27 pm
Re: how can i monitor the serial port for reading
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.
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
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
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
-
- Posts: 20
- Joined: Sat Jan 24, 2015 2:27 pm
Re: how can i monitor the serial port for reading
thanks very much!
Re: how can i monitor the serial port for reading
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!
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!