I need a device that records time (unix time or whatever) whenever it is on. That's it.
In python, which is the only programming language I know, the code would look something like this:
#!/usr/bin/env python import time interval=1 while True: t = time.time() f=open("myfile.txt", "a") f.write(str(t) + "\n") f.close() time.sleep(interval)
I never did any Arduino before. Is it possible to do this so that the device and the code is started whenever it is provided with electricity and stopped whenever electricity is cut off. If there is a simple solution, what hardware do I need?