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

    using Timer on the wipy 3.0

    Scheduled Pinned Locked Moved Projects
    3 Posts 3 Posters 124 Views 3 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
      jubenjum
      last edited by

      Hi,

      I'am having difficulties with the Timer on the wipy 3.0, I'm trying to follow the tutorial on https://docs.micropython.org/en/latest/wipy/tutorial/timer.html, I can import the module but when I try to initilize the Timer as shown in the tutorial I get this message:

      >>> tim = Timer(1, mode=Timer.PERIODIC, width=32)
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
      AttributeError: type object 'Timer' has no attribute 'PERIODIC'
      

      has anyone know what am I doing wrong?.

      Thanks for your help

      J robert-hhR 2 Replies Last reply Reply Quote 0
      • J Offline
        jcaron @jubenjum
        last edited by

        @jubenjum The tutorial you are using is for the "main" line of MicroPython. Pycom has a separate branch which differs in quite a few places.

        See the docs here for the Pycom version. The mode is passed as a periodic argument in that one.

        1 Reply Last reply Reply Quote 0
        • robert-hhR Offline
          robert-hh @jubenjum
          last edited by

          This post is deleted!
          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