Skip to content

Parallax P8X32A/Propeller 1, P2X8C4M64P/Propeller 2 driver object for the BB Q20 keyboard (I2C)

License

Notifications You must be signed in to change notification settings

avsa242/bbq20kbd-spin

Repository files navigation

bbq20kbd-spin


This is a P8X32A/Propeller, P2X8C4M64P/Propeller 2 driver object for the solderparty BB Q20 keyboard (I2C).

IMPORTANT: This software is meant to be used with the spin-standard-library (P8X32A) or p2-spin-standard-library (P2X8C4M64P). Please install the applicable library first before attempting to use this code, otherwise you will be missing several files required to build the project.

Salient Features

  • I2C connection at up to 400kHz
  • Read keypress buffer state
  • Read keypresses (terminal-standard getchar())
  • Read Caps lock and Num lock states
  • Read trackpad position (relative, absolute)
  • Set trackpad absolute position limits
  • Set trackpad sensitivity
  • Set keyboard backlight brightness
  • Set keyboard press-and-hold duration (time before key repeat)
  • Enable/disable modifier keys
  • Interrupts: set mask, read source(s), set duration
  • Reset the keyboard
  • Set the keyboard's I2C address ($08..$77)

Requirements

P1/SPIN1:

  • spin-standard-library
  • input.pointer.common.spinh (provided by the spin-standard-library)

P2/SPIN2:

  • p2-spin-standard-library
  • input.pointer.common.spin2h (provided by the p2-spin-standard-library)

Compiler Compatibility

Processor Language Compiler Backend Status
P1 SPIN1 FlexSpin (6.9.4) Bytecode OK
P1 SPIN1 FlexSpin (6.9.4) Native/PASM OK
P2 SPIN2 FlexSpin (6.9.4) NuCode OK
P2 SPIN2 FlexSpin (6.9.4) Native/PASM2 OK

(other versions or toolchains not listed are not supported, and may or may not work)

Hardware compatibility

Limitations

  • doesn't handle key repeating yet (i.e., a key being held down)
  • doesn't support setting/reading GPIO states

About

Parallax P8X32A/Propeller 1, P2X8C4M64P/Propeller 2 driver object for the BB Q20 keyboard (I2C)

Topics

Resources

License

Stars

Watchers

Forks