UART handler error
-
Hello,
When I call uart irq like this:
uart.irq(trigger = UART.RX_ANY, handler = hand)
and hand function looks like this:
def hand():
returnI've got this error:
Uncaught exception in callback handler
TypeError:And another thing is that when I write: bytes = UART.read() I've got this error:
argument num/types mismatchWhat can cause those problems?
-
This post is deleted!
-
@michalt38 said in UART handler error:
I've got WiPy 1
I can not help more because i have only Wipy2.0.
Maybe someone else...
-
@livius I've got WiPy 1
-
@michalt38
Do you have Wipy1 or Wipy2.0?And I found UART.irq doc here: http://docs.micropython.org/en/latest/wipy/library/machine.UART.html#machine.UART.irq
This doc is for Wipy1.
For Wipy2.0 doc are here
https://docs.pycom.io/pycom_esp32/index.html
uart is here
https://docs.pycom.io/pycom_esp32/library/machine.UART.html
-
@livius Sorry, it was UART.read() and it is solved
And I found UART.irq doc here: http://docs.micropython.org/en/latest/wipy/library/machine.UART.html#machine.UART.irq
-
Where do you found uart.irq docs?
and what do you pass as argument of UART.write() ?
It can not be empty - and it must by bytes()