Question: The question to this problem is to add something to the code below. What I need to add is to make this program light a

The question to this problem is to add something to the code below. What I need to add is to make this program light a led 2 times delay than light the led 5 times delay than light the led 7 times. I know I need to add a for loop. But keep getting errors in code composer. I just need help on how to add the for loop to work specifically with those numbers. Would I use for example for lighting twice . for( i=0; i=2;i++), for (i=0; i=5; i++), for (i=0; i=7; i++)? #include int main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer P1DIR |= 0x01; // Set P1.0 to output direction for (;;) { volatile unsigned int i; P1OUT ^= 0x01; // Toggle P1.0 using exclusive-OR i = 50000; //Delay do (i--); while (i != 0); } }

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 Databases Questions!