Nuts About Time Clock Program Control
home | videos | construction | control | lab book | team
return to flowcharts

Version 2 Cricket 2 Code

; John Galinato
; May 2002
; This cricket is dedicated to 
; controlling the clock.


; When a 5 or a 10 is received,
; the first clock geartrain shaft
; will turn one revolution.

; When switchb is pushed,
; the clock will fast forward
; just like a digital clock is set.

to clock-control
;execute program when power is switched on
autostart-on
loop
[
if (ir = 5)
[a, on
waituntil [switcha]
a, off]
if (ir = 10)
[a, on
waituntil [switcha]
a, off]
if (switchb)
[a, on
send 20
wait 5
send 0
waituntil [not switchb]
a, off]
]
end
stop



Build-It-Yourself, 426 Broadway, Cambridge, MA 02138 Tel: (617) 547-9705 Email