Maker Challenge 1- Blinking LED Light

Project: Build a blinking LED circuit using the Arduino Starter Kit Guide-  Create a circuit and write the code to make a LED light blink. I was not successful on the first try but after a few adjustments in the code I was able to get the LED blinking.


The Code:

My first attempt at the code was not successful because I did not install the software correctly and then I could not find the Arduino file. Once I found it, then I accidently closed it again.

Once I got everything installed correctly , I copied the code and I started working on the board. 

I copied the code wrong at first and got several error messages. I changed one thing at a time and eventually got it working. -

.

Arduino Board Completed: I could not figure out how to get the circuit board onto the base; there was a clear plastic piece that had to be taken off. 

Electronic Diagram:



Video Explanation of setup: 


Video Explanation of wires and code connections:




Challenge Thinking: As I mentioned before, I  did not get off to a great start; as I had trouble installing the program. I accidently downloaded the wrong one; once I found the correct one, then I could not find the folder to extract it into. My computer did not have the folder that it showed in the guide book; so I just saved the program into the Arduino folder. Once I got it installed , I opened the guide book and slowly one step at a time and read all about the different parts. I looked at the diagram in my book and got out all the parts I needed. 


Completed board:


Once I had all the parts, then I started to look at the code. I had a few errors with the code. I did not have the brackets in the correct place, so I fixed those and moved the closed brackets to the top and bottom of each section of code. 

Completed code: 



I then went to compile my code with no errors and it still did not work. So I adjusted the wires and it started blinking! 


Video:












Once I completed the initial challenge, I moved onto the Challenge Project with changing the circuit and the code.

When complete the Wire and Code play, I felt pretty confident. I felt I really understood how the code and wires worked together. 

Wire Play:

What happens if you turn the LED around (reverse the wiring)?    Doing this made the LED light stop working because like a battery the positive and negative ends have to connect to the right sides. 

What happens if you remove the positive lead from the breadboard? Does the circuit still work? This did not affect the blinking LED at all; with either end disconnected or both ends disconnected. I don't think this wire is actually doing anything. 

Video: 


What happens if you place the resistor to the positive side of the LED and simply used a wire to run back from the LED to ground? When you do this, you will need to change up the wiring a little so check this closely to make sure you have not shorted out the circuit. This stopes the light form blinking. I think this happens because the GND power is plugged into the negative side of the bread board. 

Video: 



What happens if you move the wire from port 13 to port 12 on the Arduino? This makes the light stop blinking. You would have to change the code to 12 if you move the wire to port 12 ( I realized this before completing the fist code play challenge)

Video:  



Code Play:



If you moved the wire from port 13 to port 12 on the Arduino, what do you need to change in the code As I mentioned before; you need to change the code to 12 because the wire is in port 12. You need to do this because the wire is now in 12 so the code needs to be 12 so they link up together. 



    
       


 What happens if you change the two delay code lines from delay(1000) to delay(2000)? This makes the light blink slower because 1000 equals 1 second. This means that that 2000 equals blink every 2 seconds. 

Take out a stop watch or timer of some sort and time the rate of blinking for each of these settings. How many times does the LED blink in a minute for each of these settings? For the 1000 delay, it blinks 30 times per minute; for the 2000 delay it blinked 15 times in a minute. 

 Video: 


What have you learned about the value that is placed between the parenthesis after delay()? The value equal seconds; if you increase the value, the light blinks slower, and if you decrease the value the light blinks faster. 

What value (parameter) would you place in delay() if you wanted the LED to blink at a rate of once every 3 seconds? How about every half second?  If  you want it to blink every 3 seconds, you would have to make the value 3000; If you want it to blink every half second, the value needs to be 500.

Video:  3000 







What happens if you place // before the words void setup()? This gives you an error message - expected error constructor, destructor, or type conversion before '(' token      
What happens if you place // before the words void loop()?This gives you the same error message as the previous change. 

What happens if you remove the last curly brace “}” in the program? This makes the light stop working and gives an error message; I think that this is what closes the code, so essentially the code is not closed. 

What happens if you place a // before pinMode(13,HIGH) in setup()?  This gave no error message but the light seemed to dim. 



         
   Video:  


What happens if you changed HIGH to high on the pinMode(13,HIGH) line? This gave an error message that said high not detected and it suggested sinh. HIGH is the voltage level.

What happens if you change the word pinMode to pinmode in pinMode(13,HIGH)? This gives an error message that says suggested pinMode



Extended Challenge: I honestly thought this would be a lot easier and I struggled for quite some time and I think I kept making the same mistake. I kept getting errors for resistors because I just duplicated the code for a second LED below the second code.

I did however figure out the board right away! I knew it already had ground power so I did not need to add another black and red wire. I added another green wire and put it into port 12 and e4 on the breadboard. Then I added an LED to d4 and 5, then a resistor to a5 and -9. 

Once I played with moving the code around and reading in my book; I realized I needed to move the pinMode 12 code under the pinMode 13 output. 



Then left the duplicated digital write 12 code below the 13. 



This made my lights blink at alternate rates. 



To make the Led lights blink at the same time I moved the code for the second light under the same type of code for the first light.










To make the lights blink at different rates; you need to separate the codes for each light then you can change the delay speed







The last challenge was to make one light stay one and one blink. For this you need to change the digital write to HIGH on both lines. LOW is what makes the light stop blinking, so turning them both to HIGH makes it stay on. 







The Final Reflection: In reflecting back to the whole process; it was definitely a challenge; I went in having no confidence in my ability and was honestly anxious to start. I had no idea what I was doing or how I would complete this first project with something I have never really done before. After completing the first challenge, my confidence boosted and I felt like I accomplished a previously difficult task. When working on the wire and code play; I felt more comfortable in my ability and felt I understood it better. Its amazing how a simple task can make you feel accomplished, because you took the time to really understand and make it work; thus us being makers. I personally have a lot of experience in making things, but I have never made anything like this before. It was a different kind of making and I felt like it opened a whole new world of making for me. I believe possible extensions would be simple blinking lights like string lights; in fact I did not realize until after completing this that I should have realized that before. My classroom is full of string lights that blink! I think now I will definitely appreciate those lights a little more now that I understand how they work. I also think this could be lights on electronics to show they are on and off.
















Comments

Popular posts from this blog

Challenge Week 5 Photo Resistor