Your SlideShare is downloading. ×
0
Physical Computing 
with Ruby and Arduino 


       Matthew Williams 
         @mwilliams 
  Orlando Ruby Users Group
Barcamp Orlando Anyone?
What's Arduino? 




http://www.arduino.cc
Arduino haz Flavor?
http://rad.rubyforge.org/ 
  http://github.com/atduskgreg/rad/
Arduino 
•14 Digital I/O (6 PWM) 
•6 Analog In 
•16kb Flash Memory 
   •2kb for boot loader 
•16MHz Clock Speed 
•Serial C...
Arduino IDE
RAD IDE
Ruby + Physical Computing 
•Control an Arduino with Ruby 
  •RubyToC 
  •AVR­GCC 
•Most of the Arduino API ported to 
Ruby...
Arduino Code 
int ledPin = 13; 
void setup() { 
  pinMode(ledPin, OUTPUT); 
} 
void loop() { 
  digitalWrite(ledPin, HIGH)...
RAD Code 
class HelloWorld < 
ArduinoSketch 
 output_pin 7, :as => :led 
 def loop 
  blink led, 1000 
 end 
end
RAD Methods 
•input_pin(s) 
•output_pin(s) 
•digitalWrite| digitalRead 
•analogWrite | analogRead 
•serial_print | serial_...
Coming Soon 
•Testing 
•Arduino Simulator 
•Better RubyToC Support 
•More quot;Out of the Box Supportquot; 
  •LCD's 
  •O...
Arduino Shields 




http://www.nycresistor.com/2008/04/21/zach­ 
        smith­demos­his­danger­shield/
http://www.liquidware.com/projects/8/Pin+Visualizer
Buy an Arduino 

http://www.sparkfun.com 
http://ww.makezine.com 


     $34.95 
     (or cheaper)
Awesome Resources 
•http://makezine.com/getstartedarduino/ 
•http://blog.makezine.com/archive/arduino/ 
•http://arduino.cc...
Barduino 


http://github.com/mwilliams/barduino
The Barduino 
•Arduino 
•Breadboard + Wire 
•Transistors 
•Relays 
•Windshield Washer Fluid Pumps 
•~$60 Total? 
•2 pumps,...
Barduino­tender 



http://github.com/mwilliams/barduino­tender
Barduino­tender Recipe 
drink 'Screwdriver' do 
 serve_in 'Highball Glass' 
 ingredients do 
   2.ounces :vodka 
   5.ounc...
Want More? 
•RubyConf 2008 
  •Friday 
  •10:25 ­ 11:05 
  •Room 3 
•Greg Borenstein 
  •(Big help with this demo)
Let's Serve Some Drinks 
   (and look at code)
Physical Computing with Ruby and Arduino
Physical Computing with Ruby and Arduino
Physical Computing with Ruby and Arduino
Physical Computing with Ruby and Arduino
Physical Computing with Ruby and Arduino
Physical Computing with Ruby and Arduino
Upcoming SlideShare
Loading in...5
×

Physical Computing with Ruby and Arduino

9,966

Published on

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

Published in: Technology, Education
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
9,966
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
140
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Transcript of "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)
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×