Saturday, 29 August 2009

Programing tips : stay in the box

This is how to program your robot to stay in a box printed in a thick black line (like on the test mat)

1 Put your color sensor (or color sensor) on a castor bot (or starter bot).
2 Program this:
[loop - [move ( forward - unlimited ) ] - [wait for ( light - <>
3 download and play.

This program:

the robot goes forward until it finds the black line the goes back the left and repeats

heres what it should look like (nxt-g 2.0)



No comments:

Post a Comment