<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/an-esp32-s3-can-pretend-to-be-a-normal-usb-device-and-it-s-one-of-the-most-useful-tricks-it-can-p-usz4svjxh" -->

---
title: An ESP32-S3 can pretend to be a &quot;normal&quot; USB device, and...
description: The ESP32-S3 microcontroller has a native USB OTG port that lets it emulate standard USB accessories like keyboards, separate from its UART port used for...
canonical: https://daily.dev/posts/an-esp32-s3-can-pretend-to-be-a-normal-usb-device-and-it-s-one-of-the-most-useful-tricks-it-can-p-usz4svjxh
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: An ESP32-S3 can pretend to be a &quot;normal&quot; USB device, and it&#x27;s one of the most useful tricks it can pull | daily.dev
og:description: The ESP32-S3 microcontroller has a native USB OTG port that lets it emulate standard USB accessories like keyboards, separate from its UART port used for...
og:url: https://daily.dev/posts/an-esp32-s3-can-pretend-to-be-a-normal-usb-device-and-it-s-one-of-the-most-useful-tricks-it-can-p-usz4svjxh
og:image: https://api.daily.dev/og/posts/uSZ4SvJxH.png
og:image:alt: An ESP32-S3 can pretend to be a &quot;normal&quot; USB device, and it&#x27;s one of the most useful tricks it can pull
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# An ESP32-S3 can pretend to be a "normal" USB device, and it's one of the most useful tricks it can pull

