シリアル デバイスへのポートを開く必要がありますが、開いていない場合や例外がある場合は、ドアが開くまで継続的にドアを開こうとする必要があります。Python 2.7.3 しばらくすると、次のエラーが発生します。
「RuntimeError: Python オブジェクトの呼び出し中に最大再帰深度を超えました」
手伝って頂けますか?
私のコード:
def opendisplay():
try:
lcd = serial.Serial(
port='/dev/display',
baudrate=9600,
timeout=0,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS
)
except Exception, e:
print "Error! can't connect to display Lcd check USB-Serial \n" + str(e)
opendisplay()
return lcd
dsp=opendisplay()