2. Write a program which reads in the text file generated inpart one and writes out the same data as a comma-separated values(CSV) file for further processing.
The file should have a header line which identifies which columncontains which values and should look something like this:
Time, Potentiometer, Temperature, Light, Switch0, Switch1, Switch2,Switch3
That header line should be followed by detail lines containing themeasurements and should look something like this (matching theabove Arduino output):
0,1,1,1,1,0.50,0.14,0.90 40,1,1,1,1,0.65,0.20,0.89
Store the data in an appropriate struct.