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

    Help with USB communication between PC and Core2

    Lessons and Guides
    1
    1
    46
    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.
    • E
      eleonorafontana16
      last edited by

      Hello everyone,
      I’m facing a problem that I haven’t been able to solve.
      I have connected four servo motors to pins G19, G25, G26, and G27 of the Core2, and using UIFlow1 I can correctly control the servos’ movements.

      Now, I need to establish USB communication between my PC and the Core2. Essentially, I would like to run a Python script on my PC that sends an angle to the Core2 so it can command the motors to reach that desired value. I want to understand whether the USB cable connecting the Core2 to the PC is sufficient (I’ve asked on chat.m5stack.com and it should be possible according to AI response).

      I’ve tried many approaches, all unsuccessful. Here are the two main ones:

      Attempt 1: In UIFlow1 I used the Hardware -> UART blocks, defining both uart1 = machine.UART(1, tx=32, rx=33) and uart2 = machine.UART(2, tx=17, rx=16). In both cases, I cannot read anything (uart1.any() / uart2.any() return nothing).

      Attempt 2: I flashed the UIFlow2 firmware, but I cannot find blocks for serial communication.

      It seems I could also bypass UIFlow entirely and program everything in VS Code using the Python and Pymakr extensions, but I would like to know if this is the only way before going that way.

      Thanks a lot for your support!
      Eleonora

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