usb driver problem
Thomas McGrath III
mcgrath3 at mac.com
Sat Jan 15 10:54:01 CST 2011
I now keep getting "file is not open for read" on the cu.usbmodem1a21 and "eof" on the tty.usbmodem1a21
What am I missing here?
-- Tom McGrath III
3mcgrath at comcast.net
On Jan 15, 2011, at 11:18 AM, Thomas McGrath III wrote:
> I am having trouble accessing an Arduino Uno attached to my computer via USB.
> The device driver shows up as "/dev/tty.usbmodem1a21"
> I tried a simple open driver then read from driver then close driver. But Livecode keeps crashing or worse my computer panics and dies.
> on mouseUp
> put "" into field "IOresult"
> open driver "/dev/tty.usbmodem1a21" for binary read // tried text read, text update, binary update
> wait 50
> read from driver "/dev/tty.usbmodem1a21" for 1 line in 4 second // tried for 3 char in 3 seconds, tried until eof
> if it is not "" then
> put "it: " & it into field "IOresult"
> put "result: " & the result into field "IOresult"
> end if
> wait 50
> close driver "/dev/tty.usbmodem1a21"
> end mouseUp
> I just want to read data that is being sent from the board. In Arduino there is a serial monitor which does read the data coming from the board. It is a bunch of numbers one per line as in 1023 then 992 then 992 etc.
> I can't seem to figure out what I am doing wrong. This seems pretty straight forward.
> I sent an email to Mark Weider but then thought that others might also have ideas.
> -- Tom McGrath III
> 3mcgrath at comcast.net
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode