🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Blynk using UIFLow block

    Scheduled Pinned Locked Moved General
    2 Posts 2 Posters 3.9k Views 1 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.
    • B Offline
      beacon88
      last edited by beacon88

      Hi,

      I have tried to establish blynk code using UIFlow block.
      However, there is an error "nonetype object isn't callable"
      on the line "@blynk.handle_event('write v*')'.

      How can I solve this?

      from m5stack import *
      from m5ui import *
      from uiflow import *
      from ble import blynk
      
      setScreenColor(0x222222)
      
      
      
      
      label0 = M5TextBox(13, 40, "Text", lcd.FONT_Default,0xFFFFFF, rotate=0)
      label1 = M5TextBox(13, 69, "Text", lcd.FONT_Default,0xFFFFFF, rotate=0)
      title0 = M5Title(title="Title", x=3 , fgcolor=0xFFFFFF, bgcolor=0x0000FF)
      
      num0 = None
      message = None
      
      
      
      @blynk.handle_event('write v*')
      def blynk_write(*args):
        # global num0, message
        num0, message = args[0], args[1]
        if num0 == 15:
          label0.setText(str(message[0]))
          label1.setText(str(message[1]))
      
        pass
      
      
      
      blynk.init('RoboCar', '---', blynk.BLE)
      label0.setText(str(power.getBatteryLevel()))
      
      

      Image

      1 Reply Last reply Reply Quote 0
      • IAMLIUBOI Offline
        IAMLIUBO
        last edited by

        Hi @beacon88 ,
        Please use UiFlow online version.Offline have some bug...

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