Home Creators Posts Import Register Favorites Logout

Content

Hi lovely Patreons!

You can download the example code I used in the "USB Input Devices" project from the following Google Drive link:

https://drive.google.com/drive/folders/1ztyPeSLOwPJ11VXa0YAP35p23aNc04mX?usp=sharing

Please download and extract the entire archive to somewhere on your local computer. In the "code" subfolder, you'll find several examples. The main example I demonstrated in the video can be found in the "BarcodeScanner" folder, but you'll also find the other examples that were included briefly in the introduction, which display a character typed on a keyboard, a "snake" game played on a joypad, and a magstripe reader that reads data from a card.

With regards to the hardware I used:

USB Host Shield for Arduino UNO/Mega https://www.aliexpress.com/item/1005006321735401.html

Barcode Scanner https://www.ebay.co.uk/itm/285421054307

Magstripe Reader https://www.ebay.co.uk/itm/274876279327

The joypad/keyboard/mouse were just old ones I had lying around ;)

If you would like to use a 3.3V device like an ESP32 / ESP8266, you can use the following module instead https://www.aliexpress.com/item/1005004579619520.html  - note that, by default, this will use both 3.3V logic to the controller and also supply 3.3V power to the USB HID peripheral. In some cases, the device might need to receive 5V power instead, which requires cutting a trace on the board, and injecting a separate 5V power supply to the VBUS pin as described at https://circuitsathome.com/usb-host-shield-hardware-manual/ 

Comments

No comments found for this post.