Physical Computing with Ruby and Arduino
-
Upload
orug -
Category
Technology
-
view
9.934 -
download
2
description
Transcript of Physical Computing with Ruby and Arduino
![Page 1: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/1.jpg)
Physical Computing with Ruby and Arduino
Matthew Williams @mwilliams
Orlando Ruby Users Group
![Page 2: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/2.jpg)
Barcamp Orlando Anyone?
![Page 3: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/3.jpg)
What's Arduino?
http://www.arduino.cc
![Page 4: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/4.jpg)
![Page 5: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/5.jpg)
Arduino haz Flavor?
![Page 6: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/6.jpg)
![Page 7: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/7.jpg)
![Page 8: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/8.jpg)
http://rad.rubyforge.org/ http://github.com/atduskgreg/rad/
![Page 9: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/9.jpg)
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
![Page 10: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/10.jpg)
Arduino IDE
![Page 11: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/11.jpg)
RAD IDE
![Page 12: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/12.jpg)
Ruby + Physical Computing
•Control an Arduino with Ruby •RubyToC •AVRGCC
•Most of the Arduino API ported to Ruby •Additional libraries •Serial communications •Servos
![Page 13: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/13.jpg)
Arduino Code int ledPin = 13; void setup() pinMode(ledPin, OUTPUT); void loop() digitalWrite(ledPin, HIGH); delay(1000); digitalWrite(ledPin, LOW); delay(1000);
![Page 14: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/14.jpg)
RAD Code class HelloWorld < ArduinoSketch output_pin 7, :as => :led def loop blink led, 1000 end end
![Page 15: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/15.jpg)
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
![Page 16: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/16.jpg)
Coming Soon •Testing •Arduino Simulator •Better RubyToC Support •More "Out of the Box Support" •LCD's •OLED Displays •Motors
![Page 17: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/17.jpg)
Arduino Shields
http://www.nycresistor.com/2008/04/21/zach smithdemoshisdangershield/
![Page 18: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/18.jpg)
![Page 19: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/19.jpg)
![Page 20: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/20.jpg)
![Page 21: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/21.jpg)
http://www.liquidware.com/projects/8/Pin+Visualizer
![Page 22: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/22.jpg)
Buy an Arduino
http://www.sparkfun.com http://ww.makezine.com
$34.95 (or cheaper)
![Page 23: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/23.jpg)
Awesome Resources •http://makezine.com/getstartedarduino/ •http://blog.makezine.com/archive/arduino/ •http://arduino.cc/playground
![Page 24: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/24.jpg)
Barduino
http://github.com/mwilliams/barduino
![Page 25: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/25.jpg)
The Barduino •Arduino •Breadboard + Wire •Transistors •Relays •Windshield Washer Fluid Pumps •~$60 Total? •2 pumps, could handle 14+
![Page 26: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/26.jpg)
Barduinotender
http://github.com/mwilliams/barduinotender
![Page 27: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/27.jpg)
Barduinotender Recipe drink 'Screwdriver' do serve_in 'Highball Glass' ingredients do 2.ounces :vodka 5.ounces :orange_juice end end
![Page 28: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/28.jpg)
Want More? •RubyConf 2008 •Friday •10:25 11:05 •Room 3
•Greg Borenstein •(Big help with this demo)
![Page 29: Physical Computing with Ruby and Arduino](https://reader034.fdocuments.net/reader034/viewer/2022042714/5552c503b4c905920f8b4b62/html5/thumbnails/29.jpg)
Let's Serve Some Drinks (and look at code)