You may also want to add a timestamp to your readings. You can do this with something like the following:
timestamp = datetime.datetime.now().isoformat()
Well, yes, I do want to timestamp every entry into the log, but I have not figured out how the example provided can help me achieve this.
Basically every time the readings are logged, I want a date and timestamp to be on the same line…
I have tried adjusting the out.write() to include a strftime string but I get ValueError: unsupported format character y
and when i try to do it in another way:
TypeError: %d format: a number is required not module,
TypeError: float argument required, not module.
This is the last step to finish my project!