Tuesday, May 3, 2016

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. 


No comments:

Post a Comment