There's no extra hardware needed to work with the NeoKey Trinkey, which makes getting started with it quick.

Required Libraries

You'll need three libraries to use the features of the NeoKey Trinkey.

In the Arduino library manager, search for NeoPixel and install Adafruit NeoPixel (double check the name!).

Next, search for FreeTouch and install Adafruit FreeTouch Library.

Finally, install the HID-Project library by NicoHood.

Example Code

Temporarily unable to load content:

We pre-define two constants, PIN_NEOPIXEL and NUM_NEOPIXEL so you don't have to remember the NeoPixel pin or the quantity of pixels.

For the capacitive touch pads, you can call .measure() on the touch object to get a quantity-count reading. We find 500 to be a good threshold to determine whether its touched or not!

If you touch the touch pad, it cycles the LED through the rainbow. The LED is only lit up when the pad is touched!

When the key on the NeoKey Trinkey is pressed, it sends the play/pause command, which should play or pause the media player on your computer.

That's all there is to using the capacitive touch pad and the key switch on your NeoKey Trinkey with Arduino!

This guide was first published on May 26, 2021. It was last updated on Jul 11, 2024.

This page (Arduino HID and Cap Touch) was last updated on Jul 11, 2024.

Text editor powered by tinymce.