| Lil Monster Chillin on The Desk |
After our bird presentations, we re-partnered to start working on a little Lego monster, not the Lady Gaga kind, but one that can walk without wheels. I found this class very challenging as I had no experience with Lego or programming whatsoever. These were the two main goals of the class: build a robot using Legos, NXT brick and motors and control it using LabView.
At first, we had a look at what kind of parts were available. After many trials with different parts failed, we decided on using L-shaped (or more like J) grey parts to create a structure that covers a circular path. These rods were sticking out at different angles so that when our robot moved enough not stand on one, it was supported by the next. This made it look like our robot had claws. Unfortunately, it was quite hard to make these parts stay at the desired angle when the weight of the robot applies pressure to it during its movement. To deal with this problem, we sought help from Lyn and we learned how to use bushings to make the rods stable. We then used LabView to program our little monster. We had a touch sensor and we used the input from the sensor to make the robot go forward or brake. It was very exciting to see our monster move!
This was only the initial step towards many challenges we would face with Lego structures. Next, Chris announced that we were going to have a race. The goal was to get form from point A to point B. That simple. But not really. We programmed the monster so it would go forward forever, using an infinite while loop. There was no guarantee that the robot would endure that much walking or go straight. All the robots lined up and we pushed the buttons. Our monster was doing OK, going a little too much to the right before it bumped into another group's robot. Their wires got tangled up and and lil monster fell apart. It was a heart-breaking scene.
Our next challenge was to make the robot go when it sees the white tape on the carpet and make it stop when it sees the tape again. Or alternatively, make it stop before it hits the Lego figure at the end of the track. There were a lot of sensor we could choose from for this purpose: sound, light, ultrasound. Since the tape and the carpet were very different in color, we thought light sensor would be easier to manipulate so we chose that one. At first we attached the sensor to the wrong port and LabView was trying to get input from another port so it wouldn't work. After this problem was fixed, our robot did work. We didn't get exact readings of the light values but used "lighter" and "darker" to program so our robot didn't move as we expected. With minor adjustments to its mechanical design, it moved straight up to the figurine and stopped at the tape. However, it started to move again and ended up hitting and killing the little Lego guy. It is called monster for a reason. Then we had to take him apart as it was the end of the class...
No comments:
Post a Comment