0

I have a question on the interaction between Pi Pico, CircuitPython, and USB. I need a way to send a data stream from the Pico to another computer where it will be received on a USB port (it's the only possible input port). Do I assume correctly that I cannot use the Pico's USB port for that, because it is already used by CircuitPython for its file system and/or REPL? Does that mean that in order to develop with CircuitPython, I would have to send the data on UART instead and use a TTL-to-USB converter?

2 Answers 2

1

You can do it via USB HID, re. the Pico works as a Keyboard, sending data to a connected computer.

2
  • Thanks. I see there are examples/ tutorials that use CircuitPython to define mouse or keyboard, so I guess it must be possible to do both at the same time. Alas, it is probably more work to define custom HID device with more sensor values than just mouse X/ Y. Definitely looking into it, perhaps it must be done in lower levels than CircuitPython.
    – 0__
    Commented Jan 7, 2022 at 14:28
  • This seems like a starting point to implement something: learn.adafruit.com/custom-hid-devices-in-circuitpython - so indeed, one has to add the custom device to the boot process, and thus they can coexist with the CircuitPython environment.
    – 0__
    Commented Jan 7, 2022 at 15:32
0

You can also communicate with host via USB serial device - a better choice for sensor data perhaps; this works in in C from pico so should be possible with circuit python

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.