After 12 years of using the full sized USB host Shield and Uno R3 I'm just now beginning to switch to the Pro mini 3.3v with the mini USB Host Shield. The full sized Host Shield clones no longer work at 5 volts. More about that later....
Has anyone used the mini combination? Can you offer any suggestions? Warnings? Pitfalls? Before I start soldering? I've read a few conflicting comments.
It seems that the mini host stacks perfectly with the pro mini with all pin functions matching in the same way as the full sized pair, tho some have said it can't work that way.
One curiosity I never looked at before: On both combinations, big and small, the host's INT pin is connected to the microcontroller's D9 pin which is PCINT1 rather than a hardware interrupt. But I can't find any assignment for PCINT1 in the USB Host Shield Library 2.0. Does anyone know how this works? The big host and Uno have always worked fine so somewhere the interrupt knows what it's doing. Some have said that the host's INT pin should be connected to a hardware interrupt but I can't find anything in the code that expects this either.
Any insights or suggestions are appreciated, Aaron
Thanks for your note. Yes it is, tho I hadn't seen this particular listing for the host before but it's the same as all the other clones. Curiously it claims "5V tolerant" tho it is not. Then down in the specs it says "5V (logic 3.3V; not 3.3V tolerant out of the box). This board has no logic level shifters. And yes, I've tested the ESP32-S3 as well as the Arduino Due. Both can work but the challenge for me is re-writing the code. The libraries for ESP and Due are different than for the UNO.
I'm a retired EE and in my professional career I wrote ASM and plain C in straight procedural code. These libraries are all C++ OOP code with methods embedded in classes in files some number of dependences deep. It's a challenge for me to dig thru all this. As I said I can't even find where the PCINT1 is assigned. I've never written OOP.
The benefit of the Pro Mini is that it's the same as the UNO but at 3.3v and the mini host is 3.3v. I can level shift serial output to 5v easily. And I can use the same code I wrote a dozen years ago. And I can still solder!
what are you looking for?
the ESP32-S3 USB comes with plenty of OTG Device and Host examples, e.g. keyboard, mouse, serial, WebHID, Composite device, etc etc
Thanks for your note. Yes I looked at the examples. I'm reading a PC keyboard, translating the keystrokes and sending them out on a serial line at 32KHz; very simple. I have not found a way to read modifier keys separately. Both the S3 and the Due only return modifier keys when combined with other keys. With the Uno and Usb Host shield I can easily read the modifier keys as ordinary PC keys, both keyUp and keyDown. AS I had said my knowledge of C++ and OOP is too limited. I've written plenty of ISR's in plain C in procedural code but layers of files with dependencies in C++ with callbacks, classes, methods gets a bit overwhelming. Am I getting too old? I only retired 25 years ago. As I said earlier, I still can't find where the PCINT1 assignment is. Grep can't either. Can you? Can you help? Thanks, Aaron
Mini Host + Pro Mini 3.3 V is the correct pair. Stack them. Keep SS on D10 and INT on D9 unless you cut the jumpers.
Grep finds no PCINT1 because the library does not use pin-change interrupts.
In UsbCore.h the chip is MAX3421e<P10, P9>. That sets SS = D10 and INT = D9.
In Init() the library sets D9 as an input. In Task() it polls INTR::IsSet() on that pin. It does not call attachInterrupt and it does not touch PCINT1.
Keep Usb.Task() in loop(). Call it often. That is what services the MAX3421E.
Pitfalls before you solder:
Use a real 3.3 V Pro Mini (8 MHz). Do not feed 5 V logic into the mini host.
Power VBUS for the keyboard from the host shield 5 V path as the manual shows.
Keep your old Uno sketch. The same USB Host Shield 2.0 HID keyboard examples work on the Pro Mini.
This is by far the best post I've ever read on the Arduino Forum.
And I appreciate it. It answers all the questions I asked and confirmed all the assumptions I made about shifting from full sized Uno to Pro Micro with USB Host Shields.
I can now make more of my project's units without delay while spending, perhaps, quite a bit more time understanding the inner workings of the library and its hidden (to me) interrupts, functions, callbacks, and methods so clearly explained in your post.
I did try AI. I got a number of incorrect answers and it ignored a some of my questions. That has been my experience in previous quires as well. Educated human intelligence seemed to work much better in this case as seen above.
Except that was AI response. I got an almost identical response from the LLM we use. I imagine your prompts are suboptimal based on your other posts. The person running the AI that you liked the response of is more skilled than you are at using it. You might want to use a paid subscription if you are not already and get the AI to help you learn better prompt techniques.
Interesting! I assumed that there were no AI bot members of the Arduino Forum. Looking at other posts by the same author it seemed to me to be from an EE with experience in the microprocessor field. So I assumed human, never thought otherwise after previous experiences with AI. However it's also possible that your AI simply copied the reply after it was posted on the forum, particularly if you used my query as yours to AI. Perhaps "theengeneerstore" can let us know. Being in the sciences, I am agnostic but skeptical of AI's current value, based on my experience as well as reviews and tests by other qualified sources. Perhaps not ready for prime time? Thanks for your thoughts.
No one said anything about the member being a bot, although it is entirely possible that it is. It's more likely that it is being operated by a human conducting an experiment.
Not possible based on the way I crafted my test.
You seem to have very little experience evaluating such technology.
That depends on how much you are willing to pay. The models available in a university/commercial setting are a lot more capable than the typical online tool. GPT 6.1 Sol is available to the general public for ~$20/mo and is very capable.