Serial question

4 views
Skip to first unread message

Sophie

unread,
Dec 12, 2009, 12:43:49 AM12/12/09
to ruby-arduino...@googlegroups.com
I do not currently have an LCD. Is there a simple way to print
messages (strings, numbers) back via the USB cable onto a console?

I see serial_begin and serial_println. Are these what I should be using?

What would be a simple Ruby loop to run on the console to listen for
these messages and display them?

And lastly, for when I do get an LCD, which one (model/make/source)
would be the easiest to use from RAD? I have no other specific
requirement on the display.

Any pointers appreciated ...

Thanks!

Justin Catalana

unread,
Dec 12, 2009, 1:46:36 PM12/12/09
to ruby-arduino...@googlegroups.com
Sparkfun sells some serial LCDs which have an onboard PIC, so all you
have to do is send it serial ascii from the Arduino, there are also
control commands to move the cursor around, delete things and change
brightness. The serial can be sent out on any of the gpio, because you
can just bit bang the message (see software serial)

For now, you can communicate over the FTDI serial to usb device which
is built into most arduinos. This chip is used to program the arduino,
but once programming is over, it is free to use for general serial
comm. The Arduino software has a serial monitor, just be sure you set
the port and baudrate(try 9600) correctly. Then when you
serial_begin(9600), you can serial_println messages back to your
computer via the ftdi/usb.

Best
Justin
inhocsignovinces.net
> --
>
> You received this message because you are subscribed to the Google Groups "Ruby Arduino Development" group.
> To post to this group, send email to ruby-arduino...@googlegroups.com.
> To unsubscribe from this group, send email to ruby-arduino-devel...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/ruby-arduino-development?hl=en.
>
>
>

Ron Evans

unread,
Dec 12, 2009, 9:33:53 AM12/12/09
to ruby-arduino...@googlegroups.com
Any terminal software can be used to display the data being written to
the arduino's serial port. No need to actually write any code. I
personally use the unix 'screen' program. For example:

screen /dev/tty.usbaol367 19200

Note you would have to replace '/dev/tty.usbaol367' with the actual
name of the arduino serial port you want to talk to.

A simple sketch to write serial data with a simple message every
second at a baud rate of 19200 bps from an Arduino would be:

class HelloSerial < ArduinoSketch
serial_begin :rate => 19200

def loop
serial_println "Hello"
delay 1000
end
end

Lastly, on the LCD display, we have had very nice results with the
Sparkfun serial-enabled LCD displays such as this one:
http://www.sparkfun.com/commerce/product_info.php?products_id=9395

It is a bit more expensive than a bare LCD display, but dead simple to
use from your arduino sketch.

Hope this helps!

Regards,
Ron Evans (@deadprogram)
http://deadprogrammersociety.com

On Fri, Dec 11, 2009 at 9:43 PM, Sophie <itsm...@hotmail.com> wrote:
> --
>
> You received this message because you are subscribed to the Google Groups "Ruby Arduino Development" group.
> To post to this group, send email to ruby-arduino...@googlegroups.com.
> To unsubscribe from this group, send email to ruby-arduino-devel...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/ruby-arduino-development?hl=en.
>
>
>



--
Ron Evans
310-597-1013
ron....@gmail.com

Sophie

unread,
Dec 12, 2009, 4:55:43 PM12/12/09
to ruby-arduino...@googlegroups.com
Thank you, Ron and Justin.

btw, I am thoroughly enjoying this!

Sophi
Reply all
Reply to author
Forward
0 new messages