Question: Develop an Arduino program called DrawSineCurve that will draw a decaying sinusoid with the period and damping entered by the user. The analytical function for

Develop an Arduino program called DrawSineCurve that will draw a decaying sinusoid with the period and damping entered by the user. The analytical function for the sinusoid is provided in Equation 1.

Y(x)=1.5e-dx(sin(x/T)+cos(x/T)) (1)

where d is the damping and is unitless and T is the period of the oscillation in inches. The program should:

- Prompt the user for the desired damping and period.

- Move the XY-table to a position at the center of the y-axis and 1 inch to the right of the x-axis Back limit switch. This will be considered the new x=0 datum.

- Pause for five seconds so a pencil can be inserted into the plotter.

- Draw the decaying sinusoid for inches.

Note: The concepts from Bresenham's line algorithm can also be used to write an algorithm for this problem. The major difference is that analytical predictions of the desired location of the table are not based on a linear function but on the function in Equation 1. Additionally, the table only ever steps Away in the x-axis, which actually simplifies the algorithm as compared to Bresenhams Algorithm.

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!