How to use USB HID Devices as Arduino Inputs - Keyboards, Mice, Magstripe/Barcode readers, and more! @PlayfulTechnology
How to use USB HID Devices as Arduino Inputs - Keyboards, Mice, Magstripe/Barcode readers, and more!  @PlayfulTechnology
Uploaded July 2024 | Updated November 2026, 2 hours ago
In this video, I'll describe how to use an Arduino (or ESP8266 / ESP32 / other microprocessor) as a USB Host, allowing you to use any USB HID device such as a keyboard, mouse, trackball, joystick, gamepad, barcode scanner, or magstripe reader as an input.
This provides many opportunities for novel input mechanisms beyond the typical switches and pushputtons associated with Arduino projects, and I'll demonstrate one such example - using a barcode scanner as a "decoder" that displays messages encoded in QR codes or barcodes found in an escape room :)

To customise this project for other devices, you need to define the appropriate logic in the report parser function that processes input from the device, based on the USB HID standard published here:
usb.org/sites/default/files/hut1_21.pdf

Timings
00:00:00 - 00:00:38 Introduction and Demonstration
00:00:39 - 00:02:10 USB Host Shield
00:02:11 - 00:03:35 Barcode scanner
00:03:36 - 00:08:03 Data and Power Interface
00:08:04 - 00:28:52 Arduino Code
00:28:53 - 00:31:46 Wrapup

To download the resources used in this project (as well as all the other escape room tutorials in this channel), please check out my patreon at patreon.com/playfultech
How to use USB HID Devices as Arduino Inputs - Keyboards, Mice, Magstripe/Barcode readers, and more!Escape Room Security Terminal Puzzle TutorialBuild a DMX controlled clock for under $25Arduino LED Strobe LightESP32 Wall Smash Game with Responsive I2S AudioArduino-Controlled Rotary Telephone (DIY Escape Room Prop Tutorial)Creating a Biometric Hand Scanner Real-Life Escape Room Game PuzzleMake your own wedding audio guestbook - a step-by-step guide!Build Your Own Knife Throwing Escape Room Carnival GameSplit Audio Escape Room Puzzle TutorialWeight for It! Escape Room Tech PuzzleNode-REDscape : 100% Free, Open-Source Escape Room Control Software
Playful Technology |

How to use USB HID Devices as Arduino Inputs - Keyboards, Mice, Magstripe/Barcode readers, and more!

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER