Question: Question 5 ( 4 0 marks ) : C programming language Write a C program that will cause the Arduino board's LEDs to turn off

Question 5(40 marks): C programming language
Write a C program that will cause the Arduino board's LEDs to turn off and on, from left to left, in an infinite loop. Assuming a white circle means "LED is on", and a black circle means "LED is off", then for one second the LEDs will look like:
then the LEDS look like:
then:
then:
then:
then:
and finally back to:
in a loop forever.
Recall the mapping of port bits to LEDs:
port B, bit 1
port B. bit 3
port L, bit 7
port L. bit 5
port L, bit 3
port L, bit 1
Write your answer on the page 11(opposite). The C program's file has been started for you. Some marks will be given for the quality of your solution.
(Remember: if you want a one-second delay, use_delay_ms(1000); at that spot in your program.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!