Our Code...

;;TOUCHLATOR code Wintersession 2000

;;Rachel Schwartz & Patricia Diaz

 

global [black]

 

to initialize

setblack 50 ;default threshold

a, setpower 3

print-black

end

 

to print-black

type [Black =] print black

end

 

to black+10

setblack black + 10

print-black

wait 10

end

 

to black-10

setblack black - 10

print-black

wait 10

end

 

to thumb-sensor

output sensor 0

end

 

to tap-sensor

output sensor 1

end

 

to sees-black? :sensor-value

output :sensor-value > black

end

 

to tap-once

b, on tap-edge off

end

 

to tap-twice

b, on repeat 2 [tap-edge] off

end

 

to tap-edge

waituntil [not (sees-black? tap-sensor)]

waituntil [sees-black? tap-sensor]

end

 

to thumb-edge

waituntil [not (sees-black? thumb-sensor)]

waituntil [sees-black? thumb-sensor]

end

 

to rotate-90

a, on thisway thumb-edge thatway

thumb-edge off

end

 

to yes

a, on thisway repeat 2 [thumb-edge] rd

thumb-edge off

end

 

to no

a, on thisway repeat 4 [thumb-edge] rd

repeat 3 [thumb-edge] off

end

 

to maybe

a, on thisway repeat 3 [thumb-edge] rd

repeat 2 [thumb-edge] off

end

 

to so-so

a, on repeat 4 [thumb-edge rd] off

end