Question: / / Hardware: Two buttons with GPIO pullup resistors. / / The LCD. / / / / / / Problem Statement: Build an Arduino project
Hardware: Two buttons with GPIO pullup resistors.
The LCD.
Problem Statement: Build an Arduino project that uses two buttons and the LCD. One button will
clear the LCD and reinitialize counter variable to zero. If button pushed, clear LCD and counter
The second button will enter a while loop and increment the counter variable by one
and display value on LCD. While button pushed, counter counter and write counter
value to display.
Note: bit integer range of to Then rolls over to zero.
Pseudocode Algorithm
create a global integer variable counter and initialize to zero
setup
set pin as input for button one with a pullup resistor
set pin as input for button two with a pullup resistor
setup pins for LCD use Lab as your guide
loop
if button one pushed
clear LCD command from Lab
counter
while button two pushed
counter counter
write counter value to LCD commands from Lab
end while loop
end loop
Question: What is smallest value you can get for count variable shortest time pushed button two
Question: What is highest value you can get for count variable longest time push button two
Question: Change program so the counter variable subtracts one, instead of adds one. What is smallest negative value you can get for count variable longest time button two pushed
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
