Skip to content

Commit

Permalink
doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksurry committed Dec 4, 2023
1 parent 562aef9 commit bc1a85d
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
3 changes: 2 additions & 1 deletion boards/nullbitsco/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
https://nullbits.co/
Mappings for [nullbits](https://nullbits.co/) keyboards,
often based on the [BIT-C pro micro MCU](https://nullbits.co/bit-c/).
39 changes: 38 additions & 1 deletion boards/nullbitsco/tidbit/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,38 @@
https://nullbits.co/tidbit/
Keyboard mapping for the [nullbits tidbit](https://nullbits.co/tidbit/).

Copy `kb.py` and `main.py` to your top level circuitpython folder beside the kmk folder.
Edit the key mapping in `main.py` to match your build,
for example the number and location of encoders and double-size keys.

The Keyboard constructor supports a couple of optional arguments (see `kb.py`).

If you're setting your tidbit up in landscape mode,
with the USB connector at top right instead of top left, pass
`landscape_layout=True`.

You can specify the active encoder positions by passing a list like
`active_encoders=[0, 2]` which corresponds to the 1st and 3rd positions shown
in [step 6](https://github.com/nullbitsco/docs/blob/main/tidbit/build_guide_en.md#6-optional-solder-rotary-encoder-led-matrix-andor-oled-display) of the build guide.
The default is for a single encoder in either of the top two locations labeled 1
in the build diagram, i.e. `active_encoders=[0]`. Pass an empty list if you skipped
adding any encoders.

You can control the RGB backlights with the [RGB extension](http://kmkfw.io/docs/rgb).
Here's an example:

```python
from kb import KMKKeyboard
from kmk.extensions.rgb import RGB, AnimationModes

keyboard = KMKKeyboard(active_encoders=[0], landscape_layout=True)

rgb = RGB(
pixel_pin=keyboard.pixel_pin,
num_pixels=8,
animation_mode=AnimationModes.BREATHING,
animation_speed=3,
breathe_center=2,
)
keyboard.extensions.append(rgb)

```
3 changes: 1 addition & 2 deletions boards/nullbitsco/tidbit/kb.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class KMKKeyboard(_KMKKeyboard):
active_encoders=[0, 2] to list installed encoder positions (first=0)
then declare keyboard.encoders.map = [(KC.<left> , KC.<right>, None), (...)]
enable_rgb=False (default True) to add rgb module (requires neopixel.py)
landscape_layout=True to orient USB port top right rather than left (default)
"""
# led = digitalio.DigitalInOut(board.D21)
Expand All @@ -45,7 +44,7 @@ class KMKKeyboard(_KMKKeyboard):
diode_orientation = DiodeOrientation.ROW2COL
i2c = board.I2C #TODO ??

def __init__(self, active_encoders=[], landscape_layout=False):
def __init__(self, active_encoders=[0], landscape_layout=False):
super().__init__()

if landscape_layout:
Expand Down

0 comments on commit bc1a85d

Please sign in to comment.