Hi, I am planning a project around the Adafruit MacroPad RP2040 but I would like to use it without a computer. Instead, I would like to use the USB-C cable to connect it to another microcontroller (teensy, or raspberry pi/pico if needed).
I have some very basic questions at this stage:
- what would be the appropriate way to power this assembly? Can I provide power to the teensy (through the VIN pin) and let it power the macropad through the USB port? The teensy 4.1 says something about USB Host Hot Plugging https://www.pjrc.com/store/teensy41.html#power
- What would be the best way to exchange data between the two devices? Is serial communication the only protocol I can use with the USB-C connector?
Thank you!
Macropad communication with other microcontroller
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- marin_manuel
- Posts: 5
- Joined: Wed Nov 03, 2021 2:50 pm
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Macropad communication with other microcontroller
You'd have to write code to make one of the microcontrollers work as a USB host. That's far from easy, our boards aren't really designed for it, and we don't offer any support for it.marin_manuel wrote:- What would be the best way to exchange data between the two devices? Is serial communication the only protocol I can use with the USB-C connector?
The only boards I know that works as a USB host by default are the Teensy 3.6, 4.0, and 4.1:
https://www.adafruit.com/product/3266
https://www.adafruit.com/product/4323
https://www.adafruit.com/product/4622
You can find information about them on the PJRC website:
https://www.pjrc.com/teensy/
- marin_manuel
- Posts: 5
- Joined: Wed Nov 03, 2021 2:50 pm
Re: Macropad communication with other microcontroller
Thank you for the authoritative answer.
According to the JPRC website, the "Teensy 4.0 does not have circuitry to manage the power to USB devices (as Teensy 4.1 does)". I will see if I get something going with a Teensy 4.1.
According to the JPRC website, the "Teensy 4.0 does not have circuitry to manage the power to USB devices (as Teensy 4.1 does)". I will see if I get something going with a Teensy 4.1.
Please be positive and constructive with your questions and comments.