Pico as usb host #224
-
Hello, I was wondering, how could one approach using usb host functionality on pico using this? Would that be even possible? What I tried so far was to use the example from tinyusb library that I already managed to run from Naturally, the first thing that comes to mind is to go over those places and comment them out/ delete the files, but... Now, if I understand correctly, the board functioning as usb device is necessary to use e.g. Serial functionality, but if one resigned oneself to not using it, is this a feasible option to just remove all of those usages, or will it cause everything to come crashing down and prevent me from uploading / building the project? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
It may be possible to do this, but you'll need to not use arduino-pico/cores/rp2040/main.cpp Lines 70 to 73 in 35c974d You'd then have to handle all the USB setup yourself, as there is no host mode code in the core yet. Unless you need the Arduino libraries, though, I'd probably suggest just using the SDK for host mode apps at this point. Of course, a PR adding support for USB host mode would definitely be welcome! :) |
Beta Was this translation helpful? Give feedback.
-
I was running into the same problem with |
Beta Was this translation helpful? Give feedback.
It may be possible to do this, but you'll need to not use
Serial
as you stated and also add a defineDISABLE_USB_SERIAL
or hack outarduino-pico/cores/rp2040/main.cpp
Lines 70 to 73 in 35c974d
You'd then have to handle all the USB setup yourself, as there is no host mode code in the core yet.
Unless you need the Arduino libraries, though, I'd probably suggest just using the SDK for host mode apps at this point.
Of course, a PR adding support for USB host mode would definitely be welcome! :)