Created
May 17, 2013 14:02
-
-
Save nipunbatra/5599217 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#First on Linux shell figure if the USB-serial convertor has been detected. | |
# Type dmesg|grep tty and you should probably see the convertor and the tty USB port it is allocated. I shall assume you got #/dev/ttyUSB0 | |
import serial,time | |
serial_port=serial.Serial('/dev/ttyUSB0') | |
file_pointer=open('data.csv','wb') | |
while True: | |
a=s.readline() | |
f.write(str(time.time.now())+","+a) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment