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 re-initialize counter variable to zero. If button == pushed, clear LCD // and counter =0.
// 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 +1 and write counter
// value to display.
// Note: 16-bit integer range of -32,768 to 32,767. Then rolls over to zero.
//
//**** Pseudocode Algorithm ****
//
// create a global integer variable counter and initialize to zero
//
// setup()
//
// set pin 4 as input for button one with a pullup resistor
// set pin 5 as input for button two with a pullup resistor
// setup pins for LCD use Lab-4 as your guide
//
//
// loop()
//
// if ( button one pushed )
//
// clear LCD // command from Lab-4
//
// counter =0
//
//
// while( button two pushed )
//
// counter = counter +1
//
// write counter value to LCD // commands from Lab-4
//
// 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!