Today we started working with a Lego Mindstorm robot. We programmed in Python to tell the robot what to do.
We programmed the robot to do things such as move forward, backwards, and even move in a square shape.

Today we spent more time working the the Lego NXT robots. First we just made the robot move forward, backward, and other basic movements.
The we started to make more complicated functions and codes for the robot, I made the robot move in a square, circle and zigzag. At the end of the day we worked with sensors.
I only had enough time to work with the touch and ultrasonic sensor, on Wednesday I will work on the color and light sensors. Here is a picture of my robot with the touch and ultrasonix sensor.

We worked on our scatterbots today, scatterbots is a game where we program our Lego NXT robots to get its sensors to work. The two sensors we used for our robots are the touch sensors and the ultrasonic sensor.The goal of the is to avoid other robots from touching our robot, if our robot's touch sensor is touched by another robot then our robot will stop(die). The ultrasonic sensor helps of robot avoid other robots and walls.
On the left is the code I used to program my touch sensor and on the right is the code I used for my ultrasonic sensor. My friend Allan helped me out a little with my ultrasonic sensor, because he noticed that I messed up on indenting my code.

We worked with the NXT robots again today. I got my robot to scatter properly, and we also added a new sensor to our robot. The new sensor we added to our robots is the color sensor(RGB).
Here is an image of the color sensor and an image of the code I used to help my robot scatter properly.

Today on the last day of the fourth week, we finally tested out our scatterbots, we set up an arena and watched our robots try and touch each other's touch sensor, unfortunately nothing much happened, because the ultrasonic sensor
was too over powered and no one got out, also a few people's robots ran out of batteries. I was going to record the scatterbots battling each other, but my phone ran out of batteries. :(

I also revised my code in the beginning of class, because for some reason my touch sensor was not working for my robot, so I just added a "break" at the end of the code and voila! The touch
sensor started to work again, I also changed the drive time for my robot so that it wouldn't run into things as frequent as it did before.