Wednesday, November 12, 2008

Programming Final Design

The top half of this code makes the robot spin until it sees something. The bootom half solves a problem we had with the robot not having enough power to push things therefor it stops. By having it reverse then ram again if the wheels stop we solved this problem. This code is only half of the solution - the other half makes the decision on when to do the reverse action this code is the doing it part.


Our next programming problem with this part was that the robot spun around to fast and this did not give the ultrasonic sensor time to see anything so we had to slow down the turn, this allowed the ultrasonic sensor time to see the opponent.



Because of the gearing sometimes the wheels jam, it needs a run up in order work properly so we made the robot reverse a little bit if the wheels do not spin for a period of time. This is the thinking half from the post above.



This part of the program is the line detection, when it sees the line it stops reverses and then looks for the opponent. We had a problem with the robot being to fast for the line sensor but this was solved when we made the robot spin to look for its opponent as this made it unlikely for it to miss the opponent (in the small ring) and run out the ring anyway.

2 comments:

Unknown said...

Great work. Just sitting here at Tokoroa High School, showing your blog to the head of Science, Tony Jones.

Unknown said...

Hey. Just blogged about you. You can check out the post at http://fastpaddy.blogspot.com/