Back To Homepage

Robotics

Five Minute Robots!

Today we built a little, five minute robot, and learned how to
program its functions and movements using Python. In the picture
above, you can see that there are two weird looking things sticking
out of the robot. One of the things sticking out looks like two, cute
little eyes and the other one looks somewhat like a little laser. These
two things are sensors. The one with the things that looks like eyes is a
sensor that measures distance. The sensor on the right-- the laser looking
sensor is a touch sensor. The orange part on the tip is able to be pushed
in.

If you look at this picture, it's a command in order to test out the sensors
we have. The red letters are called comments and in order to make the comments
red, you need to put a hashtag in front of the line you're coding/programming. Using
the hashtag, you're basically writing comments into your program so when you run the
program, the comment you made will not be visible... Pretty cool, huh?

This picture is just another picture of our robot. When this picture was taken, we
made the robot move forward, backwards, left, and right. It was cool being able to see
that we're able to successfully control a robot we built using bluetooth and an online
program, Python.

We tested the two sensors: the distance and the touch sensor. In order for us to test these
two sensors, we went on Python and took samples of the sensors to see what the outcomes would've
been. The picture above is of the Python module we used.


Making a Square!

The picture above is the same robot but this is a picture from when we made our robot move in
a square. It took a long time to figure out which certain numbers would make the robot turn in
a 90 degree angle but after a period of time, we eventually got the numbers.

This is a picture of the program we had the robot run to do a square from Python. If you look
at the parentheses next to the word square, you'd see the speed and drive time. You see, speed
is how fast the robot would be going and the drive time is the number of seconds the robot would go with
that speed.

The second line basically just tells the robot that it would be repeating the program four times in a
row before it eventually stops.



Scatterbot!

Today we used Python to program for our robots to scatter. What I mean by scatter, is that we made the
robot move around until its touch sensor is pressed. In that case, if the touch sensor is pressed, the robot
will stop driving around.

In order to dodge th touch sensor being pressed, we functioned the robot to measure the nearest objects' distance
with the Ultrasonic and stop and turn when an object gets too close in order to not have to stop. Having the robot
stop and turn away would allow our robot to stay in the "scatterbot game," and stay "alive."


Mars Challenge!


Today in class, my group and I changed up the look of our robot and programmed it to move around in different types
of terrain, trying to avoid each one while looking for water. The terrain we used represented the planet of Mars. In
"Mars," there were holes in the boxes we used and the water was pieces of blue paper taped onto the boards. In order
to avoid these obstacles, we had two different sensors for our robot, the same distance sensor, and a color sensor.
The color sensor was for the robot to see the floor to determine if it found water or not. Since the blue paper
was the water, we set the color sensor to take a sample of the blue paper so if it ever came across the blue, it
would stop and show, "Water Found!"
The distance sensor was tilted towards the floor so it would be able to see the floor in front of it so it would be able
to see if there were any craters in front of it. To take this sample, we measured the distance of how far the ground would be
and how far and deep the crater would be and functioned the robot so that if it senses a crater, it would stop, turn around,
and continue roaming "Mars."


These are two pictures of the functions we gave to our robot in order to carry out the task we wanted it to do. To recap,
our objectives were to avoid the craters, find the blue paper which resembled water, and have our robot brick display "Found
Water!" when it hits the water and then end the program.