Finch Data Collector II

Write a program which turns the Finch into a datalogger that records light, acceleration, and temperature (six values in all). Your program should ask the user for a length of time in seconds. It should then record data once per second for the chosen time period. The data should be stored in a two-dimensional array.

When the data collection is finished, your program should save the data in the array to a file. You must open a file, write the data to it, and then close the file. Some sample code for file handling is shown below. As you write the Finch data to a file, you should place a simple delimiter between data values so that you can import your file into a spreadsheet program. A comma or semicolon is frequently used. Be sure to use a spreadsheet program to verify that the data can be easily imported.

Sample File Handling Code for Java: To use BufferedWriter, you must import*. 

Sample File Handling Code for Python: 

Extension:  Do some statistics on the data in the spreadsheet program. You can graph the data as a function of time and/or calculate things like the noise in the sensors or the mean acceleration.

Assignment Category: