Write an arduino program using the if else if statement to


Note: For all exercises, write a multi-line comment at the top of the program. Include on the first line your name, student number and date. Include the unit # and ex# on the second line. And on the third line, include a description of the program. Write single line comments generously throughout the program to explain sections of the program, what they do.

Remember: Comments make it easier to understand the code you wrote for others and for yourself when you re-visit the program in the future.

1. Write an Arduino program using the IF / ELSE statement to turn an LED at pin 3 on when a pushbutton connected at pin 9 is pressed, similar to Fig. 1 and Fig. 2. And the LED is off if the pushbutton is not pressed.

2. Write an Arduino program using the IF / ELSE IF statement to turn an LED at pin 5 on when a pushbutton connected at pin 11 is pressed, similar to Fig. 1 and Fig. 2. And the LED is off if the pushbutton is not pressed.

3. Write an Arduino program using the IF / ELSE IF statement to turn an LED at pin 7 on and off 7 times with a delay of 0.7 seconds when a pushbutton is pressed at pin 1. The LED is off when the pushbutton is not pressed.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write an arduino program using the if else if statement to
Reference No:- TGS01629049

Now Priced at $15 (50% Discount)

Recommended (97%)

Rated (4.9/5)