Class: ArduinoBuildNotifier::Arduino::Indicators::Building

Inherits:
Base
  • Object
show all
Includes:
Celluloid
Defined in:
lib/arduino_build_notifier/arduino/indicators/building.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from ArduinoBuildNotifier::Arduino::Indicators::Base

Instance Method Details

#offObject



17
18
19
20
# File 'lib/arduino_build_notifier/arduino/indicators/building.rb', line 17

def off
  @led.off
  @timer.cancel if @timer
end

#onObject



9
10
11
12
13
14
15
# File 'lib/arduino_build_notifier/arduino/indicators/building.rb', line 9

def on
  @timer = every 1 do
    @led.on
    sleep 0.5
    @led.off
  end
end