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

    Cannot use Blynk with M5StickC +

    General
    2
    4
    3.2k
    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.
    • C
      candide
      last edited by candide

      Hello,

      I'm certainly missing something super obvious here. So i need your help
      I tried the sample code provided in the doc but it is not easy for me.
      Also if you can point me to more tutorials on blynk feel free to do it.

      Environment

      • M5StickC+
      • FW 1.9.8
      • NCIR HAT

      Issue

      When using Blynk nothing happens in Run mode. M5Stick screen remains stalled, with Labels with its default value. Nothing also on the Blynk app side.

      M5Stick works fine, when i remove all the blynk related stuff it works great. See other post for the code

      What am I missing here?

      0_1656062406582_1b247bee-f08a-4f07-8c33-43ae63b3e00e-image.png

      from m5stack import *
      from m5ui import *
      from uiflow import *
      from IoTcloud import blynk
      import hat
      import hat
      
      setScreenColor(0x000000)
      
      hat_ncir_0 = hat.get(hat.NCIR)
      
      pool_temp_pin = None
      pool_temp = None
      
      label1 = M5TextBox(93, 58, "Text", lcd.FONT_DejaVu56, 0xFFFFFF, rotate=90)
      title0 = M5Title(title="Title", x=30, fgcolor=0xFFFFFF, bgcolor=0x0000FF)
      
      def blynk_read_v1(v_pin):
        global pool_temp_pin, pool_temp
        pool_temp_pin = v_pin
        pool_temp = hat_ncir_0.temperature
        title0.setTitle('Pool Temp')
        label1.setText(str(pool_temp))
        blynk1.virtual_write(pool_temp, pool_temp)
      
        pass
      
      blynk1 = blynk.Blynk(token='1234567890')
      blynk1.handle_event('read v1', blynk_read_v1)
      while True:
        blynk1.run()
        wait_ms(2)
      
      ajb2k3A 1 Reply Last reply Reply Quote 0
      • ajb2k3A
        ajb2k3 @candide
        last edited by

        @candide are you trying to connect to the Blynk service with the white screen or the Blynk service with the black screen?
        The white screen is Blynk V2 and not currently comparable with the M5Stack due to a change in security system (Blynk V2 uses the digital twin system that is no implemented yet in UIFlow). If it’s the black system V1 then there can be a delay and you need to regenerate the access key.

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        1 Reply Last reply Reply Quote 0
        • C
          candide
          last edited by

          Thanks! I use v2 (white) so i don't have a solution since v1(black) does not allow new login creation and it is not compatible with v2 login

          What else can i use to achieve the same goal. The goal beeing to be able to receive the temp data easily on a mobile phone or any remote device. Thanks

          ajb2k3A 1 Reply Last reply Reply Quote 0
          • ajb2k3A
            ajb2k3 @candide
            last edited by

            @candide There are many, many more services like M5Stack EZdata, Adafruit Io, Azure, AWS. I just published a book on amazon about these but can't find my manuscript!

            UIFlow, so easy an adult can learn it!
            If I don't know it, be patient!
            I've ether not learned it or am too drunk to remember it!
            Author of the WIP UIFlow Handbook!
            M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post