Class: Denko::LED::Base

Inherits:
PulseIO::PWMOutput show all
Defined in:
lib/denko/led/base.rb

Instance Attribute Summary

Attributes included from Behaviors::Threaded

#interrupts_enabled, #thread

Attributes included from Behaviors::Callbacks

#callback_mutex

Attributes included from Behaviors::SinglePin

#mode, #pin

Attributes included from Behaviors::Component

#board

Instance Method Summary collapse

Methods inherited from PulseIO::PWMOutput

#initialize_pins, #pwm_disable, #pwm_enable, #pwm_write, #write

Methods inherited from DigitalIO::Output

#after_initialize, #digital_write, #high, #high?, #low, #low?, #pre_callback_filter, #toggle

Methods included from Behaviors::Threaded

#enable_interrupts, included, #stop, #stop_thread, #threaded, #threaded_loop

Methods included from Behaviors::Callbacks

#add_callback, #callbacks, #initialize, #pre_callback_filter, #remove_callback, #update

Methods included from Behaviors::State

#initialize, #state

Methods included from Behaviors::Component

#initialize, #micro_delay

Instance Method Details



4
5
6
7
8
9
# File 'lib/denko/led/base.rb', line 4

def blink(interval=0.5)
  threaded_loop do 
    toggle
    sleep interval
  end
end