Secret Codes!

Most of the code was written by Catalina with a little help from Robbie. Jessica was the one who created all the songs except for Taps which she got from a prior Robotics project.

to MrRabbit ;program for Rabbit

wait 63

race

wait 75

sleep-wake-up

finish

end

 

to race

b, on

move-legs

tail-spin

end

 

to move-legs

a, on

end

 

to tail-spin

d, on

end

 

to lullaby

note 105 1 wait 1

note 105 1 wait 1

note 89 3 wait 2

note 105 1 wait 1

note 105 1 wait 1

note 89 3 wait 2

note 105 1 wait 1

note 89 1 wait 1

note 94 2 wait 1

note 93 2 wait 1

note 91 1 wait 1

note 91 1 wait 1

note 89 4 wait 1

end

 

to sleep-wake-up

ab, off

d, off

c, thatway onfor 12

lullaby

lullaby

c, thisway onfor 12

ab, on

d, on

end 

 

to finish

when [(sensor 0) > 125] [ab, off d, off move-ears]

end

 

to move-ears

c, thatway onfor 12

taps

c, thisway onfor 12

end

 

to taps

note 70 7 wait .5

note 70 3 wait .5

note 75 13 wait 3

note 70 7 wait .5

note 75 3 wait .5

note 79 13 wait 3

repeat 2 [note 70 5 wait .5

note 75 3 wait .5

note 79 5 wait 3]

note 70 5 wait .5

note 75 3 wait .5

note 79 13 wait 3

note 75 7 wait .5

note 79 3 wait .5

note 82 13 wait 3

note 79 7 wait .5

note 75 3 wait .5

note 70 13 wait 3

note 70 7 wait .5

note 70 3 wait .5

note 75 13 wait 3

end

global [finishline]

to MrTurtle ;program for Mr-Turtle

setfinishline 0

when [(sensor 0) > 115] [setfinishline 1 ab, off]

stick-out

race

move-in-out

shake

celebrate

stick-in

end

 

to initialize

a, setpower 8

end


to stick-out

b, thisway on

wait 60

b, off

end

to race

a, on thatway

end


to move-in-out

b, thisway on

loop [rd wait 20

if finishline [stop]]

end


to stick-in

b, thatway on

wait 60

b, off

end


to shake

c, on thisway

wait 5

rd wait 9

rd wait 4

c, off

end

to celebrate

note 99 6 wait 1

note 98 3 wait 1

note 99 4 wait 1

note 98 3 wait 1

note 96 4 wait 1

note 101 2 wait 1

note 101 2 wait 1

end

 

Created by: Catalina Millan Caceres
Created: January 2001
Last Modified: January 2001