Physical Computing with Ruby and Arduino

  • 9,713 views
Uploaded on

Matthew Williams's talk on the Arduino at the Orlando Ruby Users Group on October 17th, 2008

Matthew Williams's talk on the Arduino at the Orlando Ruby Users Group on October 17th, 2008

More in: Technology , Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
9,713
On Slideshare
0
From Embeds
0
Number of Embeds
5

Actions

Shares
Downloads
136
Comments
0
Likes
4

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Physical Computing  with Ruby and Arduino  Matthew Williams  @mwilliams  Orlando Ruby Users Group
  • 2. Barcamp Orlando Anyone?
  • 3. What's Arduino?  http://www.arduino.cc
  • 4. Arduino haz Flavor?
  • 5. http://rad.rubyforge.org/  http://github.com/atduskgreg/rad/
  • 6. Arduino  •14 Digital I/O (6 PWM)  •6 Analog In  •16kb Flash Memory  •2kb for boot loader  •16MHz Clock Speed  •Serial Communication  •USB Powered (or AC)  •I2C
  • 7. Arduino IDE
  • 8. RAD IDE
  • 9. Ruby + Physical Computing  •Control an Arduino with Ruby  •RubyToC  •AVR­GCC  •Most of the Arduino API ported to  Ruby  •Additional libraries  •Serial communications  •Servos
  • 10. Arduino Code  int ledPin = 13;  void setup() {  pinMode(ledPin, OUTPUT);  }  void loop() {  digitalWrite(ledPin, HIGH);  delay(1000);  digitalWrite(ledPin, LOW);  delay(1000);  }
  • 11. RAD Code  class HelloWorld <  ArduinoSketch  output_pin 7, :as => :led  def loop  blink led, 1000  end  end
  • 12. RAD Methods  •input_pin(s)  •output_pin(s)  •digitalWrite| digitalRead  •analogWrite | analogRead  •serial_print | serial_read  •Keeping it simple  •It's all about the hardware
  • 13. Coming Soon  •Testing  •Arduino Simulator  •Better RubyToC Support  •More quot;Out of the Box Supportquot;  •LCD's  •OLED Displays  •Motors
  • 14. Arduino Shields  http://www.nycresistor.com/2008/04/21/zach­  smith­demos­his­danger­shield/
  • 15. http://www.liquidware.com/projects/8/Pin+Visualizer
  • 16. Buy an Arduino  http://www.sparkfun.com  http://ww.makezine.com  $34.95  (or cheaper)
  • 17. Awesome Resources  •http://makezine.com/getstartedarduino/  •http://blog.makezine.com/archive/arduino/  •http://arduino.cc/playground
  • 18. Barduino  http://github.com/mwilliams/barduino
  • 19. The Barduino  •Arduino  •Breadboard + Wire  •Transistors  •Relays  •Windshield Washer Fluid Pumps  •~$60 Total?  •2 pumps, could handle 14+
  • 20. Barduino­tender  http://github.com/mwilliams/barduino­tender
  • 21. Barduino­tender Recipe  drink 'Screwdriver' do  serve_in 'Highball Glass'  ingredients do  2.ounces :vodka  5.ounces :orange_juice  end  end
  • 22. Want More?  •RubyConf 2008  •Friday  •10:25 ­ 11:05  •Room 3  •Greg Borenstein  •(Big help with this demo)
  • 23. Let's Serve Some Drinks  (and look at code)