Sha256: e17ca244966feaf45c30ccd9fd61d9b2c4ed3231c77d5bc9055e0086929aea71
Contents?: true
Size: 489 Bytes
Versions: 10
Compression:
Stored size: 489 Bytes
Contents
require 'artoo' # Circuit and schematic here: http://arduino.cc/en/tutorial/button #connection :firmata, :adaptor => :firmata, :port => '/dev/tty*' connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023' device :led, :driver => :led, :pin => 13 device :button, :driver => :button, :pin => 2, :interval => 0.01 work do puts puts "Press the button connected on pin #{button.pin}..." on button, :push => proc { led.on } on button, :release => proc { led.off } end
Version data entries
10 entries across 10 versions & 1 rubygems