文章列表
import struct
import serial
data = (0x7E, 0x01, 0x02, 0x03, 0x0D, 0x0A)
if __name__ == '__main__':
ser = serial.Serial()
ser.port = 9
ser.baudrate = 9600
ser.open()
print ser.portstr
print [struct.pack('B', c)[0] for c in data]
for c in data:
ser ...
- 2009-10-13 17:14
- 浏览 944
- 评论(0)