Question: The third menu option has not been implemented. To implement Option 3 , edit the file ex 0 4 a . ino, and modify the

The third menu option has not been implemented. To implement Option 3, edit
the file ex04a.ino, and modify the existing function DoStuffForOption3() as
follows (Note: All of the code you write for this exercise will be within this
function):
a. Create a variable named speed of type double to represent the speed in
km/h.
b. Create a variable named distance of type double to represent the
distance in km and set the value to zero.
c. Create a variable named deltat of type double to represent the time
elapsed between calls in hours.
d. Implement a looping mechanism that loops as long as neither sw#1 or
sw#2 is pressed. Note: Variables named swPin1, swPin2, swPin3, and
swPin4 have already been declared, populated, and setup with a mode
of INPUT_PULLUP (see Exercise #3 for more detail regarding how this
was accomplished). You must use the values stored in these four
variables when implementing the looping criteria for the loop you
implement.

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 Programming Questions!