Hi! My name is Chris. I built the Go-Kart out of Legos using a Robo Lab Lego kit, an RCX brick, and the Yellow Brick Logo programming language. The first program I wrote was "tanker". It went forward and backward and then forward and around the table. Then I wrote the program "spin". It pretty much explains itself. Finally, I wrote "follow". It followed a red line that curved. The Go-Kart used a light sensor to follow the red line. When the light sensor hit a black line it made the Go-Kart turn right. When it hits the green it made the Go-Kart turn left. Below you will see 2 pictures of the Go-Kart and the procedures.
to tanker
ac, thisway
onfor 20
thatway
onfor 20
thisway onfor 20
thatway onfor 20
thisway onfor 200
a, thisway
c, thatway
ac, onfor 25
thisway
onfor 100
a, thisway
c, thatway
ac, onfor 26
thisway onfor 25
a, thisway
c, thatway
ac, onfor 24
end
to spin
a, thisway
c, thatway
ac, onfor 150
end
to follow
ac, thisway setpower 1
loop [if sensor2 < 700 [ac, onfor 1]
ifelse sensor2 > 760 [a, off c, onfor 1] [a, onfor 1 c, off]]
end