I am currently in a class called Hacking and Building. We just finished out Midterms and I thought I should share with everybody what I did. I don’t really have a name for what my project is called but I’ll just say it’s a tie with LED lights. I was planning on doing another project but that failed so i’l leave that out. I decided to just lay out the text then send you to a link much easier. Now onto the project I did:
For my project I decided to use the spaceship interface instead. This portion was going to be implemented into my first idea. But since that first idea failed I decided to just use this idea and it worked out well. My inspiration came from the tie that I had seen during class, where the LEDs lit up according to ones voice. I thought it would be cool if I can do the same without the cool voice sensor added in replaced with just a button.
5 220OHM RESISTORS
1 10 KILO OHM RESISTORS
7 JUMPER WIRES
1 PUSH BUTTON
5 LEDS(RED, BLUE, GREEN, YELLOW, WHITE)
The first thing I did was placed the resistors for the LEDs and a jumper wire in there designated places. on the left side of the breadboard the resistors being placed are being used a the power for the positive end of the LED that I will placed there. These resistors are 220 OHM. On the right side of the breadboard a jumper wire is placed on the ground end while the 10 KILOHM resistor is placed on the power end. These two are components will work for the third component which is push button.
I then set the jumper wires to there designated digital pins on the Arduino. From the start got confusing from which color was going to be on the what pin. I had to put different jumper wire cables. I wanted all the wire to be white for the negative side of the LED but there was only sadly four. So I used a blue jumper wire instead for the last LED and I used a green jumper wire for the push button.
Next I got acquired a hold of some telephone phones which I used as an extension from the tie to the breadboard. The soldering machine I used was actually from home so the soldering was very easy and it burned faster than it would be if I used the ones in class. I used the red telephone wires for positive and the black for the negative. The jumper wire is where the negative wire would go and the positive would go to the 220 OHM resistors. I placed them all to one side so I would have less problematic.
For the coding I added a new data type. It’s called unsigned long. It is like another other int or long data type but it extends it variables to 32bits. I placed a Serial.begin since I will be working with a serial monitor. I am following the spaceship interface project. So there will be more outputs then there will be an input. This first set of coding is simple in the void setup.
So my code doesn’t look so bland I decided to do add a Time process to it. The time I used was Milliseconds. The timer actually resets after 50 days. Once the program starts the timer will start. Because it is a small timer the delay has to be at 1000 or less the numbers will get larger and will be a problem. Serial.println prints out the number times. When in the Serial Monitor after waiting a second you can see the timer go up. When I used my project the timer goes slower. When not used the timer goes faster.
For the button when it not pressed the white LED will be on. All the other pins will be on HIGH and the circuit will ground all the others. When I pressed the push button, because all of the pins are on LOW they all work but with a twist. Since I placed the delays for all 5 pins 250, 150 in a pattern as seen the colors go down in a row in a loop.
I will have a video up and running soon