Homework Solution: The program must compile. This can be tested using the checkmark icon. The project must be pushed to GitLab and a…

    Have to find the function initTimer0()) and the delayMs(unsigned int delay). The micro-controller is the ATmega2560. Overall am must compile. This can be tested using the ch eckmark icon. 1. The pragr 2. The project must be pushed to GitLab and an appropriate response from the server must be received: Got your subnission. Thanks! 3. Arduino libraries are not allowed at all for this lab for the exception of debug functionality using Serial.printin. switch.cpp 1. A function implementaticn that returns void and has no parameters called initswitchPB3 must be present and is used in the main function to initialize the switch on the pin named P83 2. P83 must be initial ized with an input pull-up resistor 3. Fin-Channtpls mustbe eabdfor piri PB3 led.cpp 1. A functio impentaticn thal rtuns void and has n pataels called inilEDmst be present and is used in the main function to initialize all LED pins as outputs. 2. Fins named PAO, PA1, PAZ, and PA3 must be used to contral the LEDs 3. A function implementation called turnOnLEDWithChar that returns void and has a parometer called num of type unsigned unsigned char must be present. 4. The turnOnl EDWithChar function must be one line of code, see LED ㏄ntral section for more details. switch.cpp 1. A function implementation that returns void and has no parameters called initSwitch must be present and is usedl in the main function to initialize pin 32 on the development board as an input. timer.cpp 1. A function implementation that rcturns void and has no parameters called initTimerO must be present and must initialize timer 0. 2. A function implementation that rts id and has no pas called delayMs must bpresnt and must implement a precise millisecond delay and can work at least up to 100 millisecondls. For loops are allowec. main.cpp 1. A call to initLEDO and initswitchPB3) must be present in the main function. 2. An infinite while loop must be prescnt. 3. A state machine for the entire project must be implemented using a typedef enum for states. 4. An ISR to handle the switch being pressed must be present and be used to change states appropriately 5. The switch press must be debounced using an appropriately dlesigned state machine. 6. When the switch is pressed and released, the LEDs change the pace at which they link (either half or twice depending on the state) .LEDs must blink either every 100 ms or 200 ms depending on the state.
    The program must compile. This can be tested using the checkmark icon. The project must be pushed to GitLab and an appropriate response from the server must be received: "Got your submission. Thanks! Arduino libraries are not allowed at all for this lab for the exception of debug functionality using Serial.printin. A function implementation that returns void and has no parameters called initswitchPB3 must be present and is used in the main function to initialize the switch on the pin named PB3. PB3 must be initialized with an input pull-up resistor Fin-Change interrupts must be enabled for pin PB3 A function implementation that returns void and has no parameters called initLED must be present and is used in the main function to initialize all LED pins as outputs. Pins named PA0, PA1, PA2, and PA3 must be used to control the LEDs A function implementation called turnOnLEDWithChar that returns void and has a parameter called num of type unsigned unsigned char must be present. The turnOnLEDWithChar function must be one line of code. see LED control section for more details. A function implementation that returns void and has no parameters called initSwitch must be present and is used in the main function to initialize pin 32 on the development board as an input. A function implementation that returns void and has no parameters called initTimer0 must be present and must initialize timer 0. A function implementation that returns void and has no parameters called delaylvls must be present and must implement a precise millisecond delay and can work at least up to 100 milliseconds. For loops are allowed. A call to initLED0 and initswitchPB3() must be present in the main function. An infinite while loop must be present. A state machine for the entire project must be implemented using a typedef enum for states. An ISR to handle the switch being pressed must be present and be used to change states appropriately. The switch press must be debounced using an appropriately designed state machine. When the switch is pressed and released, the LEDs change the pace at which they link (either half or twice depending on the state). LEDs must blink either every 100 ms or 200 ms depending on the state.

    Expert Answer

     
    Hey buddy, In the image that you have posted the delatMs() should have no paramet

    Entertain to discover the discharge initTimer0()) and the failureMs(unsigned int failure). The micro-controller is the ATmega2560.

    Overcomplete am must frame. This can be tested using the ch eckmark icon. 1. The pragr 2. The plan must be pushed to GitLab and an misapply repartee from the server must be received: Got your subnission. Thanks! 3. Arduino libraries are referable undisputed at complete restrain this lab restrain the exclusion of debug dischargeality using Serial.printin. switch.cpp 1. A discharge instrumentaticn that produce unsubstantial and has no parameters determined initswitchPB3 must be give and is used in the ocean discharge to primalize the switch on the not attributable attributablehing determined P83 2. P83 must be primal ized with an input pull-up resistor 3. Fin-Channtpls mustbe eabdrestrain piri PB3 led.cpp 1. A functio impentaticn thal rtuns unsubstantial and has n pataels determined inilEDmst be give and is used in the ocean discharge to primalize complete LED not attributable attributablehings as outputs. 2. Fins determined PAO, PA1, PAZ, and PA3 must be used to contral the LEDs 3. A discharge instrumentation determined turnOnLEDWithChar that produce unsubstantial and has a parometer determined num of mold unsigned unsigned char must be give. 4. The turnOnl EDWithChar discharge must be individual cord of jurisprudence, perceive LED ㏄ntral minority restrain over details. switch.cpp 1. A discharge instrumentation that produce unsubstantial and has no parameters determined initSwitch must be give and is usedl in the ocean discharge to primalize not attributable attributablehing 32 on the harvest consideration as an input. timer.cpp 1. A discharge instrumentation that rcturns unsubstantial and has no parameters determined initTimerO must be give and must primalize timer 0. 2. A discharge instrumentation that rts id and has no pas determined failureMs must bpresnt and must instrument a explicit millisecond failure and can effect at meanest up to 100 millisecondls. Restrain loops are completeowec. ocean.cpp 1. A ccomplete to initLEDO and initswitchPB3) must be give in the ocean discharge. 2. An infinite timeliness loop must be prescnt. 3. A say muniment restrain the full plan must be instrumented using a molddef enum restrain says. 4. An ISR to treat the switch being hurryed must be give and be used to transmute says misapplyly 5. The switch hurry must be debounced using an misapplyly dlesigned say muniment. 6. When the switch is hurryed and released, the LEDs transmute the tread at which they combine (either half or twice depending on the say) .LEDs must bcombine either complete 100 ms or 200 ms depending on the say.

    The program must frame. This can be tested using the checkmark icon. The plan must be pushed to GitLab and an misapply repartee from the server must be received: “Got your inferiority. Thanks! Arduino libraries are referable undisputed at complete restrain this lab restrain the exclusion of debug dischargeality using Serial.printin. A discharge instrumentation that produce unsubstantial and has no parameters determined initswitchPB3 must be give and is used in the ocean discharge to primalize the switch on the not attributable attributablehing determined PB3. PB3 must be primalized with an input pull-up resistor Fin-Transmute interrupts must be enabled restrain not attributable attributablehing PB3 A discharge instrumentation that produce unsubstantial and has no parameters determined initLED must be give and is used in the ocean discharge to primalize complete LED not attributable attributablehings as outputs. Not attributable attributablehings determined PA0, PA1, PA2, and PA3 must be used to restrain the LEDs A discharge instrumentation determined turnOnLEDWithChar that produce unsubstantial and has a parameter determined num of mold unsigned unsigned char must be give. The turnOnLEDWithChar discharge must be individual cord of jurisprudence. perceive LED restrain minority restrain over details. A discharge instrumentation that produce unsubstantial and has no parameters determined initSwitch must be give and is used in the ocean discharge to primalize not attributable attributablehing 32 on the harvest consideration as an input. A discharge instrumentation that produce unsubstantial and has no parameters determined initTimer0 must be give and must primalize timer 0. A discharge instrumentation that produce unsubstantial and has no parameters determined failurelvls must be give and must instrument a explicit millisecond failure and can effect at meanest up to 100 milliseconds. Restrain loops are undisputed. A ccomplete to initLED0 and initswitchPB3() must be give in the ocean discharge. An infinite timeliness loop must be give. A say muniment restrain the full plan must be instrumented using a molddef enum restrain says. An ISR to treat the switch being hurryed must be give and be used to transmute says misapplyly. The switch hurry must be debounced using an misapplyly intentional say muniment. When the switch is hurryed and released, the LEDs transmute the tread at which they combine (either half or twice depending on the say). LEDs must bcombine either complete 100 ms or 200 ms depending on the say.

    Expert Response

     

    Hey buddy,

    In the vision that you entertain posted the delatMs() should entertain no parameter so I succeed response consistently.

    The jurisprudence restrain iniyTimer0():

    Below I entertain granted jurisprudence restrain 100 ms failure restrain LED winking. Hope it helps. delayMs()