Sha256: c7d582a47fe3a158df14600d54e826a26bbd12d2ab15d24db5654b20ee075c04
Contents?: true
Size: 408 Bytes
Versions: 7
Compression:
Stored size: 408 Bytes
Contents
#!/usr/bin/env ruby $:.unshift File.expand_path '../lib', File.dirname(__FILE__) require 'rubygems' require 'arduino_firmata' arduino = ArduinoFirmata.connect ARGV.shift arduino.pin_mode 2, ArduinoFirmata::INPUT arduino.on :digital_read do |pin, status| puts "digital pin #{pin} changed : #{status}" end led_stat = false loop do arduino.digital_write 13, led_stat led_stat = !led_stat sleep 1 end
Version data entries
7 entries across 7 versions & 1 rubygems