# Arduino USB HID Controller

**URL:** <https://discourse.zynthian.org/t/arduino-usb-hid-controller/4814>\
**Category:** Hardware\
**Created:** [October 17, 2020, 9:35pm UTC](https://discourse.zynthian.org/t/arduino-usb-hid-controller/4814 "2020-10-17T21:35:15Z")\
**Posts on this page:** 15\
**Page:** 5

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [March 13, 2021, 6:19pm UTC](https://discourse.zynthian.org/t/arduino-usb-hid-controller/4814/82 "2021-03-13T18:19:09Z")

</div>

I was a good exercise and your code is very clear once I put the effort in. Not sure how best to generalise what I have adapted from your code base. [GitHub - wyleu/zynthian\_controller\_external\_usb](https://github.com/wyleu/zynthian_controller_external_usb)

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [March 13, 2021, 6:20pm UTC](https://discourse.zynthian.org/t/arduino-usb-hid-controller/4814/83 "2021-03-13T18:20:54Z")

</div>

How complex is contriving a solution to this? It seems such an oversight.

---

<div class="post-metadata">

**Author:** ![smiths73v3](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/smiths73v3/32/5452_2.png) [@smiths73v3](https://discourse.zynthian.org/u/smiths73v3)\
**Post date:** [March 13, 2021, 8:56pm UTC](https://discourse.zynthian.org/t/arduino-usb-hid-controller/4814/84 "2021-03-13T20:56:38Z")

</div>

I should be able to work something up. I’m thinking what we really need is a “config.h” file that aliases your hardware config to the rest of the code, plus an unused pin designation for boards like yours where you will be using a common GND pin and/or VCC rather than GPIO to drive these.

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [March 13, 2021, 9:06pm UTC](https://discourse.zynthian.org/t/arduino-usb-hid-controller/4814/85 "2021-03-13T21:06:25Z")

</div>

There are also the possibility of orientation settings. My device will work either way up and the ability to flip the encoders and switches would seem a welcome addition to match your rotation direction setting.

---

<div class="post-metadata">

**Author:** ![smiths73v3](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/smiths73v3/32/5452_2.png) [@smiths73v3](https://discourse.zynthian.org/u/smiths73v3)\
**Post date:** [March 13, 2021, 10:13pm UTC](https://discourse.zynthian.org/t/arduino-usb-hid-controller/4814/86 "2021-03-13T22:13:51Z")

</div>

I should be able to work something up. I’m thinking what we really need is a “config.h” file that aliases your hardware config to the rest of the code, plus an unused pin designation for boards like yours where you will be using a common GND pin and/or VCC rather than GPIO to drive them.

---

<div class="post-metadata">

**Author:** ![smiths73v3](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/smiths73v3/32/5452_2.png) [@smiths73v3](https://discourse.zynthian.org/u/smiths73v3)\
**Post date:** [March 14, 2021, 10:08pm UTC](https://discourse.zynthian.org/t/arduino-usb-hid-controller/4814/87 "2021-03-14T22:08:50Z")

</div>

I have some code building now, with yours, mine and a blank template to help others. I need to test it on my hardware, then I’ll push it. I should be able to get to it this week sometime.

---

<div class="post-metadata">

**Author:** ![smiths73v3](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/smiths73v3/32/5452_2.png) [@smiths73v3](https://discourse.zynthian.org/u/smiths73v3)\
**Post date:** [March 29, 2021, 1:42am UTC](https://discourse.zynthian.org/t/arduino-usb-hid-controller/4814/88 "2021-03-29T01:42:43Z")

</div>

@wyleu, I finally tested on my hardware, and pushed up the new code. When you get a chance, can you pull it in and test it on your MKZero hardware? It should be as simple as swapping the config file

> //#include “black\_pill\_cfg.h”  
> #include “mkzero\_cfg.h”

Also, let me know if I got anything wrong with the port to your hardware.

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [April 11, 2021, 2:37pm UTC](https://discourse.zynthian.org/t/arduino-usb-hid-controller/4814/89 "2021-04-11T14:37:16Z")

</div>

We’ve just moved house so pedalboard is on hold, but I will get to it, I’ve got to rebuild the damaged screen anyway !!

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [September 1, 2022, 3:20pm UTC](https://discourse.zynthian.org/t/arduino-usb-hid-controller/4814/90 "2022-09-01T15:20:48Z")

</div>

The testing branch now contains updated code that allows parameter controls to be modified using remote control in the fashion described above.

---

<div class="post-metadata">

**Author:** ![smiths73v3](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/smiths73v3/32/5452_2.png) [@smiths73v3](https://discourse.zynthian.org/u/smiths73v3)\
**Post date:** [September 1, 2022, 5:11pm UTC](https://discourse.zynthian.org/t/arduino-usb-hid-controller/4814/91 "2022-09-01T17:11:01Z")

</div>

Oh Nice! I’m going to drag out my headless rig and get testing on that!

---

<div class="post-metadata">

**Author:** ![smiths73v3](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/smiths73v3/32/5452_2.png) [@smiths73v3](https://discourse.zynthian.org/u/smiths73v3)\
**Post date:** [September 5, 2022, 1:19am UTC](https://discourse.zynthian.org/t/arduino-usb-hid-controller/4814/92 "2022-09-05T01:19:56Z")

</div>

Wow! Amazing! This is working exactly like what I was expecting.

 ![IMG_3859](https://discourse.zynthian.org/uploads/default/original/2X/2/26f5152f7de81cff59f1666f6bfa6e9b73921394.jpeg)  
 ![IMG_3860](https://discourse.zynthian.org/uploads/default/original/2X/a/a6b9b7071c1b80d7f15f2f719ae94838f1812d3b.jpeg)

This is a VNC session running on a headless Zynth using Headphone output!

I’m running the “Black Pill” version of my code with quick and simple 5 pin JST connected off the shelf Encoders.

> **[GitHub - smiths73v3/zynthian\_controller\_external\_usb](https://github.com/smiths73v3/zynthian_controller_external_usb)**
>
> Contribute to smiths73v3/zynthian\_controller\_external\_usb development by creating an account on GitHub.

I’ll add some better documentation so others can start working up their own builds.

Super thanks to whomever got this code written. Who should I direct my kudos to?

---

<div class="post-metadata">

**Author:** ![smiths73v3](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/smiths73v3/32/5452_2.png) [@smiths73v3](https://discourse.zynthian.org/u/smiths73v3)\
**Post date:** [September 5, 2022, 1:46am UTC](https://discourse.zynthian.org/t/arduino-usb-hid-controller/4814/93 "2022-09-05T01:46:50Z")

</div>

![IMG_3861](https://discourse.zynthian.org/uploads/default/original/2X/8/8eea7484e238ab1f3698a2d3d242c0480a233b07.jpeg)  
Second option: USB HID plugged into the headless, and an iPad pointed at the VNC-UI

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [September 5, 2022, 6:00am UTC](https://discourse.zynthian.org/t/arduino-usb-hid-controller/4814/94 "2022-09-05T06:00:29Z")

</div>

Works well doesn’t it?

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [September 5, 2022, 6:02am UTC](https://discourse.zynthian.org/t/arduino-usb-hid-controller/4814/95 "2022-09-05T06:02:09Z")

</div>

> [@smiths73v3](#):
>
> Super thanks to whomever got this code written. Who should I direct my kudos to?

That scene stealing hack @riban did a little bit, but he doesn’t need any praise as he should be writing sooperlooper code…

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [March 19, 2023, 5:24pm UTC](https://discourse.zynthian.org/t/arduino-usb-hid-controller/4814/96 "2023-03-19T17:24:29Z")

</div>

Just updated this code base to allow two modifiers to align with newer zynthian CUIA structure . . . .

> **[zynthian\_controller\_external\_usb/External\_USB\_Controller at master ·...](https://github.com/wyleu/zynthian_controller_external_usb/tree/master/External_USB_Controller)**
>
> master/External\_USB\_Controller

. . . just before someone changes it. . . .

[Previous page](https://discourse.zynthian.org/t/arduino-usb-hid-controller/4814.md?page=4)
