Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introducing Arduino & Dino - David Grayson
Search
Las Vegas Ruby Group
January 30, 2013
1
35
Introducing Arduino & Dino - David Grayson
Las Vegas Ruby Group
January 30, 2013
Tweet
Share
More Decks by Las Vegas Ruby Group
See All by Las Vegas Ruby Group
Ruby ISO Standard - David Grayson
lvrug
0
130
Windows Automation - Howard Feldman
lvrug
0
68
Separating Your Application from Rails - Brian Hughes
lvrug
0
120
SWIG and Ruby - David Grayson
lvrug
0
76
Practical Object-Oriented Design in Ruby - Charles Jackson
lvrug
3
130
The Hamster Gem - Ryan Mulligan
lvrug
1
90
Varnish+Redis - Russ Smith
lvrug
1
100
Lambdas and Pops - Jan Hettich
lvrug
0
79
Making Good Use of Fonts - Russ Smith
lvrug
1
88
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.2k
Raft: Consensus for Rubyists
vanstee
140
7.1k
Leading Effective Engineering Teams in the AI Era
addyosmani
5
410
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
45
2.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
The Power of CSS Pseudo Elements
geoffreycrofte
79
6k
How to Think Like a Performance Engineer
csswizardry
27
2k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Build your cross-platform service in a week with App Engine
jlugia
232
18k
Transcript
Introducing Arduino & Dino: Ruby meets the physical world! David
Grayson Las Vegas Ruby Group, 2013-1-30
Arduino Pictures taken from pololu.com, arduino.cc, sparkfun.com
Pictures taken from sparkfun.com, adafruit.com, pjrc.com, evilmadscientist.com, kicksta
http://blog.tkjelectronics.dk/2012/03/the-balancing-robot/
http://madebyfrutos.wordpress.com/2013/01/12/bobobot/ Pololu Zumo Robot
http://www.indiegogo.com/robobrrd
So many projects... http://www.instructables.com/id/Arduino-Projects/ http://www.pololu.com/resources/communityprojects
Arduino = AVR + USB + IDE
Your PC vs. ATmega328P
$1950.00 $3.16 or less
1,006 GB 32 KB
16 GB 2 KB
2.4 GHz 20 MHz
30 seconds 0.003 seconds
Screen, keyboard, touchpad, USB, ethernet, HDMI, VGA, SD card, DVD
drive, WiFi, Bluetooth
Documentation
LVBots
BIOS, OS, Processes, Threads, (maybe bootloader) Registers, Interrupts
C/C++ avr-gcc
None
Dino Control your Arduino from Ruby!
Dino • Author: Austin Vance • Source: http://github.com/austinbv/dino • RubyConf
2012 Talk
Blink LED require 'dino' board = Dino::Board.new(Dino::TxRx.new) led = Dino::Components::Led.new(pin:
13, board: board) [:on, :off].cycle do |switch| led.send(switch) sleep 0.5 end
Sensor require 'dino' board = Dino::Board.new(Dino::TxRx.new) sensor = Dino::Components::Sensor.new(pin: 'A0',
board: board) on_data = Proc.new do |data| p data end sensor.when_data_received(on_data) sleep
…could be WAY cleaner: require 'dino' board = Dino::Board.new sensor
= board.analog_inputs[0] puts sensor.voltage # => 4.0185546875
Shields & Libraries
Other components...
Button
IR Receiver
RGB Led
Servo
Stepper
http://playground.arduino.cc/interfacing/ruby https://github.com/austinbv/dino http://confreaks.com/videos/1294-rubyconf2012-arduino-the-ruby-way More info about Dino:
None