/bluetooth-keyboard-app

Playing with an Adafruit Feather nRF52

Primary LanguageC++Apache License 2.0Apache-2.0

bluetooth-keyboard-app

Playing with an Adafruit Feather nRF52

This Tweet demonstrated an amazing solution to an annoying problem I'd had at work (fumbling to find the right focus / shortcut for Zoom), and I'd just come off of playing with a Christmas tree lights hardware project so I quickly ordered an Adafruit Bluetooth Feather to see if I could make a physical button to control Zoom on my laptop.

Hardware

I'm using an Adafruit Feather nRF52 Bluefruit LE - nRF52832 as the Bluetooth Feather.

Setup

Solder board

I soldered the board with plain male headers (I wasn't expecting to add Featherwings extension boards).

BSP setup

I installed the Arduino IDE and then followed these steps to setup the board.

I needed to install this Silicon Labs VCP driver to have a suitable serial port show up in my system. I also needed to change cables before the board showed up in my system (as /dev/tty.SLAB_USBtoUART).

I updated the bootloader since I was using the older nRF52832 board.

First test

The sketch in src/arduino/test_blink blinks the red LED by the USB port on the board on and off once a second.

Wiring buttons

I wired buttons to pin 7 and 11 and wrote a quick sketch to test reading the value.

Eventually it may be interesting to use button breakout boards like these.

Bluetooth

The Bluetooth HID keyboard example is useful for showing how to bond the board to a host device. I initially had some problem with serial data being garbled but it turned out to be fixable by making my USB cables were seated correctly.

When running, the board can have a battery installed and be unplugged from the USB.

The Bluetooth HID API has a few different methods to send key press data to the host.

References