[C.CC USERS] Serial status?
Michael Pirrone-Brusse
pirronm at allegheny.edu
Sun Aug 22 21:17:01 BST 2010
Hey Goran,
The basic Arduino models do only have the one serial port, so I'm not
sure what would have to go into getting a pair of RF transceivers and an SD
card hooked up to one duemilanove, but... We do have serial working in the
plumbing library. Yaay! I guess...
Anyway. We've yet to implement serial operations for the Arduino under a
process-oriented paradigm, so everything's a one-off process. First thing
you've gotta do is call
serial.setup (serial.port, baud.rate)
where serial.port is either TX0, RX0, TX1, etc. It's really important
you use the symbolic constants that go along with serial ports.
Once setup has been called, you've access first to serial.read.byte,
serial.write.byte, serial.write.int, serial.write.int32 (though I thought
this one was broken... guess someone got it working?), serial.write.string
and serial.write.newline.
In every one of those process, the two parameters you need to pass are
first the serial pin (either TX# or RX#) you're going to be communicating
over, and then what's going to be communicated. This includes
serial.read.byte. The BYTE you pass to that process gets set to whatever is
read in.
What I'd like to do is just point you in the direction of some
documentation on this subject, but I'm not sure there's any out there...
Best I can do right now is point you to the source of printing.module (a
piece of plumbing.module where we keep the serial function wrappers), and
hope the comments are enough to help answer any questions you might have.
http://projects.cs.kent.ac.uk/projects/kroc/trac/browser/kroc/trunk/tvm/arduino/occam/include/printing.module
Best of luck,
-Drew
On Sat, Aug 21, 2010 at 7:52 PM, Göran Sander <goran.sander at gmail.com>wrote:
> Being new to Plumbing, I was looking into the possibility of using it for
> an application where I want to connect a radio frequency transceiver to an
> Arduino, log some of the data received to an SD card hooked up to the
> Arduino, and also send/receive data over another RF link (or Ethernet
> connection) to/from a Linux host.
>
> So... for that I need access to serial functions and some other things
> available in the standard Arduino environment.
> What is the status of e.g. serial in Plumbing?
>
> Thanks,
> Goran
>
> _______________________________________________
> users mailing list
> users at concurrency.cc
> http://unhosting.org/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.concurrency.cc/pipermail/users/attachments/20100822/0ec22191/attachment.htm>
More information about the users
mailing list