During this project, we learned about electricity and then programming to create a "robot art show" on the Arduino. My partner and I created a video game that we called Meteor Strike.
The Game
The objective of the game is to avoid the falling meteors. When you press and hold the button, your character moves to the other space. When you release the button, your character moves back. Your score is determined by how long you last in seconds.
Circuit Diagram
Here is our code for the game. You can read the notes that are marked with // to see what the code is doing at each step.
Concepts
We learned about electricity and programming during this project. These went together to create a circuit that was controlled and programmed by the Arduino.
Electricity
Power(P)- rate of doing work or amount of energy used per unit time. P = W/t. Measured in watts.
Circuit - a circuit is a closed loop conductive material from positive to negative sides of a power source.
Resistance(R) - a measure of how much resistance the current encounters. In series, resistor values add, and in parallel, 1/R(total) = 1/R(1) + 1/R(2) + 1/R(3). R = V/I Measured in ohms.
Current(I) - electricity through a circuit. I = V/R. Measured in amps.
Voltage(V) - potential energy drop across a component of a circuit. V= IR. Measured in volts.
Circuit - a circuit is a closed loop conductive material from positive to negative sides of a power source.
Resistance(R) - a measure of how much resistance the current encounters. In series, resistor values add, and in parallel, 1/R(total) = 1/R(1) + 1/R(2) + 1/R(3). R = V/I Measured in ohms.
Current(I) - electricity through a circuit. I = V/R. Measured in amps.
Voltage(V) - potential energy drop across a component of a circuit. V= IR. Measured in volts.
Programming
We learned programming using an Arduino. A list of all commands can be found here.
Reflection
This was yet another successful project. We made a video game on the arduino that we thought we would never be able to make. One peak, something that went well, was how fast we learned. Before this project, we had very little knowledge of electricity and no knowledge of programming. We learned in school and I learned additional content outside of school so we could learn everything that we would need to make this game. We picked up on the topics quickly, and we were able to have enough time to make this game. With our acquired knowledge, we were also able to help another group make a game similar to ours. Another peak was our commitment. We were both committed to making this project and we made sure that we finished. Because of this, we always had someone working during class at all times, and I think this helped us finish on time. However, a pit was that we couldn't easily work at the same time. Because we only had one computer to program with, we could only have one person programming at a time. Since we both had things we wanted to try, and it wasn't just one of us doing the programming, this slowed down our experiments a bit. We still managed to find all of our solutions and finish on time. Another pit was the not so randomness of our meteors. If I had to re-do this project with more time, I would find a way to make the meteors falling more random. Our current meteors are on a loop and they fall in the same exact pattern every time. As you can guess, you could just memorize this pattern, and go on forever with your eyes closed. So, if we wanted to improve the game, we would need to find a solution for this. Overall, I am happy with how this turned out, because it is a playable game with no errors. It works every time; it's just not random.