class Smalrubot::Components::Led

Public Instance Methods

after_initialize(options={}) click to toggle source
# File lib/smalrubot/components/led.rb, line 4
def after_initialize(options={})
  set_pin_mode(:out)
  off
end
off() click to toggle source
# File lib/smalrubot/components/led.rb, line 13
def off
  digital_write(Board::LOW)
end
on() click to toggle source
# File lib/smalrubot/components/led.rb, line 9
def on
  digital_write(Board::HIGH)
end