Wednesday, November 12, 2008

Program

The program...


The start.
This part makes it so that if it cant see anything then it will spin till it sees something or if it spins around too many times it stops (to stop unlimited spinning).
If it can see something then it will go full speed ahead.
It does this so when it cant see the enemy it will find it quickly and when it can see the enemy it attacks it.



This part controlls the light sensor. If it sees the white line it will reverse and turn till it sees something then it will go full speed ahead. It does this so that it wont leave the ring because if it does i will lose.

The only problem I had was that if it saw something outside the ring it would just charge right out of the ring because the light sensor didnt see the line properly, I fixed this by recalibrated the light sensor.

No comments: