please, i want you to modify the upper program to the situation in the second pic
#include "buttons.h" int main(void) unsigned char blinkrate = 0; // 4 rates, 0 to 3 unsigned char has_switchi_changed = 0; TRISDbits.RD1 - 1; // set RD1 as input (switch 1) while (1) has_switchl changed - monitor_switchl for edges (PORTDbits. RD1); //happens every cycle of while loop if (has_switchi_changed -- 1) //anything that should happen occasionally should be in here blinkrate++; //increment counter if (blinkrate > 3) blinkrate = 0; //cycle back to 0 //happens every cycle of while loop switch (blinkrate) // switch between blink rates case 0: // code here for pin on, delay, pin off, delay break; case 1: // code here for pin on, delay, pin off, delay break; case 2: // code here for pin on, delay, pin off, delay break; case 3: // code here for pin on, delay, pin off, delay break; 25 Modify alterBlinkRate.c to work properly and to have four rates of blinking; off, slow, moderate, and full on. For slow blinking, use a period of 0.240 s and a duty cycle of 33%, and for moderate, use a period of 0.080 s and a duty cycle of 66%. The LCD should display OFF, SLOW, MODERATE. and ON. It should only be refreshed when necessary, i.e. on the button press. Have the second toggle change the behaviour of the LEDs according to Table 4-1. Table 4-1: Two buttons making incremental changes LED behaviour Cycle up the rate of blinking of both LEDs with each depression of B1 Cycle down the rate of blinking of both LEDs with each depression of B2 #include "buttons.h" int main(void) unsigned char blinkrate = 0; // 4 rates, 0 to 3 unsigned char has_switchi_changed = 0; TRISDbits.RD1 - 1; // set RD1 as input (switch 1) while (1) has_switchl changed - monitor_switchl for edges (PORTDbits. RD1); //happens every cycle of while loop if (has_switchi_changed -- 1) //anything that should happen occasionally should be in here blinkrate++; //increment counter if (blinkrate > 3) blinkrate = 0; //cycle back to 0 //happens every cycle of while loop switch (blinkrate) // switch between blink rates case 0: // code here for pin on, delay, pin off, delay break; case 1: // code here for pin on, delay, pin off, delay break; case 2: // code here for pin on, delay, pin off, delay break; case 3: // code here for pin on, delay, pin off, delay break; 25 Modify alterBlinkRate.c to work properly and to have four rates of blinking; off, slow, moderate, and full on. For slow blinking, use a period of 0.240 s and a duty cycle of 33%, and for moderate, use a period of 0.080 s and a duty cycle of 66%. The LCD should display OFF, SLOW, MODERATE. and ON. It should only be refreshed when necessary, i.e. on the button press. Have the second toggle change the behaviour of the LEDs according to Table 4-1. Table 4-1: Two buttons making incremental changes LED behaviour Cycle up the rate of blinking of both LEDs with each depression of B1 Cycle down the rate of blinking of both LEDs with each depression of B2