Index

Robotics Stuff


NXT 5 miute bot.

Build Instructions
Today we built 5 miunte bots and had to make them move. We used Chris MIller's code.
We had to make the robot go in a square in witch we made the robot move for ten seconds then turn 90 degrees and reapeat so it would go in circle forever. This is the code used to create the square. the square was difficult to make becuse the robot had to slide witch caused it to have inconsistant turns.


Sensors

We learned to get samples from the sensors using the get_sample() function in Python: The touch sensor returns when it's pressed True and False when it's not pressed. The sonar sensor returns a number, the distance to an object in front of it.
To make the scatter bot we set it so that the ultrasonic to turn the robot if it got to close to an object. If the touch sensor gets touched it stops the robot dead