OK well I can read the data from the USB Serial Modem -- but -- after it is done the app hangs.
So I can open the port and then read the port and I think close the port but the system hangs. HELP.... ?? -- Tom McGrath III http://lazyriver.on-rev.com 3mcgr...@comcast.net On Jan 21, 2011, at 12:48 AM, Thomas McGrath III wrote: > It seems if I set the EOL to CRLF things work partly. i.e. The numbers show > up in the field BUT the script keeps looping and will not stop causing the > beach ball. > > Sarah's code: > on readPort > if the hilite of btn "Port open" = true then > > if recEOL is "empty" then resetEOL > > put the label of btn "Port" into thePort > if the hilite of btn "OS X" then > read from file thePort until recEOL > else > read from file thePort until recEOL > end if > if it is not empty then put it after fld "recField" > if last char of fld "recField" <> cr then put cr after fld "recField" > send readPort to me in 5 ticks > end if > end readPort > > > > -- Tom McGrath III > http://lazyriver.on-rev.com > 3mcgr...@comcast.net > > On Jan 21, 2011, at 12:05 AM, Thomas McGrath III wrote: > >> UPDATE: Something is working but makes no sense. >> >> Found a few terminal screen ideas but they are outside of Livecode. No good. >> Found a few applescript examples but would rather keep this crossplatform if >> possible and a LC to OSC solution would work on iOS but applescript would >> not. Not best but may have to go this route. >> >> Found a few softwares that access the USB modem (not FTDI serial emulation) >> as serial which leads me to believe LC can still do this even with the >> change from software emulation of a serial port to the hardware emulation of >> a serial port. So I looked again at Sarah's serialTest stack. >> >> I had to manually add the /dev/tty.usbmodem1a21 and /dev/cu.usbmodem1a21 to >> the popup menu. Then find replace driver with file in five places in the >> stack. Now most of the other solutions use the tty but two use the cu so I >> tested both. Major hang and LC not responding in Force Quit Window. >> >> Command period no good. >> Esc no good. >> Force quit. quits but no good and driver may still be open. >> >> Unplug Arduino Uno and plug it back in. HUH Serial Input Shows Up In Field >> !!!!!! Beach ball of almost death goes away. Also port is now closed I >> think. Also Arduino Tx led not lighting anymore - should be though. Wait >> replug Arduino rest button on Arduino and serial Tx led is working again. >> But no longer connected to LC. Try again. Open cu port and beach ball of >> almost death shows up - LC not responding in Force Quit Window - Unplug >> Arduino and field fills up with serial data. THe data is a bunch of 1 and 0 >> based on blinking led. >> >> SO this seems to say it is connecting but not communicating well. Not >> knowing enough about serial commands I am not sure what is causing the hang >> and not responding??? They are both set to 9600. I read somewhere that the >> trailing bit is or should be ignored. >> >> Is there another way to connect via message box with out clutter from other >> settings ? Any ideas on what the culprit is here? >> >> Thanks for staying with me on this one. >> >> >> -- Tom McGrath III >> http://lazyriver.on-rev.com >> 3mcgr...@comcast.net >> >> On Jan 15, 2011, at 10:37 PM, Mark Wieder wrote: >> >>> Jacque- >>> >>> Saturday, January 15, 2011, 7:31:30 PM, you wrote: >>> >>>> There's no USB support per se, so if the device doesn't present itself >>>> as a serial port device it won't work. >>> >>>> The path you use when you open a serial port as a file is the same one >>>> you'd use in shell -- use the "/dev/tty.usbmodem1a21" path you >>>> mentioned. Also, see if you can talk to it in shell just as a test. >>> >>> That should work then, since the Arduino driver has always presented >>> itself as a serial port. >>> >>> -- >>> -Mark Wieder >>> mwie...@ahsoftware.net >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode@lists.runrev.com >>> Please visit this url to subscribe, unsubscribe and manage your >>> subscription preferences: >>> http://lists.runrev.com/mailman/listinfo/use-livecode >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode