Skip to content

Instantly share code, notes, and snippets.

@dapicester
Created August 24, 2016 05:53
Show Gist options
  • Save dapicester/4fa59f9f39e51f54582354f50417f391 to your computer and use it in GitHub Desktop.
Save dapicester/4fa59f9f39e51f54582354f50417f391 to your computer and use it in GitHub Desktop.
require 'arduino_firmata'
ArduinoFirmata.connect ARGV.shift, bps: 9600 do
puts "firmata version #{version}"
reset # This line did the trick!
puts "led on ..."
digital_write 13, true
sleep 1
puts "led off ..."
digital_write 13, false
sleep 1
puts 'ktxbye'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment