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.
SysEx key sync
SysEx key-press synchronization can be enabled by setting the sysex_key_sync
variable to True
.
See the simulator section on the firmware hacking page for more information.
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:
Keyboard
:
a class to instantiate to start firmware execution. The constructor will be passed the config module as the only argument. After instantiation,keyboard.run()
will be invoked.This should usually simply be
hex33board.Keyboard
.create_matrix(board)
:
a function to instantiate a key matrix object. The returned object 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.create_pixels(board, **kwargs)
:
a function to instantiate aneopixel.NeoPixel
-like object for RGB lightingcreate_display(board, **kwargs)
:
a function to instantiate adisplayio.Display
-like object for the main displaycreate_midi_usb(board)
,create_midi_trs(board)
:
functions to instantiateadafruit_midi.MIDI
portscreate_audio_out(board)
:
a function to instantiate aaudiopwmio.PWMAudioOut
-like objectcreate_i2c(board, **kwargs)
,create_i2ctarget(board, **kwargs)
:
functions to instantiatebusio.I2C
andi2ctarget.I2CTarget
instances