RAD Serial Monitor

13 views
Skip to first unread message

David Michael

unread,
Apr 3, 2008, 4:27:48 PM4/3/08
to ruby-arduino...@googlegroups.com
Hello

The one element that is missing from the RAD project that is
available in the Arduino IDE is the "Serial Monitor". While monitoring/
communicating with the serial port can presumably be achieved with
Ruby/SerialPort, I am curious to hear some opinions about wrapping
this into a class included with the RAD installation.

David
http://unnature.net

Greg Borenstein

unread,
Apr 3, 2008, 4:43:57 PM4/3/08
to ruby-arduino...@googlegroups.com
David,

That's a great idea and definitely one of the things I've had in mind
for RAD from the beginning. I was picturing something along the lines
of script/console in Rails: a command you could run to setup a
connection to the Arduino that would also load a bunch of relevant
helpers.

I've played around a very little bit with wrapping the ruby/serialport
gem into a higher-level library, but it would be great if someone
(hint, hint) wanted to take this on as a real project. I've uploaded
my code to the google group here:

http://groups.google.com/group/ruby-arduino-development/files

it's serial_communicator.rb and is really only useful as the beginning
of a map to the (extremely badly documented) ruby/serialport.

Take a look and let me know your thoughts/ideas.

yours,

Greg

da...@unnature.net

unread,
Apr 3, 2008, 5:40:08 PM4/3/08
to Ruby Arduino Development

> I've played around a very little bit with wrapping the ruby/serialport
> gem into a higher-level library, but it would be great if someone
> (hint, hint) wanted to take this on as a real project. I've uploaded
> my code to the google group here:

Thanks for the file upload, this looks like a good starting place. I
definitely like the idea of starting a ./scipt/console style app for
monitoring Arduino communications.

So yeah, hint accepted, Ill take a hack at rounding out a higher level
library for RAD Serial.

Any particular reason "Kernel::require" is used instead of "require"
in serial_communicator.rb?

D

Greg Borenstein

unread,
Apr 3, 2008, 8:43:57 PM4/3/08
to ruby-arduino...@googlegroups.com
I don't really remember, but I think that it won't actually require
normally, that I had to use Kernel::require to get it to work. I never
quite got to the bottom of why. You'll find that ruby/serialport is an
incredibly thin wrapper on the C underpinnings.

-- Greg

David Michael

unread,
Apr 3, 2008, 9:24:28 PM4/3/08
to Ruby Arduino Development
When requiring from IRB, 'require "serialport"' complains and fails to
load, but 'Kernel::require "serialport"' loads fine.

On the flip, when running a script from Ruby, it doesnt complain (or
may do so silently).

I see what you mean about Ruby/SerialPort. The source is pretty
straightforward, but the method names are incredibly cryptic.
Reply all
Reply to author
Forward
0 new messages