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