Arduino & RUBY
Tomasz Warkocki
ARDUINO
WHAT?
-
single-board microcontroller
-
open-source hardware
- 17 versions
Who? When? Why? For whom?
-
Interaction Design Institute Ivrea, Italy, 2005
-
Founders
- Massimo Banzi
- David Cuartielles
- Tom Igoe
- Gianluca Martino
- David Mellis
-
Initially for designers and artists
Arduino Mega 2560
Microcontroller | ATmega2560 |
Operating Voltage | 5V |
Input Voltage (safe) | 7-12V |
Input Voltage (limits) | 6-20V |
Digital I/O Pins | 54 (15 PWM) |
Analog Input Pins | 16 |
DC Current per I/O Pin | 40 mA |
Clock Speed | 16 MHz |
Arduino Mega 2560
Input & Output
-
54 Digital pins
- 4 Serial ports (RX, TX + LEDs)
- 6 External interrupts pins
- 15 PWM pins - Pulse-width modulation pins
- SPI (Serial Peripheral Interface) (4 pins)
- LED (pin 13)
- TWI / I2C pins (Two Wire Interface / Inter-Integrated Circuit) (2 pins)
-
16 Analog pins
- 10 bits of resolution (1024 different values)
- default: 0 to 5V
PWM - Pulse-width modulation
Memory
Flash Memory (program space, non-volatile) |
256 KB |
SRAM (program variables, volatile) |
8 KB |
EEPROM (for programmers, non-volatile) |
4 KB |
Programming
- ATmega2560 preburned with a bootloader
- Arduino programming language (based on Wiring, C/C++)
- Arduino IDE (based on Processing)
-
Fritzing - documentation
Elements
shields
-
Ethernet
-
Relay
-
Xbee
-
LCD Screen + Joystick + MicroSD
-
WiShield
-
many, many more...
demo project
ruby
serialport gem
SERIALPORT GEM
SERIALPORT GEM
serialport gem
serialport gem
DEMO
firmata gem
firmata gem
firmata gem
firmata gem
firmata gem
demo
dino gem
- $ gem install dino
- $ dino generate-sketch serial (ethernet)
- upload generated sketch
-
$ ruby led.rb
- unable to run on my board!
DINO GEM
rad gem
- gem install rad
- rad my_project
-
rake make:upload
- ruby 1.8.7 !
RAD GEM
demo project with IR
demo project with ir
DEMO
thank you!
Arduino & Ruby
By Tomasz Warkocki
Arduino & Ruby
Interaction between Arduino and Ruby
- 4,452