Question: Please help write this program for C++ Write a C++ program for the Arduino UNO as described below. Display brief instructions on the computer screen.

 Please help write this program for C++ Write a C++ program

Please help write this program for C++

Write a C++ program for the Arduino UNO as described below.

Display brief instructions on the computer screen.

The count should be initialized to 0 and shown on the 7-segment display and the computer screen.

When the user presses the button the count should advance and the new value should be displayed on the 7-segment display and the computer screen.

The count should be mod-10 (0 to 9 and repeat).

Use the display_digit( ) function described in the presentation for this lab.

Use the readButton( ) function provided in the presentation for this lab to allow for switch debounce.

// Global variables for readButton( ) function (see Lab #3 Lecture)

// Other global variables

void setup( )

{ // Define input and output pins

// Set up serial communication

// Display instructions on the computer screen

// Display initial value (0) on 7-segment display

// Display initial value (0) on computer screen

}

void loop( )

{ // If readButton says the button is pressed:

// Increment counter

// Adjust counter for mod-10 operation

// Display count on computer screen

// Display count on 7-segment display

}

int readButton(int buttonPin)

{ // Use code provided in Lab #3 Lecture

}

void display_digit(int N)

{ // See Lab #3 Lecture for details

}

A+5V L Button switch Circuit 1 Arduino +5V 220 Q UNO W a D3 D9 fIGIb D4 10 km D6 D7 D8 Common anode 7-segment display (see data sheet for pinout) USB serial data A+5V L Button switch Circuit 1 Arduino +5V 220 Q UNO W a D3 D9 fIGIb D4 10 km D6 D7 D8 Common anode 7-segment display (see data sheet for pinout) USB serial data

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!