← index #17667PR #16356
Related · high · value 2.971
QUERY · ISSUE

Add USB Host

openby Vincent1-pythonopened 2025-07-13updated 2025-12-22
enhancement

Description

Add USB Host, after all, you can use it on esp32p4.

Code Size

None

Implementation

I hope the MicroPython maintainers or community will implement this feature

Code of Conduct

Yes, I agree

CANDIDATE · PULL REQUEST

esp32: Enable support for machine.USBDevice.

mergedby sebromeroopened 2024-12-04updated 2024-12-16
port-esp32

Summary

Recently support for machine.USBDevice was kindly added to the ESP32 port. However it's not currently enabled in the runtime yet by default.
After discussing it (#15564) I followed the recipe of @TomFahey and the suggestions of @andrewleech to enable the USB runtime support support the same way it's been added e.g. to the RP2 port.

Testing

I tested it on an Arduino Nano ESP32 board by emulating a HID keyboard. In fact I had a whole class of students testing it and it worked beautifully.

Trade-offs and Alternatives

I'm not sure how this affects the binary size but I would expect a minimal increase.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied