Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

LABS
GoGaRuCo '09 – Arduino is Rails for hardware hacking – Greg Borenstein

Arduino is Rails for hardware hacking – Greg Borenstein

Intro

Greg Borenstein

GoGaRuCo '09 - Arduino is Rails for hardware hacking - Greg Borenstein

Obligatory safety talk

Electrical engineering is for experts!

Physical computing is for everyone!

  • Artists!
  • Idealists – Fab labs in India
  • Hackers – Cockroach driven robot. Cockroach runs, spins ball, drives robot

Physical computing is programming for stuff
read inputs from your surroundings and modify them based on logic

[Arduino](http://www.arduino.cc/)

Open source hardware and software project that makes physical computing really easy

arduino

  • Program via USB
  • power via 9v
  • 14 digital i/o pins
  • AVR microcontroller
  • 6 analog i/o pins

Most of the API is for sensing and controlling the physical world.

HELLO WORLD – make an LED blink on and off

class HelloWorld < ArduinoSketch
  output_pin 13, :as => led

  def loop
    led.blink(500)
  end
end

GoGaRuCo '09 - Arduino is Rails for hardware hacking - Greg Borenstein

RAD is Ruby Arduino Development

In a hardware demo, everyone is required to go “Oooooooooooh” (even if it doesn’t work)

rad command generates a project directories

You can buy an Arduino board for ~$30 from Make
or a Dorkboard for ~$6

Bell rings as a post commit-hook for git

.git/hooks/post-commit
require ‘bell.rb’
Bell.ring
exit 0

Demo Reason + Archeopteryx playing a drum

GoGaRuCo '09 - Arduino is Rails for hardware hacking - Greg Borenstein

  • Play midi via Reason
  • Playing same midi through arduino, a motor, a drumstick and a snare drum

Archeopteryx: code describes patterns with channels, and randomness.

Reason sends midi to Tascam midi device, Tascam sends to Arduino, which turns solenoid attached to drumstick.

Physical computing is for everyone, if you’ve ever wanted to make your code interact with the world, now you can.

Q: Can you use this to play rockband?
A: Yes. You can use a photoresistor to detect notes coming across the line.

Q: Are there latency problems with midi playback?
A: The clockspeed of the arduino is fast enough to keep up with the playback.

Comments
Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *