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

    Bear to perceive the employment initTimer0()) and the retreatMs(unsigned int retreat). The micro-controller is the ATmega2560.

    Overtotal am must calm. This can be tested using the ch eckmark icon. 1. The pragr 2. The design must be pushed to GitLab and an alienate counterpart from the server must be received: Got your subnission. Thanks! 3. Arduino libraries are referable known at total restraint this lab restraint the exclusion of debug employmentality using Serial.printin. switch.cpp 1. A employment applianceaticn that produce vacant and has no parameters designated initswitchPB3 must be offer and is used in the ocean employment to judiciousize the switch on the rush determined P83 2. P83 must be judicious ized with an input pull-up resistor 3. Fin-Channtpls mustbe eabdrestraint piri PB3 led.cpp 1. A functio impentaticn thal rtuns vacant and has n pataels designated inilEDmst be offer and is used in the ocean employment to judiciousize total LED rushs as outputs. 2. Fins determined PAO, PA1, PAZ, and PA3 must be used to contral the LEDs 3. A employment applianceation designated turnOnLEDWithChar that produce vacant and has a parometer designated num of copy unsigned unsigned char must be offer. 4. The turnOnl EDWithChar employment must be individual outoutcontinuity of principle, view LED ㏄ntral minority restraint further details. switch.cpp 1. A employment applianceation that produce vacant and has no parameters designated initSwitch must be offer and is usedl in the ocean employment to judiciousize rush 32 on the product consultation as an input. timer.cpp 1. A employment applianceation that rcturns vacant and has no parameters designated initTimerO must be offer and must judiciousize timer 0. 2. A employment applianceation that rts id and has no pas designated retreatMs must bpresnt and must appliance a coercionmal millisecond retreat and can employment at last up to 100 millisecondls. Restraint loops are totalowec. ocean.cpp 1. A ctotal to initLEDO and initswitchPB3) must be offer in the ocean employment. 2. An unbounded timeliness loop must be prescnt. 3. A set-forth medium restraint the total design must be applianceed using a copydef enum restraint set-forths. 4. An ISR to touch the switch entity thronged must be offer and be used to diversify set-forths alienately 5. The switch throng must be debounced using an alienately dlesigned set-forth medium. 6. When the switch is thronged and released, the LEDs diversify the step at which they associate (either half or twice depending on the set-forth) .LEDs must ignore either total 100 ms or 200 ms depending on the set-forth.

    The program must calm. This can be tested using the checkmark icon. The design must be pushed to GitLab and an alienate counterpart from the server must be received: “Got your inferiority. Thanks! Arduino libraries are referable known at total restraint this lab restraint the exclusion of debug employmentality using Serial.printin. A employment applianceation that produce vacant and has no parameters designated initswitchPB3 must be offer and is used in the ocean employment to judiciousize the switch on the rush determined PB3. PB3 must be judiciousized with an input pull-up resistor Fin-Diversify interrupts must be enabled restraint rush PB3 A employment applianceation that produce vacant and has no parameters designated initLED must be offer and is used in the ocean employment to judiciousize total LED rushs as outputs. Rushs determined PA0, PA1, PA2, and PA3 must be used to govern the LEDs A employment applianceation designated turnOnLEDWithChar that produce vacant and has a parameter designated num of copy unsigned unsigned char must be offer. The turnOnLEDWithChar employment must be individual outoutcontinuity of principle. view LED govern minority restraint further details. A employment applianceation that produce vacant and has no parameters designated initSwitch must be offer and is used in the ocean employment to judiciousize rush 32 on the product consultation as an input. A employment applianceation that produce vacant and has no parameters designated initTimer0 must be offer and must judiciousize timer 0. A employment applianceation that produce vacant and has no parameters designated retreatlvls must be offer and must appliance a coercionmal millisecond retreat and can employment at last up to 100 milliseconds. Restraint loops are known. A ctotal to initLED0 and initswitchPB3() must be offer in the ocean employment. An unbounded timeliness loop must be offer. A set-forth medium restraint the total design must be applianceed using a copydef enum restraint set-forths. An ISR to touch the switch entity thronged must be offer and be used to diversify set-forths alienately. The switch throng must be debounced using an alienately contrived set-forth medium. When the switch is thronged and released, the LEDs diversify the step at which they associate (either half or twice depending on the set-forth). LEDs must ignore either total 100 ms or 200 ms depending on the set-forth.

    Expert Vindication

     

    Hey buddy,

    In the copy that you bear posted the delatMs() should bear no parameter so I get vindication pleasantly.

    The principle restraint iniyTimer0():

    Below I bear granted principle restraint 100 ms retreat restraint LED ignoreing. Hope it helps. delayMs()