This is a copy of our code, and the lines which are marked with // represent the function of each line of code.
This project was a two-parter, with the first portion of the project requiring my partner and I to follow a set of instructions in a packet to complete a set of experiments, and for the second part of the project, we were given a complete Arduino kit, and we had a simple set of instructions: we could do anything we could think of, as long as it was entertaining and creative. To go more in depth regarding the first half of this assignment, we began by learning what a circuit is comprised of, how it operates, and its explicit definition in the first chapter of the packet. In the next few chapters, we learned the difference between parallel circuits and serial circuits, and how that affects the distribution of voltages throughout the circuits, the current which runs through the entire circuit, and the overall brightness of bulbs that we had wired within the circuit. We ended the first half of this project by learning about Ohm's Law, which stated the relationship between the voltage of a circuit, the overall resistance of the circuit, and the current that runs through the circuit, as well as Kirchhoff's Laws, which state that the sum of the currents leaving a connection must equal the current coming in to the connection, and that the overall voltage of the circuit must equal zero. For the second part of the project, Tyler and I were given free reign with an Arduino board and a set of example codes that we could use to make anything that we wanted, with the intentions being to create an automated robotic spectacle that would be entertaining. Our initial goal was to create a genuine Space Invaders game, but because of time constraints and restrictions on our coding knowledge, we had to cut out the shooting aspect of the game, making a Truck Lane game with a Space Invaders-style theme instead, but nonetheless, it was fun.
Concepts:
Resistance- the measure of how much the current is slowed down or how many obstacles it has to overcome; in series, R=R1+R2+R3..., and in parallel, 1/R=1/R1+1/R2+1/R3...
Current- the flow of electricity through the circuit; I=V/R; in series, Itotal=I1=I2=I3..., and in parallel, Itotal=I1+I2+I3...
Voltage- the potential energy drop across a component of a circuit; V=IR; in series, Vtotal=V1+V2+V3..., and in parallel, Vtot=V1=V2=V3...
Circuit- A loop made of conductive material running from the positive terminal to the negative terminal of the power source.
For the programming, we used a multitude of commands that can be found here at Arduino's website.
Reflection:
I think that this is one of the very few times that I've actually finished a project on time and it actually turned out the way we wanted it to be. Before this project, I never thought that I would be able to code, let alone create a video game that you could play without many hinderances, but because of our determination, we were able to pull off something great. I think that one of our major peaks was how quickly we were able to adapt to any challenges that we had to face. In the first part of our project, with the packets, we were able to grasp the concepts that were given to us without much difficulty, and we were able to understand the many functions of Arduino quickly, which allowed us to finish our game faster than we expected. Our ability to grasp this knowledge didn't just help us, but it also enabled us to help Matt's group with their code, but most of that credit goes to Tyler. Our second peak was our determination and drive to complete this project as successfully as we could. It was our top priority to get this project finished, and even though Tyler or I were off helping Matt, one of us would continue to make progress on our own code, and that consistency of productivity was key in getting us to finish early. One of our biggest pits was the fact that only one of us could work on the code at any given instance, since we only had one computer to work and execute our code on. We both wanted to add different components of code to the video game with our own touches, but we had to take turns adding and verifying the lines, so that caused a significant deal of difficulty for us, but we still managed our time well enough to complete the game earlier than the deadline. Our second pit was in the code of our game specifically, and it was that our meteors' orientation was either uncontrollably random, which would guarantee a wall of meteors that would force your loss, or there was a pattern to our meteors. We only made an array of around seven meteors for each row on the LCD, but we set it on a loop so that the game would go on indefinitely. The problem with that, though, was that it was extremely predictable, and I was able to get through an entire wave with my eyes closed. I guess that we could make an array for the meteors around a hundred meteors long, and then loop it that so the person won't be able to accurately memorize the positions of each of the meteors, but overall, I am proud of how well we were able to work through our issues, and make a functioning game.
Concepts:
Resistance- the measure of how much the current is slowed down or how many obstacles it has to overcome; in series, R=R1+R2+R3..., and in parallel, 1/R=1/R1+1/R2+1/R3...
Current- the flow of electricity through the circuit; I=V/R; in series, Itotal=I1=I2=I3..., and in parallel, Itotal=I1+I2+I3...
Voltage- the potential energy drop across a component of a circuit; V=IR; in series, Vtotal=V1+V2+V3..., and in parallel, Vtot=V1=V2=V3...
Circuit- A loop made of conductive material running from the positive terminal to the negative terminal of the power source.
For the programming, we used a multitude of commands that can be found here at Arduino's website.
Reflection:
I think that this is one of the very few times that I've actually finished a project on time and it actually turned out the way we wanted it to be. Before this project, I never thought that I would be able to code, let alone create a video game that you could play without many hinderances, but because of our determination, we were able to pull off something great. I think that one of our major peaks was how quickly we were able to adapt to any challenges that we had to face. In the first part of our project, with the packets, we were able to grasp the concepts that were given to us without much difficulty, and we were able to understand the many functions of Arduino quickly, which allowed us to finish our game faster than we expected. Our ability to grasp this knowledge didn't just help us, but it also enabled us to help Matt's group with their code, but most of that credit goes to Tyler. Our second peak was our determination and drive to complete this project as successfully as we could. It was our top priority to get this project finished, and even though Tyler or I were off helping Matt, one of us would continue to make progress on our own code, and that consistency of productivity was key in getting us to finish early. One of our biggest pits was the fact that only one of us could work on the code at any given instance, since we only had one computer to work and execute our code on. We both wanted to add different components of code to the video game with our own touches, but we had to take turns adding and verifying the lines, so that caused a significant deal of difficulty for us, but we still managed our time well enough to complete the game earlier than the deadline. Our second pit was in the code of our game specifically, and it was that our meteors' orientation was either uncontrollably random, which would guarantee a wall of meteors that would force your loss, or there was a pattern to our meteors. We only made an array of around seven meteors for each row on the LCD, but we set it on a loop so that the game would go on indefinitely. The problem with that, though, was that it was extremely predictable, and I was able to get through an entire wave with my eyes closed. I guess that we could make an array for the meteors around a hundred meteors long, and then loop it that so the person won't be able to accurately memorize the positions of each of the meteors, but overall, I am proud of how well we were able to work through our issues, and make a functioning game.