my robotics project
On the first day of the January expeditions we learned how to program lego robots to move forward and to drive in a square shape on the floor.
Here is what the code for going forward and in a square looks like
Here is the robot that I programed to move away from the walls
Here is some of the code I used to program the robot. The from pybot import code is importing commands from another area because python deosn't have the commands needed for the robot. The touch1 and sonar code is interacting with the touch and sonar sensor to back up and rotate the other direction when they sense something.
On thursday we used the color senser to follow a line of tape on the ground however my robot was unable to do so. I did get it to where when it hit the wall it backs up rotates and continues in the other direction. I learned this code to get it to work.