Sha256: e239b2e3fe9bda7df6e586b305249f2a1c00f4909586ba26a8cc048bfdb6a7d8

Contents?: true

Size: 439 Bytes

Versions: 2

Compression:

Stored size: 439 Bytes

Contents

require 'arduino_firmata'

raise Error, 'Arduino not Attached' if ArduinoFirmata.list.empty?
@arduino = ArduinoFirmata.connect

meta :description => "Arduino Firmata Plugin. using http://shokai.github.com/arduino_firmata",
     :author      => "Sho Hashimoto <hashimoto@shokai.org>"

data do
  field "code", :type => String, :default => 'digital_write(13, true)'
end

set :callback, true

call do
  callback arduino.instance_eval code
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bowl-0.0.2 lib/bowl/app/plugins/arduino.rb
bowl-0.0.1 lib/bowl/app/plugins/arduino.rb