Robotics

Lego Mindstorm Kit

On the third week of Computer Science class(when we had came back to Expeditions), we worked on creating our own robots! We built a robot that could tell colors and know when to stop based on its sensors. We followed these instructionsto build our robot. Picture of the robot;

Sensors

Here are pictures of the sensors;

The first one is the color sensor. It senses colors that you put in front of it.

The second one is the touch sensor. This one can sense what it touches. Depending on how you program it can stop when it touches something.

The last one is a sonar sensor. It is kinda like the touch sensor but not exactly the same.

Scatterbot Challenge

Also on the third week, first day, we did a scatterbot challenge. The scatterbot challenge was where we had to program the robot to sensor what it is touching. When the robot would touch something, it would stop moving. It was really hard to work on this but in the end, we had a little help and it worked. Here is our code;

The Pybot Module

On Monday, we had also used commands in the pybot module to connect our robots. This process causes them to move and check their sensors. Pybot Module/Robot's Sensors;

The Color Challenge

On the second day of class, we worked on robots again. This time we had a different challenge. We had to program the robot to be able to tell which color that is in front of it and stop. When we had gotten it to work, we tried it with other colors just replacing the def and the color. This was our code that worked;

The result of that code;

Walk the Line Challenge

On the third day of Robotics, we did another challenge. The challenge was to try and program the robots to be able to walk a line of blue tape.

Our code was:

In the end, we did not get the robot to turn but it was still fun to do. We had gotten the robot to go forward but at the turning point, the robot wouldn't turn.

Scatter Part Deux

On the fourth day of Computer Science, we had another challenge! This challenge was easier than the others since we already had the codes. The challenge was to get to robot to move around avoiding walls but it also had to use the touch sensor. When the touch sensor is pressed, the robot would shut down. We combined the codes of the touch sensor and the sonar sensor. We had to fix a little things but in the end, the code worked. It was amazing to see our robot avoiding anything from a certain distance from it. Here's our code;

Our robot;