Bluetooth LE Page Turner
This is a prototype to show how someone could make a remote Bluetooth page turning device using a Bluetooth LE controller that acts as a keyboard.
- Adafruit BLE ATmega32u4 or Adafruit Feather 32u4 BLE
- Operating system and hardware capable of connecting to BLE HID devices (e.g. iPad)
- A button
- 10k ohm resistor to prevent floating input
How it works
- Connect up a button to the MCU. This code uses pin 12 for digital input, defined by
BUTTON_PIN. Here's an example.
- Pair the device using Bluetooth settings
- Load an app that (e.g. Books on iOS) that views eBooks or PDFs
- Hit the button!
Why it works
Since the BLE device acts as a keyboard, it's simply hitting the "right arrow" key by sending the code:
00-00-4F and then
00-00. See keycodes here.
- Install PlatformIO
- Connect the MCU and run
pio run -t upload
pio device monitor
- Monitor the serial output to make sure things are OK
- If Bluetooth starts acting flaky, reset the microcontroller using the Adafruit reset example.