From b7af0a1c0550d23225a749949a825ab915959bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Mon, 15 Jan 2018 15:03:52 +0100 Subject: [PATCH] improved uart example --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 6c98919..5de6f7c 100644 --- a/main.py +++ b/main.py @@ -88,7 +88,7 @@ if False: spi.multicast(1, [0xDE, 0xAD, 0xBE, 0xEF]) print(spi.query(0, [0xDE, 0xAD, 0xBE, 0xEF], rlen=4, rskip=1))# -if True: +if False: usart = gex.USART(client, 'serial') usart.listen(lambda x: print("RX >%s<" % x)) for i in range(0,100): @@ -98,9 +98,9 @@ if True: # time.sleep(.001) -if False: +if True: usart = gex.USART(client, 'serial') - usart.listen(lambda x: print("RX >%s<" % x)) + usart.listen(lambda x: print(x, end='',flush=True)) while True: client.poll() time.sleep(.01)