pyserial

Pyserial Esta semana estuve jugando con python para interrogar mediante puerto serie dispositivos. La verdad es que resultó mucho más sencillo de lo que pensaba, algo de complicación a la hora de interpretar las constantes de ASCII para el group separator (GS). La interrogación es tan sencilla como hacer: import sys import serial try: ser = serial.Serial( port="/dev/ttyS0", baudrate=9600, bytesize=serial.EIGHTBITS, timeout=1, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, xonxoff=1, rtscts=0, ) except: print("Fallo al abrir el dispositivo") sys....

febrero 23, 2010 · 1 min · Pablo Iranzo Gómez
This blog is a participant in the Amazon Associate Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.