Ruby Arduino (RubyConfIndia 2013)

  • 300 views
Uploaded on

We all love Ruby for writing software scripts, websites, applications. Would it not be awesome to use it also for interacting with hardware? …

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

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
300
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. revealinghour.in Ruby Arduino Revealing Hour Creations @nishantmodak
  • 2. revealinghour.in
  • 3. Talk Physical Computing #electronics #ruby #arduino #sensors revealinghour.in
  • 4. revealinghour.in
  • 5. revealinghour.in Image Source : IBM Smarter Planet
  • 6. revealinghour.in Image Source : IBM Smarter Planet IFTTT + Hardware
  • 7. What is Arduino? revealinghour.in
  • 8. What is Arduino? revealinghour.in
  • 9. What is Arduino? revealinghour.in
  • 10. What is Arduino? revealinghour.in
  • 11. What is Arduino? revealinghour.in
  • 12. Program via USB External Power 9v 14 Digital IO Pins µ controller 6 Analog IO Pins revealinghour.in
  • 13. revealinghour.in Ethernet Shield
  • 14. Why Arduino? revealinghour.in MIT's Handyboard Phidgets Netmedia's BX-24
  • 15. It is inexpensive cross-platform ide open-source s/h/w revealinghour.in
  • 16. Hardware Software Docs Brand CC-SA-BY CC-SA-BY GPL TM revealinghour.in
  • 17. InduinoX revealinghour.in
  • 18. What can YOU do with an Arduino? revealinghour.in
  • 19. revealinghour.in
  • 20. revealinghour.in
  • 21. revealinghour.in
  • 22. revealinghour.in
  • 23. revealinghour.in
  • 24. revealinghour.in
  • 25. revealinghour.in TDD
  • 26. revealinghour.in
  • 27. How can YOU work with an Arduino? revealinghour.in
  • 28. revealinghour.in upload Serial monitor console
  • 29. revealinghour.in
  • 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
  • 31. Options in RUBY for arduino ? 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
  • 34. Program Sketch Arduino Class Methods RubyToC Assembly Arduino C++ Rake tasks AVR GCC/Dude revealinghour.in
  • 35. revealinghour.in • Standalone • Small• Service
  • 36. 3 Dino revealinghour.in
  • 37. revealinghour.in Logical equivalent of the arduino board
  • 38. revealinghour.in Finds Arduino Communicates with the world
  • 39. revealinghour.in
  • 40. revealinghour.in Write
  • 41. revealinghour.in Read
  • 42. revealinghour.in
  • 43. revealinghour.in • Stepper Motor • DC Motor • LDR • Temperature • RGB LEDs
  • 44. Arduino & Web revealinghour.in
  • 45. revealinghour.in • Arduino Hosted • Web sockets • Serial to Net • Rails • Sinatra
  • 46. revealinghour.in board=Dino::Board.new(Dino::TxRx::Serial.new) led = Dino::Components::Led.new(pin: 13, board: board) put ‘/forward’ do led.on end Sinatra
  • 47. revealinghour.in
  • 48. revealinghour.in
  • 49. revealinghour.in  
  • 50. revealinghour.in
  • 51. Thanks • Pratik Chaudhari (@c_pratik) • Siddharth Bhagwan • Prashant • @austinbv – Creator of Dino revealinghour.in
  • 52. References bit.ly/arduinolinks revealinghour.in
  • 53. revealinghour.in PUSH TO DEPLOY