I have provided a screenshot below of the clean code used for the circuit.
Schematic of the Circuit Used
Circuit 2: Potentiometer Diagram
For Circuit 2- Potentiometer, I began by running the red jump
wire from digital pin 13 to j-20 on the breadboard. I then connected resistor to
j-21 to the ground on the breadboard. Next, I connected the positive side
(anode) of my LED to h-20 and negative side (cathode) to h-21. I then began
setting up the connections for the potentiometer. I ran the green jumper wire
from analog A0 to e-7 on the breadboard. In doing so, this should provide “HIGH”
(5 Volts) and “LOW” (0 Volts) which will cause the LED to blink faster, and
slower, and cause the LED to dim and become brighter. The blue jumper wire is
ran from the negative to e-6, and the yellow jumper wire is ran from e-8 to the
positive. The potentiometer is in a-6, a-7, and a-8. A-6 is positive, a-7 is
the voltage (from 0V to 5V) and a-8 is the negative. My last step was to
connect a red jumper wire from the 5V pin to the anode on the breadboard, and a
black jumper wire from the ground pin to the diode on the breadboard.
I reviewed the code and typed it in the Arduino IDE to have
an understanding of the code and how it works. Once I felt comfortable in
running the code, I verified the code to check for errors and thankfully all
was well. I uploaded the code to the Arduino and the result is in the video
below.
Photo of my circuit
*The explanation of my circuit 2 is provided above. I tried to narrate the video, but the background noise that I could not control would be distracting to some viewers.
Circuit and Code Play
This week, the Circuit and Code Play, and Extension Challenge were not as overwhelming as last week. Don't get me wrong, it was extremely challenging, but thankfully I didn't have anxiety as I did last week. I believe I had a breakthrough during the readings and discussions. Struggling is where I learn and grow the most, so I will embrace the challenges and struggles.
Extension
Challenge
1. Can you control 2 lights with the same brightness or same blink rate?
I had no problem controlling 2 lights with the same brightness and same blink rate.
2. Can you control 2 lights with one potentiometer but have them controlled so that as one light gets dim, the other gets bright or one blinks fast while the other blinks slow?
This extension challenge was indeed a challenge. I had no problem setting up the Arduino board, the challenge was with the code. After a couple hours of working with the code I was finally able to get the code to run without errors. As the video below shows that one LED is bright and the other LED is dim. Each are blinking intermittently. I tried but could not get the coding of the LEDs so that one LED would blink fast while the other LED blinked slow.
Reflection
I was actually excited to work with the Arduino this week. I don't look at it as some scary board that will try to defeat me as I did last week. I am becoming more familiar with the Arduino board, but the codes are were I struggle the most. I am still hopeful as the course moves ahead I will feel more comfortable working with the codes. To be honest it still bothers me that I couldn't get the code written to work for all the challenges of extension challenge 2, but I will keep trying. I do not want to accept defeat!
I can see more possible extensions of this project than the project last week. I believe it is because I am getting more familiar with the Arduino and the entire process. As I explored this week I could not help but think about using the extension for a dimming light switch and controlling volume for stereo volume. I also looked at my desktop fan and wondered if a potenitometer is used to control the speed of the fan and immediatly my thinking went to, potentiometers can adjust and control the speed of a CPU fan. I am proud of the growth I have had over the past week. I am excited for next weeks challenges.
This week, the Circuit and Code Play, and Extension Challenge were not as overwhelming as last week. Don't get me wrong, it was extremely challenging, but thankfully I didn't have anxiety as I did last week. I believe I had a breakthrough during the readings and discussions. Struggling is where I learn and grow the most, so I will embrace the challenges and struggles.
1.
See what happens if you use two digital pins rather than one
digital and one analog pin.
When I connected two digital pins rather than one digital and one
analog pin, the LED would blink but the potentiometer did not control the dimming of
the LED.
2. See what happens if you use two analog pins rather than one
digital and one analog pin.
When I connected two analog pins rather than one digital and one
analog pin the LED stop blinking.
3.
What happens if you replace analogWrite with digitalWrite and vice
versa?
When I replaced analogWrite with digitalWrite and vice versa in
the code I could not get the LED to blink using any of the previous scenarios.
1. Can you control 2 lights with the same brightness or same blink rate?
I had no problem controlling 2 lights with the same brightness and same blink rate.
2. Can you control 2 lights with one potentiometer but have them controlled so that as one light gets dim, the other gets bright or one blinks fast while the other blinks slow?
This extension challenge was indeed a challenge. I had no problem setting up the Arduino board, the challenge was with the code. After a couple hours of working with the code I was finally able to get the code to run without errors. As the video below shows that one LED is bright and the other LED is dim. Each are blinking intermittently. I tried but could not get the coding of the LEDs so that one LED would blink fast while the other LED blinked slow.
Reflection
I was actually excited to work with the Arduino this week. I don't look at it as some scary board that will try to defeat me as I did last week. I am becoming more familiar with the Arduino board, but the codes are were I struggle the most. I am still hopeful as the course moves ahead I will feel more comfortable working with the codes. To be honest it still bothers me that I couldn't get the code written to work for all the challenges of extension challenge 2, but I will keep trying. I do not want to accept defeat!
I can see more possible extensions of this project than the project last week. I believe it is because I am getting more familiar with the Arduino and the entire process. As I explored this week I could not help but think about using the extension for a dimming light switch and controlling volume for stereo volume. I also looked at my desktop fan and wondered if a potenitometer is used to control the speed of the fan and immediatly my thinking went to, potentiometers can adjust and control the speed of a CPU fan. I am proud of the growth I have had over the past week. I am excited for next weeks challenges.




No comments:
Post a Comment