Skip to content

Serial Communication

atduskgreg edited this page Sep 12, 2010 · 1 revision

A Guide to Serial Communication with RAD

What It Is

rs-232, usb, etc.

What It’s Good For

computer-to-arduino communication
lots of other devices

How to Use It – General

available
read
print
type issues on read

debugging with screen

How to Use It – RAD


class Basic < ArduinoSketch
  serial_begin

  def loop
    serial_println "hello"
  end    
end

How it Works

How to Use It – Advanced


class SerialTerm < ArduinoSketch
  serial_begin

  def loop
    if serial_available
      serial_print serial_read
      toggle 13
    end
  end    
end

Where to Get It

all you need is a serial cable: usb device cable or ttl-232

Read More

Igoe