Question: using arduino uno 1. Below is a program that computes the area of a donut-shaped flat washer. The asks the user for the outside and

 using arduino uno 1. Below is a program that computes the

using arduino uno

1. Below is a program that computes the area of a donut-shaped flat washer. The asks the user for the outside and inside diameters and computes the area of the w using the formula: 2 Modify the program by creating and calling 3 user-defined functions: instructions() compute area() display_area() /* displays instructions on screen /* computes area given in/out diamet /* displays result on screen */ 7 Program computes area of flat (donut-shaped) washer / #include #define PI 3.14159 void setup() Serial.begin(115200); // open Serial Monitor float din, dout; /* inputs - inside & outside diameters float area; /* output - area of washer */ /* Display Instructions */ Serial.print("Program computes the area of a flat washe Serial.print("given the inside and outside diameters. In /* Get inputs from Serial Monitor */ Serial.print("Enter outside diameter: "); // prompt while (Serial.available () ==0); // wait for send dout = Serial.parseFloat(); // store input Serial.println(dout, 2); // echo print 1/ do it again to get din /* Compute area of washer */ area = PI * pow (dout/2,2) - PI + Pow (din/2,2)

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!