Code and designs for custom physical keyboards
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Macoy Madson cca7b092c3 Remove misleading comments 3 months ago
Dependencies Add submodule, initial keyboard stuff 4 months ago
data/Fonts Initial commit 4 months ago
printOnly Got USB keypad working 3 months ago
src Remove misleading comments 3 months ago
.gitignore Use pi pico SDK rather than arduino for USB 3 months ago
.gitmodules Initial commit 4 months ago
Build.sh Add instructions, non-working firmware 4 months ago
BuildPico.sh Got USB keypad working 3 months ago
COPYING Add submodule, initial keyboard stuff 4 months ago
FlashPico.sh Use pi pico SDK rather than arduino for USB 3 months ago
FlashPicoPrintOnly.sh Got USB keypad working 3 months ago
LICENSE Initial commit 4 months ago
ReadMe.org Got USB keypad working 3 months ago
RunProfiler.sh Initial commit 4 months ago

ReadMe.org

Keyboards

This is my dumping ground for various physical keyboard firmware and designs.

Building and running

Via Raspberry Pi Pico

Initial setup

  # Get all the compilers and code
  sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
  git clone https://github.com/raspberrypi/pico-sdk
  cd pico-sdk
  git submodule update --init
  cd lib/tinyusb
  git submodule update --init
  cd ../../../

  # Get picotool for flashing
  git clone https://github.com/raspberrypi/picotool.git --branch master
  cd picotool
  mkdir build
  cd build
  cmake .. -DPICO_SDK_PATH=/home/macoy/Development/code/3rdParty/repositories/pico-sdk

To get the pico examples working:

  git clone https://github.com/raspberrypi/pico-examples
  cd pico-examples
  mkdir build
  cd build
  cmake .. -DPICO_SDK_PATH=/home/macoy/Development/code/3rdParty/repositories/pico-sdk -DPICO_BOARD=adafruit_kb2040
  make -j

Example flashing:

  • Hold down the boot button and plug in the board

  • Run in picotool/build:

  sudo ./picotool load ../../pico-examples/build/usb/device/dev_hid_composite/dev_hid_composite.uf2
  sudo ./picotool verify ../../pico-examples/build/usb/device/dev_hid_composite/dev_hid_composite.uf2
  sudo ./picotool reboot

Building Keypad

Before flashing, plug in the kb2040 while holding the boot button down.

  mkdir build
  cd build
  cmake ../src/ -DPICO_SDK_PATH=/home/macoy/Development/code/3rdParty/repositories/pico-sdk -DPICO_BOARD=adafruit_kb2040
  cd ../
  ./BuildPico.sh
  ./FlashPico.sh

Now, unplug and replug the pico or:

  sudo /home/macoy/Development/code/3rdParty/repositories/picotool/build/picotool reboot

Via Arduino (old, don't use)

Follow Arduino IDE Setup. In short:

  • Get Arduino IDE (and Arduino Console while you're at it)

  • Add https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json to Preferences > Additional Boards Manager URLs

  • Search for RP2040 in Board Manager and install the Raspberry Pi Pico/RP2040 by Earle F Philhower, III

The console board name is rp2040:rp2040:adafruit_kb2040.

Run Build.sh.

Observing output

  screen /dev/ttyACM0 115200

Killing screen sessions

Ctrl + a then k