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

    USB communication

    Lessons and Guides
    2
    4
    6.1k
    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
      brvus76
      last edited by

      Dear All,
      I like UIFlow but I am not an expert of Python. I have always programmed through the standard Arduino IDE.
      I need to interface my M5Stack Core 2 with MegunoLink. This can be easily done if I use the standard IDE, but I am not able to do it with UIFlow.
      Basically I need to send to my PC through the USB a set of strings such as: {XYPLOT|DATA|Name|x|y}
      Could you help me?
      Thank you very much
      Bruno

      1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by

        Hello @brvus76

        have you tried the print block? You can find it under Text.

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        B 1 Reply Last reply Reply Quote 0
        • B
          brvus76 @felmue
          last edited by brvus76

          Dear felmue,
          At first thank you very much for your answer. I apreciate this.
          I tried. It works (!) but I have some problems. First of all, the data transmission is really slow. I tried to modify the row:
          print((str(((str(((str(((str('{XYPLOT|DATA|Analog Measurements|') + str(tt)))) + str('|')))) + str((adc0.read()))))) + str('}')))
          with
          print("{XYPLOT|DATA|Analog Measurements|}, tt, "|", adc0.read(), "}")
          but without success.
          Another problem is that when I open the USB communication from my software on the PC the M5 has a reset...
          Could you help me?
          Thank you!

          1 Reply Last reply Reply Quote 0
          • felmueF
            felmue
            last edited by

            Hello @brvus76

            I don't really know why the communication might be slow. I can only guess that UIFlow firmware maybe has some safeguards in place to prevent serial from flooding the line.

            I guess that your software on the PC manipulates the control lines (CTS, etc.) on the serial port in a way which triggers the auto download / reset mechanism in M5Core2. Unless there is some setting in your software to configure that behavior I don't think there is much you can do.

            Thanks
            Felix

            GPIO translation table M5Stack / M5Core2
            Information about various M5Stack products.
            Code examples

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