import time,serial,math
print '*** Meritev pulzarja ***'
rxime='/dev/ttyUSB0'
rx=serial.Serial(rxime,115200,timeout=3.0)
rx.setRTS(False)	#sprosti /BOOTLOADER
rx.setDTR(False)	#sprosti /RESET
i=0
print time.ctime()


time.sleep(5)
rx.flushInput()
time.sleep(0.01)
m=rx.read(1)
string=m
while i<100: 
		
		m=rx.read(1)
		string=string +m
		i=i+1
		time.sleep(0.01)
		#m=rx.read(1)
		#string=string +m*/
print time.ctime()
rx.close()
f1=open('pulzar3.txt', 'w+')
f1.write(string)
f1.close()
