Question: A loop in an mbed program is untidily coded as follows: While (1){ redled = 0; wait_ms(12); greenled = 1; wait(0.002); greenled = 0; wait_us(24000);

A loop in an mbed program is untidily coded as follows: 

While (1){
redled = 0;
wait_ms(12);
greenled = 1;
wait(0.002);
greenled = 0;
wait_us(24000);
}

What is the total period of the loop, expressed in seconds, milliseconds, and microseconds?

Step by Step Solution

3.53 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The total period of the loop will be equal to the sum of all the delay times in the loop w... View full answer

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 Systems Analysis And Design Questions!