Sha256: 8f4831893b66bbc0c70c0b588c36bc6952d90be2d28cc4f7cca13dcee5bf3ada
Contents?: true
Size: 385 Bytes
Versions: 12
Compression:
Stored size: 385 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.on_analog_changed 0 do |value| puts "analog pin 0 changed #{value}" arduino.analog_write 11, value end led_stat = false loop do arduino.digital_write 13, led_stat led_stat = !led_stat sleep 1 end
Version data entries
12 entries across 12 versions & 1 rubygems