# Turn on the LED on the Gainer I/O module while the button is pressed. # Gainer I/Oモジュール上のボタンを押している間、LEDが点灯するサンプルです。 require 'funnel' module Funnel gio = Gainer.new(Gainer::MODE1) gio.button.on PortEvent::RISING_EDGE do gio.led.value = 1.0 end gio.button.on PortEvent::FALLING_EDGE do gio.led.value = 0.0 end sleep(5) end