This is an all-in-one implementation of the WiFi USB HID Control project for ESP32-S3 boards with a built-in 0.96" ST7735 IPS LCD display. This single board combines all features that previously required two separate boards (Pro Micro + NodeMCU).
- Board: ESP32-S3 Dongle / T-Dongle-S3
- Chip: ESP32-S3R8 (with 8MB PSRAM)
- Display: 0.96" IPS LCD with ST7735 controller
- Resolution: 80x160 pixels (portrait) or 160x80 (landscape)
- Interface: SPI (for display)
- USB: Native USB OTG with HID support
- LILYGO T-Dongle-S3 (supports microSD card for script storage)
- ESP32-S3 Development Board with ST7735 LCD
- Other ESP32-S3 boards with 0.96" ST7735 display (may require pin adjustments)
The LILYGO T-Dongle-S3 includes a microSD card slot. This project supports loading scripts directly from the SD card.
If an SD card is present, the device will prioritize files on the SD card over the internal LittleFS storage.
You can simply copy your .txt scripts to the root of the SD card.
Download and install the latest Arduino IDE from arduino.cc.
- Open Arduino IDE
- Go to File > Preferences
- Add to Additional Board Manager URLs:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - Go to Tools > Board > Boards Manager
- Search for "esp32" and install ESP32 by Espressif Systems (version 2.0.14 or newer)
Install these libraries via Sketch > Include Library > Manage Libraries:
- Adafruit GFX Library (by Adafruit)
- Adafruit ST7735 and ST7789 Library (by Adafruit) - Used by some sub-tests
For the best compatibility with the T-Dongle-S3, it is recommended to use the libraries provided by LilyGO:
- Download the libraries from the LilyGO T-Dongle-S3 Repository (check the
libfolder). - Copy these libraries to your Arduino sketchbook
librariesfolder (e.g.,Documents/Arduino/libraries/).
If you use the standard TFT_eSPI library, you must configure the User_Setup.h file in the library folder:
- Locate
TFT_eSPI/User_Setup.hin your Arduino libraries folder. - Replace its content with the configuration provided in this project's
User_Setup.h.
- WiFi
- WebServer
- Preferences
- LittleFS
- USB (for HID)
-
Select Board:
- Go to Tools > Board > esp32
- Select ESP32S3 Dev Module
-
Configure USB Settings (CRITICAL FOR HID):
- USB CDC On Boot: Enabled
⚠️ REQUIRED - Upload Mode: UART0 / Hardware CDC
- USB Mode (if visible): Hardware CDC and JTAG
- USB CDC On Boot: Enabled
-
Other Settings:
- PSRAM: OPI PSRAM (your board has 8MB)
- Flash Size: 4MB or 8MB (match your board)
- Partition Scheme: Default 4MB with spiffs
- CPU Frequency: 240MHz
-
Select the correct Port
IMPORTANT: The default pin configuration in config.h may need adjustment for your specific board.
Open config.h and verify/adjust these pins based on your board's documentation.
- Upload the sketch: Sketch > Upload
- Upload web files to LittleFS (see detailed instructions below)
The web interface files (HTML, CSS, JS) and configuration files must be available for the device to function. You have two options:
If you are using a LILYGO T-Dongle-S3 with a microSD card, you can simply copy the contents of the data directory from this project to the root of your SD card. The device will automatically detect the SD card and serve the files from there, prioritizing it over internal storage.
If you don't use an SD card, the files must be uploaded to the ESP32-S3's internal LittleFS filesystem.
For detailed, step-by-step instructions on how to install the LittleFS upload plugin and upload your data, please refer to the LittleFS Setup Guide in the main project directory.
Important: Once the sketch is running, the ESP32-S3 presents itself as a USB HID device (keyboard/mouse) instead of a serial port. To upload new code, you must enter bootloader mode.
- Hold the BOOT button
- Press and release the RESET button (while still holding BOOT)
- Release the BOOT button
- The device should now appear as a serial port in Arduino IDE
- Unplug the device from USB
- Hold the BOOT button
- Plug the device back in (while holding BOOT)
- Release the BOOT button after 1-2 seconds
- The device should now appear as a serial port
Press the RESET button (or unplug/replug) to exit bootloader mode and run your sketch.
This occurs when another process is using the serial port.
Solutions:
- Close the Serial Monitor in Arduino IDE
- Close other serial applications (terminal apps, other IDEs, etc.)
- Find and kill the blocking process:
lsof /dev/cu.usbmodem* kill -9 <PID>
- If still busy, restart:
- Unplug the device
- Close Arduino IDE completely
- Reopen Arduino IDE
- Enter bootloader mode and plug in
- Upload immediately
All project settings are located in the config.h file. You can adjust the following parameters there:
- Display Pins: Verify and adjust the
TFT_*pin definitions to match your specific hardware. - Display Rotation: Change
DISPLAY_ROTATIONif the screen orientation is incorrect. - WiFi Credentials: Default AP SSID and password.
- Web Authentication: Default login credentials for the web interface.
- SD Card Pins: Configuration for the microSD card slot (pre-configured for T-Dongle-S3).
Always check config.h before compiling to ensure the settings match your hardware.
- The device is likely in HID mode. Enter bootloader mode (see "Re-uploading Sketches" above)
- On T-Dongle-S3, the BOOT button is typically on the side or bottom of the board
- Blank/garbled: Check pins in
config.h, try differentinitR()method indisplay_manager.cpp - Wrong orientation: Adjust
DISPLAY_ROTATIONinconfig.h - No backlight: Verify
TFT_BLpin
- Enable "USB CDC On Boot" in Tools menu (most common issue)
- Reconnect USB cable after upload
- Check Serial Monitor for "USB HID initialized successfully"
See full README for complete troubleshooting guide.
- Device creates AP:
USB-HID-Setup(password:HID_M4ster) - Connect and go to
http://192.168.4.1 - Login:
admin/WiFi_HID!826 - Configure your WiFi or use directly
- Once connected to WiFi, the device also advertises itself via mDNS as
wifi-hid.local(if your OS/network supports mDNS resolution)
For detailed documentation, troubleshooting, and support, see the main project repository.

