Skip to content

Instantly share code, notes, and snippets.

@robzedgames
robzedgames / Traffic Light
Created August 1, 2012 21:13
Ruby and Arduino interaction using Sinatra & serialport
require 'sinatra'
require 'serialport'
configure do
$mode = 3
$serial_port = SerialPort.new("/dev/tty.usbserial-A800eJVv", 9600, 8, 1, SerialPort::NONE)
end
get '/' do
erb :index