mirror of
https://github.com/nopnop2002/esp-idf-ssd1306.git
synced 2024-10-03 18:18:47 -04:00
.. | ||
main | ||
CMakeLists.txt | ||
README.md | ||
sdkconfig.defaults |
KeyboardDemo for SSD1306
Demo that displays input from the keyboard.
I used this as a reference.
Hardware requirements
USB wiring
To stabilize the power supply, I placed a 100uF electrolytic capacitor between 5V and GND.
ESP32-S2/S3 BOARD USB CONNECTOR
+--+
[ 5V ] +---------> | || VCC
[GPIO 19] |---------> | || D-
[GPIO 20] |---------> | || D+
[ GND ] |--------+> | || GND
| | +--+
+---||---+
100uF
USB hot socket
There are times when it works correctly and times when it doesn't.
It works more stably if you connect before starting the firmware.
When it works correctly, a log like this will be displayed.
I (796) usb_hid: hid_host_device_callback
I (796) usb_hid: HID Device, protocol 'KEYBOARD' CONNECTED
I (806) usb_hid: hid_host_device_callback
I (816) usb_hid: HID Device, protocol 'NONE' CONNECTED
Using USB-HUB
I tried it, but it doesn't work properly via USB-HUB.
Transfer failed
For some reason, the following error may occur in rare cases.
This error occurs inside the usb_host_hid component.
There is a possibility that this is a component bug, but the cause is unknown.
It may come back to life if you unplugging the keyboard and plugging it again.
E (12287696) hid-host: Transfer failed, status 1
E (12287696) usb_hid: HID Device, protocol 'MOUSE' TRANSFER_ERROR
E (15953516) USBH: Device 1 gone