Skip to content

Touch Screen USB Keyboard with ESP32 S2 and Arduino

License

Notifications You must be signed in to change notification settings

beachmiles/usbkwa

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

USBKWA -- USB Keyboard Web App

USBKWA (USB Keyboard Web App) turns a large tablet or any device with a Web browser into a USB keyboard. Anyone having difficulties using a regular keyboard may find a touch keyboard easier to use.

System Block Diagram

Screen capture of keyboard in browser window

The keyboard web app displays a 17x6 grid in the browser window. The locations of touch or mouse events are sent via a web socket back to the ESP32 web server. The server translates locations to USB HID keycodes and sends them out the USB HID keyboard interface.

The ESP32 S2 Saola board is programmed using the Arduino IDE. No soldering is required. The browser communicates to the ESP32 using WiFi. The ESP32 communicates with the other computer using USB HID.

Hardware

On the Espressif Saola board, the USB micro connector is connected to a CP2102 USB Serial chip. The USB HID data is on pin 19 and 20. A separate USB connector or cable must be connected to pins 19, 20, GND, and 5V. Do not use both connectors at the same time. If there is no protection diode on the 5V pin, board may be damaged. Connect to the built-in USB micro connector to program the ESP32. Disconnect the cable then plug it into the other USB micro connector to test the USB feature.

ESP32 S2 Saola USB micro connector
GND GND
5V VBUS
19 (USB D-) D-
20 (USB D+) D+
not connected ID

In the following photo, the USB connector is a SparkFun micro USB breakout board connected to the ESP32 S2 Saola board using Dupont wires.

ESPS2 S2 with second USB connector

This should work on any ESP32 S2 board but has only been tested on the Espressif Saola board. Regular ESP32 boards do not have native USB hardware so will not work. The not yet released ESP32 S3 should also work.

Software

The following libraries can be installed using the IDE Library Manager.

The library manager installs WiFiManager 2.0.5-beta which includes support for Arduino-esp32 2.0.x and works on ESP32 S2 boards.

About

Touch Screen USB Keyboard with ESP32 S2 and Arduino

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 45.5%
  • C++ 44.4%
  • Shell 10.1%