Sha256: 85f32edcb57a5930ab75ad7cca9e070fc7fd3df34e3c3f49711ecbf95db493d7
Contents?: true
Size: 484 Bytes
Versions: 1
Compression:
Stored size: 484 Bytes
Contents
# # This is an example of how to use the button class # You must register helpers and have the main thread # sleep or in someway keep running or your program # will exit before any callbacks can be called # require '../lib/dino' board = Dino::Board.new(Dino::TxRx.new) button = Dino::Components::Button.new(pin: 2, board: board) button_down = Proc.new do puts "button down" end button_up = Proc.new do puts "button up" end button.down(button_down) button.up(button_up) sleep
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dino-0.8 | examples/button/button.rb |