Create code that runs on a RaspberryPi and creates a .csv file
The code will have these functions available to it…
You don't have to worry about how these functions will work. You should write some fake versions of these functions to test if your code works.
csv file
The .csv file will have a format like this
LeiaMachineID,ParticleType,LaserColor,Pressure,LaserApertureSize,LaserBeamSizeAtLens,LensFocalLength,LensTilt,PickupTime,ParticleDuration L116,BlackLiquor,405,14.7,2,16,50,1.5,1588350836,2003 L116,BlackLiquor,405,14.7,2,16,50,1.5,1588350838,2333 L116,BlackLiquor,405,14.7,2,16,50,1.5,1588350840,1903 L116,BlackLiquor,405,14.7,2,16,50,1.5,1588350842,3 L116,BlackLiquor,405,14.7,2,16,50,1.5,1588350842,103 L116,BlackLiquor,405,14.7,2,16,50,1.5,1588350842,2003 L116,BlackLiquor,405,14.7,2,16,50,2.0,1588351842,12 L116,BlackLiquor,405,14.7,2,16,50,2.0,1588351842,45 L116,BlackLiquor,405,14.7,2,16,50,2.0,1588351842,70 L116,BlackLiquor,405,14.7,2,16,50,2.0,1588351842,40 L116,BlackLiquor,405,14.7,2,16,50,2.0,1588351843,1000 L116,BlackLiquor,405,14.7,2,16,50,2.0,1588351843,100 L116,Sharpie,405,14.7,2,16,50,1.5,1588352843,100
The user should be able to specify the machineid, the particle type, the laser color, etc. before the run starts. There will be helpful prompts saying exactly what each parameter means. PicupTime should be output as either the number of seconds since the RaspberryPi was turned on, or the number of seconds since 00:00:00 January 1 1970 UTC. ParticleDuration should be the number of milliseconds that the particle was trapped for.
The user should be able to specify the number of tests they want to perform. They should also be able to terminate the program mid execution, and still be able to retrieve useful information from the experiment.
The program should automatically call pickUpNewParticle() after 2 min if the particle still hasn't dropped out.