import serial
import time, sys, math
#s = serial.Serial(port=’COM6’, baudrate=9600)
s = serial.Serial(port=’/dev/ttyACM1’, baudrate=9600)
print s
#s.write(’text’)
c=2000
print c
s.write("one")
while c>0:
res= s.read()
if (c % 20 == 0):
s.write("one")
if (c % 30 == 0):
s.write("offe")
print c
if res:
sys.stdout.write( res )
#res = ’’
sys.stdout.flush()
time.sleep ( 10.0 / 1000.0)
c=(c-1)
print c