source: de.wigbels.ruby/hothotread/archiv/test.rb@ 2827513

Last change on this file since 2827513 was 8cc14b9, checked in by Norbert Wigbels <njw@…>, 9 years ago

Aufraeumen

  • Property mode set to 100644
File size: 291 bytes
Line 
1require 'pi_piper'
2include PiPiper
3
4trigger_watch = 0
5
6watch :pin => 11, :trigger => :falling do
7 puts('trigger registered')
8 trigger_watch = 1
9end
10
11loop do
12 if trigger_watch == 1 then
13 puts('trigger 1 detected')
14 trigger_watch = 0
15 else
16 puts('trigger 0 detected')
17 end
18 sleep(5)
19end
Note: See TracBrowser for help on using the repository browser.