Apparently the attached screenshot pushed the message over the size limit. Here's the message again without the attachment (really wasn't all that useful anyway).
--John On Wed, Jun 8, 2011 at 6:26 PM, Doug Coleman <[email protected]> wrote: > Hi, > > There's some support for unix serial devices. You can look at the > example in extra/io/serial/ > unix/unix-tests.factor. > > Basically you make a serial object, set the path to the device, > something like "/dev/ttyS0" (you will need permissions, chmod > /det/ttyS0 ...), set the baud rate, flags, etc. Once you create your > serial object, you can call open-serial on it, and it should return a > duplex stream which you can read and write like regular streams. You > might need to call some of the unix libc apis for serial ports; again, > look in the unix-tests file. > > Once you have your duplex-stream serial object, you can write to it: > "abc\n" over stream-write dup stream-flush > > Or read from it: > 10 over stream-read > > Let me know if you have any problems. > > Doug Hi Doug, Thanks for the really fast response. It was just what I was looking for. I apologize for not responding as quickly. I wanted to try your suggestions and see if they worked. I used the two words in unix-tests.factor, changing them for my port and baud rate particulars. When I tried your write example (after executing "serial-test" to create a serial duplex stream), I got the following error message: "Generic word stream-write does not define a method for the serial class." I'll try to attach a listener screen shot, but this list my not allow attachments. By the way, is there a better way to capture listener output (say as text)? I really appreciate your help. Thanks again, --John ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
