Robotics!!!

We have been working on are Robots since February 3, 2014. On the Third we learned how to build and make are robot move. It connects and receives movements over blue-tooth. The robot that I made looks like the picture below.


The black wires you can are connected to the motor and the tires. So when I send a command to the motor it forces the tires to spin. When the tires spin we get movement. To connect to the robot we had to use the robots MAC address.

Above you can see a picture of my code. This code is making the robot make a square. If I was to add pen to robot and put a piece a of paper under it would draw the square.

Above you can see more screen shots of my code. This is the code for sensors attached to my robot. This code is saying that if something is not touching the sensor then it should stop, it is also checking if it has been touched every 0.1 seconds. The next part of the code is saying that if an object is within 20 units, then stop. This part, also like the first one, is checking to see if it has been set off every 0.1 seconds.

The picture above is a picture of my code. It works a lot like the code I worked on yesterday The main difference is instead of using the Touch Sensor and the Sonar. I am using a color sensor. The code above checks the sensor every teeth of a second. It is checking for the color green. When it sees the color green or gets a match it turns around.



Today in class our task was to build a Mars rover. It had to e. stop when it found water or the color blue. Also it had stop when it came to an edge or the end of "world". Below I have three pictures. The first picture is of my code. The second picture is of my rover. The third is a picture of the reason my bot didn't work. I will explain that later.


Above is a picture of my code. It works pretty well. Although the p=main problem is that I could not get the touch sensor to be reversed engineered.


That is a picture of rover. It isn't that important. I just wanted you to know what I was working with.


Above is the picture of the reason why my robot didn't work. I tried to reverse my touch sensor. What I mean is that it would always be touching the ground. Then when it wasn't the robot would know to stop. This was very upsetting because I thought it was very innovative idea. Next time I will just the simple way first. Then I will try the complicated way or innovative idea. That way I can actually have a working product, where as now I have nothing.