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 asMatrix(*matrix_pins)
and should implement ascan_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 initializingMatrix
pixels_pin
:
a CircuitPython GPIO Pin for driving the RGB lightingdisplay_pins
(optional):
a dictionary withsda
andscl
keys pointing to CircuitPython GPIO Pins connecting to the OLED modulemidi_pins
(optional):
a dictionary withtx
andrx
keys pointing to CircuitPython GPIO Pins for UART MIDIi2c_pins
(optional):
a dictionary withsda
andscl
keys pointing to CircuitPython GPIO Pins for external I2C I/O