Robotics | Final Project Reflection

Throughout this project, I’ve utilized many programming skills to achieve a robot dance synced to the tune of the song, “Eye of the Tiger.” The project has taught me a lot about programming, problem-solving, and working together as a team.

 

There were many new programming concepts taught for this project. We learned about while loops, which allow us to loop a portion of code consecutively. We learned about functions, which allow us to call a set portion of code at any time. Personally, I used functions repeatedly in my code. I used them far more than while loops, because the song I chose is not very regular. With a function, the programmer can define integers, and modify values within the function itself. Functions are very useful for condensing code, my code would have been significantly longer without them.

To define a function, you need to write “void functionname()” and {} will contain the code of the function. You can then call the function at any time by simply writing the name of the function followed by (); In the round parentheses, you can put an integer if you’d like.

An example of a function (stop) with an integer (time):

 

Syncing the robot’s dance to the music was quite a complicated task. At first, I tried to count the seconds of specific parts of the song, and using the Youtube video’s progress. For example, the first move I wanted my robot to initiate began after eight seconds of the song, so I made sure my robot was stationary for 8000 milliseconds. Despite this, I found 9000 milliseconds (9 seconds) to work better in my code, so actually using the precise measurements was a somewhat ineffective strategy.

Using this strategy was a good starting point, but I found trial and error to be far more effective. With the help of virtual worlds, I repeated dance moves over and over until I got the timing to a level in which I was satisfied with. For trial and error, I would put in my closest estimate, try it out, and adjust the value depending on how the timing was.

Another factor that disrupted my timing was the power of the motors on the physical robots. Due to the age and use of the robots/parts we used, our actual robots were not as powerful as the one in the virtual world. An example of this is when my robot wouldn’t move as far in the real world as the virtual world, or it wouldn’t turn as quickly. The motors, battery, and several other parts all worked less well than in the virtual world, so I had to adjust my code to accommodate this.

One thing that really messed with my entire dance was when I was informed of the size of our area. My robot’s dance relied on a large, open space, so when I learned of our restrictions, I was forced to change my code.

 

I really like some of the moves I accomplished with my robot. It definitely works better in virtual worlds, because the motors on the physical robot are old, and they don’t work as well as they should. The beginning part (the shuffling to the beat of the song) was incredibly satisfying to get in sync. Though some may think it repetitive, I personally think this is one of the strongest parts of my entire dance. Another original move is when I have the robot’s arm go up when the singer says “rising up.” I thought it was quite clever, and watching it move in sync with the music after all of the work it took was very satisfying.

 

I think the greatest strength I demonstrated in this project was not programming-based at all. This skill I demonstrated was good teamwork. When others were struggling with their robots, I would take considerable time away from my own project in order to help my peers. If someone was struggling with understanding a concept, I tried to explain it to them. If someone was unsure about an unexpected outcome from their code, I would help troubleshoot, and then suggest various solutions. If a robot was unstable, a screw loose, a motor unplugged, a wire jammed, I’d usually be offering my advice to my peers. There were also times where I struggled, and I had many friends to turn to. I also asked for help, and received it, from my peers. This project may have been a test of our programming skills, but it brought out a collaborative nature in the class.

Leave a Reply