# -*- encoding: utf-8 -*- # import sys import time import serial print "ok" # Parameter von Konsole entgegennehmen #if len(sys.argv) != 2: # print "you have to pass the name of a serial port" # sys.exit(1) #serial_port = sys.argv[1] serial_port = "COM13" arduino = serial.Serial( serial_port, 9600, serial.EIGHTBITS, serial.PARITY_NONE, serial.STOPBITS_ONE) time.sleep(2) # continous read line = arduino.readline() while len(str(line))!=0: line = arduino.readline().rstrip() print line # ###