Using WebUSB with Arduino and TinyUSB

Adafruit recently uploaded a handy guide on how to use Google’s WebUSB API with the TinyUSB stack and Arduino-based projects and how to…

Cabe Atwell
5 years ago

Adafruit recently uploaded a hand guide on how to use Google’s WebUSB API with the TinyUSB stack and Arduino-based projects and how to interact with them in Chrome. Googles WebUSB platform is a JavaScript programming interface that allows users to interact with USB devices via web pages. The TinyUSB library enables Arduino-based development boards to appear as USB devices, making it easy to connect them to the WebUSB standard.

“Adafruit has worked to ensure TinyUSB works with WebUSB. Together, they allow Adafruit and compatible microcontrollers to work with WebUSB browsers like Chrome with no drivers on the host computer / tablet / phone /Chromebook. Super simple and this works well in environments like schools.”

The guide lays out the necessary computer and mobile hardware that’s compatible with the project, which includes Chromebook and PCs that run Windows 10, OSX, and Linux, along with both Android and iPhone smartphones. Of course, all of those require a USB port (Apple devices with a Lightning port will need an adapter).

Adafruit tested several boards for compatibility with the platform, but most seem to be limited to those outfitted with Microchip’s SAM D21 and SAM D51 microcontrollers, as well as Nordic’s nRF52840 SoCs. For the guide, Adafruit chose the Circuit Playground Express, as it packs a host of hardware, including sensors, buttons, NeoPixel LEDs, and USB connectivity.

The rest of the guide provides instructions on installing the Arduino IDE, libraries, the TinyUSB stack, and interfacing with WebUSB. The write-up provides an in-depth walkthrough from start to finish, and even those who are new to Arduino boards and coding will be able to complete the project example.

Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles