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 edit
the file exaino, and modify the existing function DoStuffForOption 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
kmh
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# or
sw# is pressed. Note: Variables named swPin swPin swPin and
swPin have already been declared, populated, and setup with a mode
of INPUTPULLUP see Exercise # 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
