Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Piantor to boards #723

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add Piantor to boards #723

wants to merge 3 commits into from

Conversation

cairnm
Copy link

@cairnm cairnm commented Feb 28, 2023

No description provided.

Copy link
Member

@regicidalplutophage regicidalplutophage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
I handle pins for right and left sides similarly in my own direct pin split.
I wonder if this method should be mentioned somewhere in the docs...


# VBus pin config
VBUS_PIN = board.VBUS_SENSE # RPi Pico
# VBUS_PIN = board.GP29 # WeAct RP2040 + resistors on Piantor PCB
Copy link

@One-Nub One-Nub Jul 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a person with the WeAct on a Piantor, board.GP29 results in an error (module has no attribute), it appears as board.A3 instead.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I've updated the comment to board.A3 instead of board.GP29

Correct comment about WeAct RP2040; it should say board.A3 instead of board.GP29 because this pin isn't aliased. Thanks @One-Nub
Comment on lines +10 to +12
This firmware assumes that VBUS will be used for split side detection as in the QMK implementation. This requires that the USB cable is plugged into the left side to ensure that the correct pin mapping is used. If using a rp2040 microcontroller without a VBus sense circuit (like the WeAct RP2040), resistors must be soldered to the bottom of the PCBs, and you will need to uncomment line 9 of kb.py to assign the VBus sense pin to GP24.

An alternative option is to detect the split sides using the drive names. See the [KMK documentation](http://kmkfw.io/docs/split_keyboards#drive-names) for setting this up. Once you have set drive names, you can comment out lines 12-14 and uncomment lines 17-18 in kb.py to enable this option.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a more robust and universal solution is to check supervisor.runtime.usb_connected.

Comment on lines +18 to +19
data_pin = board.GP1 if split_side == SplitSide.LEFT else board.GP0
data_pin2 = board.GP0 if split_side == SplitSide.LEFT else board.GP1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is what the uart_flip option of the split module is for.

from kmk.modules.split import Split, SplitSide, SplitType

keyboard = KMKKeyboard()
keyboard.tap_time = 100
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't do anything.

import digitalio

from kb import KMKKeyboard, isRight
from storage import getmount
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't do anything.

@@ -0,0 +1,63 @@
import board
import digitalio
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another unused import.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants