Tuesday, May 14, 2013

Mentor Hours 10

Today I continued to program and configure my robot to do different tasks. First, I programmed my robot to simply roll back and forth. Then I learned how to make it turn left and right. The more complicated programs required me to combine all 4 directions with different durations in order to create shapes. I spent several hours just learning different ways to program directions into the robot. Instead of individually listing each direction, I learned to group them together or shorten the coding by putting the code in a loop so it simply repeats itself a certain number of times. There were also several short hand codes that I was able to use. With all of the different codes and instructions it became difficult for me to remember which codes did which or how they were supposed to combine. I spent extra hours just redoing some programming to try and help me memorize the different commands.



Lastly, I installed infrared sensors onto the Boe-Bot. These sensors use infrared light to avoid obstacles. This programming was the longest and most complicated for me. It involved a lot of "IF" statements. Before combining the sensors and movement, I first had to test the infrared sensors and make sure they worked properly. In order to do so, I reinstalled the red LED lights so that whenever an object was detected by the sensors, the LED would light up. Once I was sure the sensors worked properly, I then began the long process of programming the robot to move different ways when an object is detected. This was the most challenging part for me. A simple typo or mix-up of numbers caused the Boe-Bot to just sit there and wiggle back and forth. If the sensors weren't pointed the right direction or the wrong resistor was installed, then objects would either be detected too soon or too late. I had to troubleshoot a lot for this part. But now my Boe-Bot can avoid obstacles, although it is still a little shaky if the obstacles are too close together to each other.

Hours earned: 7 hours

Total hours: 28 hours

No comments:

Post a Comment