**[XDA Developers](https://daily.dev/sources/xda-developers)** · 3 min read · 0 upvotes · 0 comments

## Summary

The ESP32-S3 microcontroller has a native USB OTG port that lets it emulate standard USB accessories like keyboards, separate from its UART port used for flashing firmware. A walkthrough shows wiring a KY-023 joystick module to the ESP32-S3 and using the Arduino IDE with the USBHIDKeyboard library to send a keyboard shortcut (Windows key + E) that opens File Explorer when the joystick button is pressed. The approach can scale to multiple buttons or a touchscreen for a custom macro pad.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.xda-developers.com/an-esp32-s3-can-pretend-to-be-a-normal-usb-device-and-its-one-of-the-most-useful-tricks-it-can-pull>

## Questions this post answers

### How can I make an ESP32-S3 act as a USB keyboard?

An ESP32-S3 can emulate a USB HID keyboard using its native USB OTG port and the Arduino USBHIDKeyboard library. After including USB.h and USBHIDKeyboard.h, calling Keyboard.begin() and USB.begin() in setup, you can send key presses like KEY_LEFT_GUI plus 'e' to trigger shortcuts such as opening File Explorer, once the firmware is flashed and the cable is moved from the UART port to the native USB port.

_daily.dev surfaces more embedded USB HID projects for makers building custom input devices._

### What is the difference between the UART port and the native USB port on an ESP32-S3?

The UART port is used for serial communication, typically to flash firmware onto the board from a PC, while the separate native USB OTG port allows the ESP32-S3 to emulate standard USB accessories like a keyboard or mouse. Firmware is uploaded via the UART port, then the cable is switched to the native USB port for the device to function as the emulated accessory.

_developers wiring up microcontroller peripherals can track similar hardware tricks on daily.dev._

## Similar posts on daily.dev

- [A Keyboard For Anything, Without A Keyboard](https://daily.dev/posts/a-keyboard-for-anything-without-a-keyboard-2pzydjh45) · Hackaday · 0 upvotes · 0 comments
- [Wired To Wireless: ESP32 Gives Your USB Keyboard Bluetooth](https://daily.dev/posts/wired-to-wireless-esp32-gives-your-usb-keyboard-bluetooth-vdxjy3w8s) · Hackaday · 0 upvotes · 0 comments
- [Someone made an ESP32 controller where the game lives on the pad itself](https://daily.dev/posts/someone-made-an-esp32-controller-where-the-game-lives-on-the-pad-itself-pe4bwt6ri) · XDA Developers · 0 upvotes · 0 comments
- [An ESP32-C5 USB dongle with microSD card slot, optional 0.96-inch OLED](https://daily.dev/posts/an-esp32-c5-usb-dongle-with-microsd-card-slot-optional-0-96-inch-oled-bpovxk7aw) · CNX Software · 0 upvotes · 0 comments
- [You, too, can make this ESP32 handheld console that can play retro games](https://daily.dev/posts/you-too-can-make-this-esp32-handheld-console-that-can-play-retro-games-qky4fonpb) · XDA Developers · 0 upvotes · 0 comments

---

Tags: [#hardware](https://daily.dev/tags/hardware), [#iot](https://daily.dev/tags/iot), [#embedded](https://daily.dev/tags/embedded)

[View this post on daily.dev](https://daily.dev/posts/an-esp32-s3-can-pretend-to-be-a-normal-usb-device-and-it-s-one-of-the-most-useful-tricks-it-can-p-usz4svjxh)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"An ESP32-S3 can pretend to be a \"normal\" USB device, and it's one of the most useful tricks it can pull","url":"https://daily.dev/posts/an-esp32-s3-can-pretend-to-be-a-normal-usb-device-and-it-s-one-of-the-most-useful-tricks-it-can-p-usz4svjxh","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/an-esp32-s3-can-pretend-to-be-a-normal-usb-device-and-it-s-one-of-the-most-useful-tricks-it-can-p-usz4svjxh"},"datePublished":"2026-10-02T15:04:59.896Z","dateModified":"2026-10-02T15:14:04.224Z","description":"The ESP32-S3 microcontroller has a native USB OTG port that lets it emulate standard USB accessories like keyboards, separate from its UART port used for...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a1dd4f21bbc329c4c9e6851115979115?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a1dd4f21bbc329c4c9e6851115979115?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"XDA Developers","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"XDA Developers","logo":"https://media.daily.dev/image/upload/s--kCg6yyAP--/f_auto,q_auto/v1774964407/logos/xda-developers?_a=BAMAMiWQ0","url":"https://daily.dev/sources/xda-developers"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/an-esp32-s3-can-pretend-to-be-a-normal-usb-device-and-it-s-one-of-the-most-useful-tricks-it-can-p-usz4svjxh","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"hardware,iot,embedded","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"XDA Developers","item":"https://daily.dev/sources/xda-developers"},{"@type":"ListItem","position":3,"name":"An ESP32-S3 can pretend to be a \"normal\" USB device, and it's one of the most useful tricks it can pull"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/an-esp32-s3-can-pretend-to-be-a-normal-usb-device-and-it-s-one-of-the-most-useful-tricks-it-can-p-usz4svjxh#faq","mainEntity":[{"@type":"Question","name":"How can I make an ESP32-S3 act as a USB keyboard?","acceptedAnswer":{"@type":"Answer","text":"An ESP32-S3 can emulate a USB HID keyboard using its native USB OTG port and the Arduino USBHIDKeyboard library. After including USB.h and USBHIDKeyboard.h, calling Keyboard.begin() and USB.begin() in setup, you can send key presses like KEY_LEFT_GUI plus 'e' to trigger shortcuts such as opening File Explorer, once the firmware is flashed and the cable is moved from the UART port to the native USB port. daily.dev surfaces more embedded USB HID projects for makers building custom input devices."}},{"@type":"Question","name":"What is the difference between the UART port and the native USB port on an ESP32-S3?","acceptedAnswer":{"@type":"Answer","text":"The UART port is used for serial communication, typically to flash firmware onto the board from a PC, while the separate native USB OTG port allows the ESP32-S3 to emulate standard USB accessories like a keyboard or mouse. Firmware is uploaded via the UART port, then the cable is switched to the native USB port for the device to function as the emulated accessory. developers wiring up microcontroller peripherals can track similar hardware tricks on daily.dev."}}]}
```

