Digital Trumpet Use an Arduino IDE to create a digital trumpet the program should do the following (screenshot should be provided): Program Overview Check to see if the first button is pressed. a. If it is, play the frequency for c. b. If it isn’t, skip to the next else if statement. Check to see if the second button is pressed. a. If it is, play the frequency for e. b. If it isn’t, skip to the next else if statement. Check to see if the second button is pressed. a. If it is, play the frequency for g. b. If it isn’t, skip to the next else if statement. If none of the if statements are true a. Turn the buzzer off.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Digital Trumpet
Use an Arduino IDE to create a digital trumpet the program should do the following (screenshot should be provided):

Program Overview
Check to see if the first button is pressed. a. If it is, play the frequency for c. b. If it isn’t, skip to the next else if statement.
Check to see if the second button is pressed. a. If it is, play the frequency for e. b. If it isn’t, skip to the next else if statement.
Check to see if the second button is pressed. a. If it is, play the frequency for g. b. If it isn’t, skip to the next else if statement.
If none of the if statements are true a. Turn the buzzer off.

Code to Note
Code
Description
Internal Pull-Up Resistor:
To declare a standard input, use the line pinMode(pin_name, INPUT) . If you would
pinMode (firstKeyPin,
like to use one of the RedBoard's built-in pull-up 20k2 resistors, it would look like
INPUT_PULLUP);
this: pinMode (firstKeyPin, INPUT_PULLUP); .The advantage of external pull-ups is
being able to choose a more exact value for the resistor.
Digital Input:
digitalRead (pin);
Check to see if an input pin is reading HIGH (5V) or LOW (OV). Returns TRUE (1) or
FALSE (0) depending on the reading.
Is Equal to:
This is another logical operator. The 'is equal to' symbol ( == ) can be confusing.
Two equals signs are equivalent to asking, "Are these two values equal to one
another?" On the other hand, one equals sign in code is assigning a particular
variable to a value. Don't forget to add the second equals sign if you are comparing
if(digitalRead (firstKeyPin)
== LOW)
two values.
Transcribed Image Text:Code to Note Code Description Internal Pull-Up Resistor: To declare a standard input, use the line pinMode(pin_name, INPUT) . If you would pinMode (firstKeyPin, like to use one of the RedBoard's built-in pull-up 20k2 resistors, it would look like INPUT_PULLUP); this: pinMode (firstKeyPin, INPUT_PULLUP); .The advantage of external pull-ups is being able to choose a more exact value for the resistor. Digital Input: digitalRead (pin); Check to see if an input pin is reading HIGH (5V) or LOW (OV). Returns TRUE (1) or FALSE (0) depending on the reading. Is Equal to: This is another logical operator. The 'is equal to' symbol ( == ) can be confusing. Two equals signs are equivalent to asking, "Are these two values equal to one another?" On the other hand, one equals sign in code is assigning a particular variable to a value. Don't forget to add the second equals sign if you are comparing if(digitalRead (firstKeyPin) == LOW) two values.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY