this looks like I should be able to do USB host mode on Nano iot SAMD21.
(assuming I have setup the hardware correctly)
OTG cable looks right host on one end, device on other
need to send AT commands (20 chars) and receive responses... typically 3 chars, some 20chars.
anyone tried?
how does this compare to the board libs for Nano iot (1.8.x installed)
The Boards Manager installation of the "Arduino SAMD (32-bits ARM Cortex-M0+) Boards" platform for the Nano 33 IoT comes with a bundled "USBHost" library.
You will find some example sketches that demonstrate its usage under the File > Examples > USBHost menu in the Arduino IDE after you have selected Tools > Board > Arduino SAMD (32-bits ARM Cortex-M0+) Boards > Arduino Nano 33 IoT from the Arduino IDE menus.
That is all the documentation available for that specific library. However, the SAMD "USBHost" library is pretty much the same as the older library of that name for the Arduino Due board, and that older library does have more formal documentation here: https://www.arduino.cc/en/Reference/USBHost
It is likely that information will mostly apply to the SAMD "USBHost" library as well.
That is an enhancement made to the official SAMD "USBHost" library back in 2016. This is the library I mentioned in my previous reply. You can try out the examples to see how it works.
The Boards Manager installation of the "Arduino SAMD (32-bits ARM Cortex-M0+) Boards " platform for the Nano 33 IoT comes with a bundled "USBHost" library.
yes, but it doesn't include all the source as in the github repo.
We are here to help you get unlost, but first we need to understand what the problem is.
All I know now is that you are missing some source code. But there must be some nuance becase every single bit of the source code from that repository is installed on your computer when you use the Arduino IDE Boards Manager to install the "Arduino SAMD (32-bits ARM Cortex-M0+) Boards " platform for the Nano 33 IoT.
But the USB stack code in the core is very interesting stuff.
Nice! It seems like a pretty interesting thing to investigate.
I actually haven't tried this. The closest I got was the old trick of using the PS/2 compatibility mode most keyboards and mice have to interface them with any Arduino board without needing to get fancy with USB host capabilities. But of course that is very limiting.
excuse me,I meet the puzzle of yours ,ee, and i also want MKR WiFi 1010 to be a USB Host . I don't know how to bridge VUSB and open OTG ? Can you help me?
MKR 1010 can work with a battery, I have tried tried it with a battery and USB device could woke which was connected MKR 1010. But i could'n get message from USB device , I surmise MKR 1010 needs OTG driver.
thanks, I also finds this library ,but I don'n know how to use it . If MKR 1010 sends some command to Lidar of Hukoyu, and LIdar replys data to MKR 1010 ,I Just need "include <Usb.h> " and "USBHost usb"? Sorry , I first use Arduino last week I find tutorial of the Portenta H7 which woks as an USB host, the tutorial says USB OTG requires code.