Question: In this assignment you will be asked to create your own functions and use a global variable. Normally, a global variable isn't necessarily the best
In this assignment you will be asked to create your own functions and use a global variable. Normally, a global
variable isn't necessarily the best option, but it will work for this assignment.
Assignment
For this assignment, you will create a simple counter based on button clicks. If you click on the left button, you
will add one to a variable. If you press the right button, you will subtract one from the same variable.
Each time you press the button, you must print the new value to the LCD. Clear it after every click before
printing the next number.
This program does not need a proper exit from main.
See the video below for additional clarification.
Required Functions
You will need one function for add and one function for subtract.
Both functions must return void.
Here are the function prototypes:
void addvoid;
void subtractvoid;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
