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

    Blynk not working on WiPy 3.0?

    Scheduled Pinned Locked Moved WiPy 2&3
    wipy3.0blynkerror
    4 Posts 2 Posters 1.1k 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.
    • H Offline
      hypercoffeedude
      last edited by

      Hello everyone! I am working on a small robot built up from an old Mint+ floor cleaner, and because I can't seem to figure out how to use websockets, I decided to use Blynk for now to test things out. Unfortunately the Blynk library appears broken, unless I'm doing something wrong. My test code is basic:

      import BlynkLib
      import time
      
      BLYNK_AUTH = 'MyAuthHere'
      blynk = BlynkLib.Blynk(BLYNK_AUTH)
      
      # to register virtual pins first define a handler
      def v3_write_handler(value):
          print('Current slider value: {}'.format(value))
      
      # attach virtual pin 3 to our handler
      blynk.add_virtual_pin(3, write=v3_write_handler)
      
      # start Blynk (this call should never return)
      blynk.run()
      

      I get the error:

      AttributeError: 'module' object has no attribute 'Blynk'.
      

      I'm not sure where to go from here. I haven't found anything useful on the forums or Google yet. I could've built a physical wifi controller with joysticks and buttons, using mqtt for communication, but I'm determined to figure this out. If nothing else, does anyone know of any good information on how to use websockets with the WiPy3?

      L 1 Reply Last reply Reply Quote 0
      • L Offline
        livius @hypercoffeedude
        last edited by

        @hypercoffeedude said in Blynk not working on WiPy 3.0?:

        BlynkLib

        which BlynkLib are you trying to use?

        think about people first, then computers

        1 Reply Last reply Reply Quote 0
        • H Offline
          hypercoffeedude
          last edited by hypercoffeedude

          @livius This is the one I am using:
          https://github.com/wipy/wipy/blob/master/lib/blynk/BlynkLib.py

          I am on WiPy firmware version '1.17.0.b1'.

          L 1 Reply Last reply Reply Quote 0
          • L Offline
            livius @hypercoffeedude
            last edited by livius

            @hypercoffeedude
            I do not use blynk
            but few things

            1. are you sure that you have not more BlynkLib on your flash?
            2. What is exact error message - all python messages point to line number with error. On your post you show only
              AttributeError: 'module' object has no attribute 'Blynk'.
            3. this lib is for Wipy1 (maybe there are some differences) - but error message is not releated to this

            think about people first, then computers

            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