write_data.h places the data collected from the sensors into 'data.dat'. It will create the file if it doesn't exist, and append to it if it does.
The data is delimited by a space (' ') and lines are delimited by the newling character ('\n')