dr-mod / bob

Big Orange Button a single-key USB keyboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Big Orange Button a.k.a BOB

Big Orange Button (BOB for short) is a customisable single-key USB keyboard

Hardware

To build this project you need access to a 3d printer. The model folder contains 3 parts.

Bill of materials

  • Pimoroni Tiny 2040 (x1)
  • Keyboard switch (x1)
  • M3x12 screw (x2)
  • Connection wire

Print

The 3d models can be downloaded from my Printables here.

Assembly

  1. Populate the slot of the bob_middle printed part with an MX-type keyboard switch.
  2. Solder the microcontroller to the switch one wire should be connected to the PD7 pin of the microcontroller and the other one to the GND pin, make sure that wires are soldered to the top side of your Tiny.
  3. Insert the microcontroller into its slot in the bob_bottom printed part.
  4. Secure the microcontroller with the bob_middle printed model.
  5. Screw together the bob_bottom and bob_middle parts with the m3 screws.
  6. Put on the 3d printed bob_plain_button on the key switch' tip.
  7. Optionally, you can stick some rubber feet on the bottom side of the device.

Software

Installing CircuitPython

The software is written in CircuitPython 7.3.1 and uses the HID module of CircuitPython Library Bundle.

  1. Download the CircuitPython UF2 from the official website here.
  2. Push and hold the BOOTSEL button and plug your Tiny 20240 into the USB port of your computer. Release the BOOTSEL button after your microcontroller is connected.
  3. It will mount as a Mass Storage Device called RPI-RP2.
  4. Drag and drop the CircuitPython UF2 file onto the RPI-RP2 volume.

Installing HID libraries

  1. Download the library bundle for the CircuitPython version you installed 7.x by default from here
  2. Unzip the bundle; Copy adafruit_hid from the lib folder to <CIRCUITPY DRIVE>/lib/

Software installation

  1. Download the software
cd ~
git clone https://github.com/dr-mod/bob.git
cp bob/src/*.py <CIRCUITPY DRIVE>

Configuration

To configure action modify key_mapping.py

At the moment there are 3 types of commands supported:

  • STRING - a sequence of characters printed when a button is pressed e.g. "Hello, world!"
  • KEY - a single key or combination of keys e.g. A or Ctrl + C. List of supported keycodes.
  • CONTROL_CODE - a control commands e.g. increase brightness, List of supported control codes.

Example configuration:

(STRING, "sudo shutdown now \n"),

Additional information

This project has uses a modified version of my other project pico-mpad you can find more configuration examples and information there.

Support the project

If you would like to support what I do and keep me caffeinated, you can do it here:

"Buy Me A Coffee"

About

Big Orange Button a single-key USB keyboard

License:GNU General Public License v3.0


Languages

Language:Python 100.0%