Question: Now it is time to modify pwmled 2 . Your code will need to accomplish the following: Set duty for PWM 1 to 9 0

Now it is time to modify pwmled2. Your code will need to accomplish the following:
Set duty for PWM1 to 90%.
Set duty for PWM2 to 10%.
Set the sleep(1) function so it sleeps for 1 second.
Set duty for PWM1 to 0%.
Set duty for PWM2 to 90%.
Create your code in a loop.
Note that it will be difficult to determine the PWM values from the LEDs due to the differences between the yellow and green LEDs. The yellow LED is much brighter than the green LED. The green LED at 10% appears as though it is turned off. Also, the PWM_setDuty() function does not take percentages. Thus the function PWM_setDuty (pwm1,90) will not work. Instead you need to calculate the value (90% of the period).
Now it is time to modify pwmled 2 . Your code

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!