improved uart example

doublebuf
Ondřej Hruška 7 years ago
parent 0789992063
commit b7af0a1c05
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 6
      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)

Loading…
Cancel
Save