Write the ritual and gadfly functionsubroutine that


Design a wind direction measurement instrument using the input capture technique. Again, you are given a transducer that has a resistance that is linearly related to the wind direction. As the wind direction varies from 0 to 360 degrees, the transducer resistance varies from 0 to 1000

The frequencies of interest are 0 to 0.5 Hz, and the sampling rate will be 1 Hz. One way to interface the transducer to the computer is to use an astable multivibrator like the 555. The period of a 555 timer is 0.693⋅CT⋅(RA+2RB). The 555 output could be connected to the Input Capture Port Channel 7.

a) Show the hardware interface.

b) Write the ritual and gadfly function/subroutine that measures the wind direction and returns a 16-bit unsigned result with units of degrees (i.e., the value varies from 0 to 359). (You do not have to write software that samples at 1 Hz, simply a function that measures wind direction once.)

Request for Solution File

Ask an Expert for Answer!!
Mechanical Engineering: Write the ritual and gadfly functionsubroutine that
Reference No:- TGS01468251

Expected delivery within 24 Hours