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 |
MouseMoveDemo for SSD1306
Demo of moving a circle using the mouse.
The circle moves when you move the mouse.
I used this as a reference.
Hardware requirements
-
ESP32S2/S3
These have USB-HOST functionality. -
USB mouse
2-button or 3-button usb mouse.
Button 3 is not used in this project.
USB wiring
ESP32-S2/S3 BOARD USB CONNECTOR
+--+
[ 5V ] --------> | || VCC
[GPIO 19] --------> | || D-
[GPIO 20] --------> | || D+
[ GND ] --------> | || GND
+--+
How to Use
The circle moves when you move the mouse.
Right click the mouse to go back.
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 (1166) usb_hid: hid_host_device_callback
I (1166) usb_hid: HID Device, protocol 'MOUSE' CONNECTED
Using USB-HUB
I tried it, but it doesn't work properly via USB-HUB.