Homehw​.s‑ol.nu

low-profile hexagon keyboards.

config.py reference

When the board is in dev mode, the config.py file can be changed to set advanced settings that are not available from the interface.

dev mode

dev mode can be enabled permanently by setting the dev_mode variable to True. Whatever the setting is, it can be overriden for a single boot by holding the menu key down while starting, which will invert the setting.

board parameters

The board parameters configure and select the hardware that is used (pin assignments, key matrix layout). Generally the board parameters are loaded from one of the default board configurations in the hex33board/boards directory as seen below. However any values defined there can be overriden when the board is modified or the firmware is run on different hardware.

from hex33board.boards.r3_5e4bf5c import *

The board parameters are:

  • Matrix:
    a class to instantiate for reading the key matrix. Will be constructed as Matrix(*matrix_pins) and should implement a scan_for_changes() generator method that yields (int, bool) tuples of the pressed key indices and the value they changed to when the state changes.
  • matrix_pins:
    a tuple of arguments to pass when initializing Matrix
  • pixels_pin:
    a CircuitPython GPIO Pin for driving the RGB lighting
  • display_pins (optional):
    a dictionary with sda and scl keys pointing to CircuitPython GPIO Pins connecting to the OLED module
  • midi_pins (optional):
    a dictionary with tx and rx keys pointing to CircuitPython GPIO Pins for UART MIDI
  • i2c_pins (optional):
    a dictionary with sda and scl keys pointing to CircuitPython GPIO Pins for external I2C I/O