We all love Ruby for writing software scripts, websites, applications. Would it not be awesome to use it also for interacting with hardware?
With the proliferation of internet connected devices or usually called as 'The Internet of Things' its become important to explore opportunities with hardware hacking for fun and everyday automation.
The talk aims to be an introduction of how to interact with an arduino kit using ruby, available gems and other possibilities. It is meant for beginners who are just starting out with Arduino / Ruby and want to see the what it beholds.
At the end of the talk 2 projects were demonstrated.
1. Blinking Lights (Red / Green) on twitter sentiment of #rubyconfindia
2. A Light Seeking Robot Car
30. int led = 13;
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH); // turn the LED on
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off
delay(1000); // wait for a second
}
revealinghour.in
32. 1 Serial Port Gem
• Ruby library
• RS-232 serial ports
sp = SerialPort.new(port_str,
baud_rate, data_bits, stop_bits,
parity)
while sp.gets.chomp do
...
end revealinghour.in
33. 2 RAD = Ruby Arduino Dev
+Rake Task
revealinghour.in