import serialimport timeser = serial.Serial('com5', 9600, timeout=1)time.sleep(1)logfile = open('C:\Documents and Settings\User\Documents\datalog.csv', 'a')while 1: line = ser.readline() now = time.strftime("%d/%m/%Y %H:%M:%S", time.localtime()) a = "%s, %s, %s" % (now, line, "\n") print a logfile.write(a) logfile.flush() logfile.close()ser.close()
I'm trying to figure out IF its possible to create and write a .csv file directly to my computers hard drive rather than the SD card?
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16