;; Jerry Day 3
to pikasong
note 72 3 note 84 3 note 79 3
end
to scream
note 96 1 note 90 1 note 96 1 note 90 1
note 96 1 note 90 1 note 96 1 note 90 1
note 96 1 note 90 1 note 96 1 note 90 1
note 82 .5 note 81 .5 note 80 .5
end
to runfromlight1
loop [if (sensor 0) < 20 [a, on scream] a, off]
end
to spin1
a, on thatway b, on thisway
end
to spin2
b, on thatway a, on thisway
end
to tailwag
loop [ d, onfor 5 thisway
d, onfor 5 thatway]
end
to run
ab, on thisway
end
to backup
ab, on thatway
end
to left-wheel
a,
end
to right-wheel
b,
end
to right-light
output sensor 3
end
to left-light
output sensor 2
end
to follow-light
loop [if (left-light < 50) [left-wheel on]
if (left-light > 50) [left-wheel off]
if (right-light < 50) [right-wheel on]
if (right-light > 50) [right-wheel off]]
end
control buttons =
run
backup
spin1
spin2
follow-light
scream
tailwag