class DebounceMethods

Public Instance Methods

loop() click to toggle source

depressing and releasing button_one, button_two or button_four do the same thing with a slightly different syntax and number of blinks button_three simply toggles the led with the read_and_toggle method button_five does it with a twist

# File lib/examples/debounce_methods.rb, line 15
def loop
  blink_twice if read_input button_one
  blink_three_times if read_input button_two
  button_three.read_and_toggle led #  
  blink_three_times_basic if read_input button_four
  blink_with_a_twist if read_input button_five
end