Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Uart Interrupt Wipy 2.0

    Scheduled Pinned Locked Moved Discussion
    wipy2.0uartinterrupt
    6 Posts 3 Posters 2.4k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jakarman12
      last edited by

      I need to use the uart interrupt but I found the example for wipy 1.0 but for wipy 2.0 I can't make it work.

      Is there any example to use uart irq for WiPy 2.0?

      Regards

      1 Reply Last reply Reply Quote 0
      • B Offline
        bucknall
        last edited by

        Hi @jakarman12

        Could you please give an example (in MicroPython) of what you are trying to do?

        Thanks!

        Developer Evangelist - Pycom

        J 1 Reply Last reply Reply Quote 0
        • J Offline
          jakarman12 @bucknall
          last edited by livius

          Hi @bucknall:

          Of course, here it is.

          from machine import UART
          import pycom
          import time
          
          uart = UART(1, baudrate=9600)
          pycom.heartbeat(False)
          UART.irq(UART.RX_ANY, priority=1, handler=irq_uart1, wake=machine.IDLE)
          
          def  irq_uart1 ():
              print ("Uart Interrupt")
              pass
          
          uart.write('hello')
          
          while  1:
              pass
          
          
          This is the error: 
          **Traceback (most recent call last):                                                                                      
            File "main.py", line 7, in <module>                                                                                   
          AttributeError: type object 'UART' has no attribute 'irq'**
          
          B 1 Reply Last reply Reply Quote 0
          • B Offline
            bucknall @jakarman12
            last edited by

            @jakarman12 Ah ok!

            We currently do not support interrupts in the ESP32 MicroPython branch for the UART bus. I know this is on the roadmap of things to do, so I'll check with Daniel to see where we are with this!

            Thanks for your patience!

            Developer Evangelist - Pycom

            J 1 Reply Last reply Reply Quote 0
            • J Offline
              jakarman12 @bucknall
              last edited by

              Thanks @bucknall

              Do you have an approximate date for a new update?

              Regards

              1 Reply Last reply Reply Quote 0
              • M Offline
                mdnncl01
                last edited by

                @bucknall said in Uart Interrupt Wipy 2.0:

                We currently do not support interrupts in the ESP32 MicroPython branch for the UART bus. I know this is on the roadmap of things to do, so I'll check with Daniel to see where we are with this!
                Thanks for your patience!

                Hi Guys,
                there are updates that concern UART interrupt?
                This aspect is very important!
                Thanks

                1 Reply Last reply Reply Quote 0

                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
                • 1 / 1
                • First post
                  Last post

                Pycom on Twitter

                Pycom