Wednesday, May 4, 2016
Click a button to turn on an LED
For this challenge, we used the code provided to be able to push a button and have the LED turn on. We used the directions provided and began connecting the resistors and jump wires to the Arduino and to the breadboard. We also plugged the button that was going to be pushed to turn on the LED into the breadboard. This challenge was slightly confusing because of all the wiring that needed to be done but we managed to put all the wires in the right spot. Below is a video of the button being pushed to turn on the LED.
Tuesday, May 3, 2016
Controlling LED with Potentiometer
In this challenge, we used the potentiometer to deliever an increase or decrease and the increase and decrease deteremines the output of current to the circuit. We needed a lot of help because there was alot of wiring and the code was alittle difficult. The potentiometer had a little "lever" that you could use to turn the LED light on/off. We used the code that was provided and pasted it in Arduino. After completeing all the wiring, we flipped the "lever" and below are the results.
Play Some Music
Though we could not complete this challenge due to the broken speaker. All we would have to do for this challenge would be to paste the provided code in Arduino and upload the code and modify the code to play a song of our choice. The speaker should then play the song "Twinkle, Twinkle little star."
Counting in Binary
For this challenge, we modified the code that was provided so that the binary number starts in 0000 all the LEDs will be off. Then we went to 1 which was 0001 and only the first LED will blink. Then we went to 2 which was 0010 and the second LED will blink. Then we went to 3 which was 0011 and the first and the second LED will turn on. We continued this method until all numbers displayed up to 15. Below is a video of the LED lights turning on counting in binary.
Programming Three LEDs
For A, we had to use the previous code from the challenge "Programming two LEDs" and modified it so that three LEDs may be lit up. We modified the code so that the red LED blinks first, then the green LED and finally the white LED. In the directions, it is said to use a blue LED but we had to use a white LED. Below is a video of the red LED blinking first, then the green LED and finally the white LED.
For B, We modified the previous code to make the red LED blink twice, then the green LED to blink once and finally the blue LED to blink twice. As said previously the "blue" LED was replaced with a white LED since we had no blue LED available. Below is a video of the red LED blinking once, the green LED blinking once and finally the blue LED blinking twice.
For C, We modified the previous code to have the red LED blink, then the green LED, then a blue LED, and finally a green LED and we made this pattern repeat. As said previously the "blue" LED was replaced with a white LED since we had no blue LED available. Below is a video of the red LED blinking, then the green LED, then a blue LED, and finally a green LED.
For B, We modified the previous code to make the red LED blink twice, then the green LED to blink once and finally the blue LED to blink twice. As said previously the "blue" LED was replaced with a white LED since we had no blue LED available. Below is a video of the red LED blinking once, the green LED blinking once and finally the blue LED blinking twice.
For C, We modified the previous code to have the red LED blink, then the green LED, then a blue LED, and finally a green LED and we made this pattern repeat. As said previously the "blue" LED was replaced with a white LED since we had no blue LED available. Below is a video of the red LED blinking, then the green LED, then a blue LED, and finally a green LED.
Monday, May 2, 2016
Programming Two LEDs
In programming Two LEDs, we used the code provided to light up two LED lights on the breadboard.We added a second LED to the breadboard along with another jump wire and resistor. Below is a video of the green and red LED light blinking on and off after each other.
We modified the provided code to have the red LED blink two times and have the green LED blink once. Below is a video of the red LED blinking twice and the green LED blink once.
For B, We modified the provided code to make the green and red LED on for 2 seconds , then only the green LED for 2 seconds and then the red LED for 2 seconds. Below is a video of the green and red LED on for 2 seconds , then only the green LED for 2 seconds and then the red LED for 2 seconds.
For C, We modified the provided code to make the green LED blink 3 times and then have the red LED to blink once. Below is a video of the green LED blinking 3 times and the red LED blinking once.
Programming the External LED
Using the code provided we copy and pasted the code into Arduino and began modifying the code to achieve each kind of blinking LED.
In A, We modified the code to keep the LED on without it shutting off. Below is a video of the LED on without shutting off.
In B, We modified the code to keep the LED off without ever going on. Below is a video of the LED staying off without turning on.
In C, We modified the code to have the LED go on for 15 seconds and then go off for 3 seconds, Below is the video of the LED staying on for 15 seconds and then going off for 3 seconds.
In D, We had to modify the code to have the LED go on for a second , then go off for a second, then on for 5 seconds and off for a second. Below is a video of the LED going on for a second , then going off for a second, then going on for 5 seconds and off for a second
Subscribe to:
Posts (Atom)