uart irq for Fipy
-
Hi all,
I need a receive callback event for uart. From the micropython site and also from a previous discussion from this forum, I found the following implementation
uart1.irq(uart1.RX_ANY, priority=1, handler=irq_uart1, wake=machine.IDLE)However, on my Fipy it shows this error,
AttributeError: 'UART' object has no attribute 'irq'This is the current firmware version
(sysname='FiPy', nodename='FiPy', release='1.18.2', version='v1.8.6-849-07a52e4 on 2019-02-08', machine='FiPy with ESP32', lorawan='1.0.2', sigfox='1.0.1')Is the uart.irq only available for wipy? How can I get this on fipy board? Does it require to upgrade the firmware?
-
Hello Sanjoy.
We dont expose the ability to receive a callback event on uart irq's. our implementation is a little different to the standard Micropython versions.
-
This post is deleted! -
Hi Paul,
Thanks for the reply.
Could you please suggest me how should I implement this? Any example available?
I need uart.irq for fipy, so that it does not need to perform polling to check if any rx data is available. -
@sanjoy You can use threading or uasyncio. Threading is easier to understand. It just uses more RAM, but that should be not problem with a FiPy.
-
@robert-hh Thanks a lot for the suggestion. Threading worked quite well for my application.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login