Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The question to this problem is to add something to the code below. What I need

ID: 3886412 • Letter: T

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 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); } }

Explanation / Answer

we can be call sleep() method from #include <windows.h> for the better solutions.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote