Design a Contiki program using the below description.
The advanced features should not replace the basic features. If needed, you can maintain multiple source files, one for the basic feature implementation, and one for the advanced feature implementation. You should then combine & print them in a single PDF file for submission.
While you must strictly follow the specified format to present your output for your basic feature implementation, you can choose your own output format for your advanced feature implementation. However, you must provide a description so that your output presented in your screenshots can be clearly interpreted and checked for correctness.
In the advanced feature, you need to get readings from the light sensor and save them into a buffer (which can be viewed as vector X with X; representing the i-th measurement from the light sensor). Then, you need to implement the following features.
An estimator for the normalized autocorrelation function of X, i.e.,
R(k) =
1
------- n-k
(n − k) σ^2 Σ (Xt − μx) (Xt+k − μx) for all k € {0,1,2,..., n − 1}
t=1
where n is the size of the vector X, μx is the arithmetic mean of X, and σ is the estimated standard deviation of X.
The discrete cosine transform of the autocorrelation vector DCT{R}.
n-1
S(l)=1/n Σ R (k) COS(π /n(k+1/2)(l+1/2))
k=0
for all l E {0,1,2, ..., n − 1}.