deg = 360.0 * position / total;
total = ((double)end_time) - start;
I do have an extra laptop I can leave plugged in however with a serial print. I'll take it with me and see what I can get from it.
Perhaps you could write a small program on your Laptop (using Python or Ruby, for example) that collects the Serial.print messages and saves them to a text file along with Laptop generated time-stamps. If you can leave the laptop running for a day or two you may get some useful data that would be too tedious to collect manually.You could then search through the text file with a text editor to find the interesting bits....R
#!/usr/bin/pythonimport time;import serial;localtime = time.asctime( time.localtime(time.time()) )ser = serial.Serial("COM1", 9600)while True: if(ser.isClosed()): break try: # This tries to open an existing file but creates a new file if necessary. logfile = open("c:\log.txt", "a") try: str = ser.readline() logfile.write(localtime) logfile.write(str) finally: logfile.close() except IOError: pass
localtime = time.asctime( time.localtime(time.time()) )
Ok I think this will do what I want. I'll give it a go later and get back to you guys. Thanks for your help so far!
#!/usr/bin/pythonimport timeimport serialser = serial.Serial(3, 9600)time.sleep(2)while True: localtime = time.asctime( time.localtime(time.time()) ) logfile = open("D:\log.txt", "a") ard = str(ser.read(100)) logfile.write(localtime) logfile.write(ard) logfile.write("\n") line = ser.read(100) print(line)