Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Physical Computing with Ruby and Arduino

10,621 views

Published on

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

Published in: Technology, Education
  • Be the first to comment

Physical Computing with Ruby and Arduino

  1. 1. Physical Computing  with Ruby and Arduino  Matthew Williams  @mwilliams  Orlando Ruby Users Group
  2. 2. Barcamp Orlando Anyone?
  3. 3. What's Arduino?  http://www.arduino.cc
  4. 4. Arduino haz Flavor?
  5. 5. http://rad.rubyforge.org/  http://github.com/atduskgreg/rad/
  6. 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. 7. Arduino IDE
  8. 8. RAD IDE
  9. 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. 10. Arduino Code  int ledPin = 13;  void setup() {  pinMode(ledPin, OUTPUT);  }  void loop() {  digitalWrite(ledPin, HIGH);  delay(1000);  digitalWrite(ledPin, LOW);  delay(1000);  }
  11. 11. RAD Code  class HelloWorld <  ArduinoSketch  output_pin 7, :as => :led  def loop  blink led, 1000  end  end
  12. 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. 13. Coming Soon  •Testing  •Arduino Simulator  •Better RubyToC Support  •More quot;Out of the Box Supportquot;  •LCD's  •OLED Displays  •Motors
  14. 14. Arduino Shields  http://www.nycresistor.com/2008/04/21/zach­  smith­demos­his­danger­shield/
  15. 15. http://www.liquidware.com/projects/8/Pin+Visualizer
  16. 16. Buy an Arduino  http://www.sparkfun.com  http://ww.makezine.com  $34.95  (or cheaper)
  17. 17. Awesome Resources  •http://makezine.com/getstartedarduino/  •http://blog.makezine.com/archive/arduino/  •http://arduino.cc/playground
  18. 18. Barduino  http://github.com/mwilliams/barduino
  19. 19. The Barduino  •Arduino  •Breadboard + Wire  •Transistors  •Relays  •Windshield Washer Fluid Pumps  •~$60 Total?  •2 pumps, could handle 14+
  20. 20. Barduino­tender  http://github.com/mwilliams/barduino­tender
  21. 21. Barduino­tender Recipe  drink 'Screwdriver' do  serve_in 'Highball Glass'  ingredients do  2.ounces :vodka  5.ounces :orange_juice  end  end
  22. 22. Want More?  •RubyConf 2008  •Friday  •10:25 ­ 11:05  •Room 3  •Greg Borenstein  •(Big help with this demo)
  23. 23. Let's Serve Some Drinks  (and look at code)

×