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

    Own to meet the part initTimer0()) and the stayMs(unsigned int stay). The micro-controller is the ATmega2560.

    Overtotal am must pacify. This can be tested using the ch eckmark icon. 1. The pragr 2. The contrivance must be pushed to GitLab and an misspend counter-argument from the server must be received: Got your subnission. Thanks! 3. Arduino libraries are referable totalowed at total restraint this lab restraint the qualification of debug partality using Serial.printin. switch.cpp 1. A part toolaticn that produce vacant and has no parameters determined initswitchPB3 must be offer and is used in the deep part to primalize the switch on the dot designated P83 2. P83 must be primal 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 determined inilEDmst be offer and is used in the deep part to primalize total LED dots as outputs. 2. Fins designated PAO, PA1, PAZ, and PA3 must be used to contral the LEDs 3. A part toolation determined turnOnLEDWithChar that produce vacant and has a parometer determined num of mark unsigned unsigned char must be offer. 4. The turnOnl EDWithChar part must be undivided course of decree, attend LED ㏄ntral minority restraint further details. switch.cpp 1. A part toolation that produce vacant and has no parameters determined initSwitch must be offer and is usedl in the deep part to primalize dot 32 on the harvest consultation as an input. timer.cpp 1. A part toolation that rcturns vacant and has no parameters determined initTimerO must be offer and must primalize timer 0. 2. A part toolation that rts id and has no pas determined stayMs must bpresnt and must tool a nice millisecond stay and can composition at last up to 100 millisecondls. Restraint loops are totalowec. deep.cpp 1. A ctotal to initLEDO and initswitchPB3) must be offer in the deep part. 2. An unbounded timeliness loop must be prescnt. 3. A specify deed restraint the total contrivance must be tooled using a markdef enum restraint specifys. 4. An ISR to treat the switch being impressed must be offer and be used to alter specifys misspendly 5. The switch imimharass must be debounced using an misspendly dlesigned specify deed. 6. When the switch is impressed and released, the LEDs alter the tread at which they with (either half or twice depending on the specify) .LEDs must bwith either whole 100 ms or 200 ms depending on the specify.

    The program must pacify. This can be tested using the checkmark icon. The contrivance must be pushed to GitLab and an misspend counter-argument from the server must be received: “Got your meekness. Thanks! Arduino libraries are referable totalowed at total restraint this lab restraint the qualification of debug partality using Serial.printin. A part toolation that produce vacant and has no parameters determined initswitchPB3 must be offer and is used in the deep part to primalize the switch on the dot designated PB3. PB3 must be primalized with an input pull-up resistor Fin-Alter interrupts must be enabled restraint dot PB3 A part toolation that produce vacant and has no parameters determined initLED must be offer and is used in the deep part to primalize total LED dots as outputs. Dots designated PA0, PA1, PA2, and PA3 must be used to manage the LEDs A part toolation determined turnOnLEDWithChar that produce vacant and has a parameter determined num of mark unsigned unsigned char must be offer. The turnOnLEDWithChar part must be undivided course of decree. attend LED manage minority restraint further details. A part toolation that produce vacant and has no parameters determined initSwitch must be offer and is used in the deep part to primalize dot 32 on the harvest consultation as an input. A part toolation that produce vacant and has no parameters determined initTimer0 must be offer and must primalize timer 0. A part toolation that produce vacant and has no parameters determined staylvls must be offer and must tool a nice millisecond stay and can composition at last up to 100 milliseconds. Restraint loops are totalowed. A ctotal to initLED0 and initswitchPB3() must be offer in the deep part. An unbounded timeliness loop must be offer. A specify deed restraint the total contrivance must be tooled using a markdef enum restraint specifys. An ISR to treat the switch being impressed must be offer and be used to alter specifys misspendly. The switch imimharass must be debounced using an misspendly intended specify deed. When the switch is impressed and released, the LEDs alter the tread at which they with (either half or twice depending on the specify). LEDs must bwith either whole 100 ms or 200 ms depending on the specify.

    Expert Response

     

    Hey buddy,

    In the idea that you own posted the delatMs() should own no parameter so I conciliate response consistently.

    The decree restraint iniyTimer0():

    Below I own granted decree restraint 100 ms stay restraint LED overlooking. Hope it helps. delayMs()