-
Notifications
You must be signed in to change notification settings - Fork 484
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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...
boards/beekeeb/piantor/kb.py
Outdated
|
||
# VBus pin config | ||
VBUS_PIN = board.VBUS_SENSE # RPi Pico | ||
# VBUS_PIN = board.GP29 # WeAct RP2040 + resistors on Piantor PCB |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
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. |
There was a problem hiding this comment.
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
.
data_pin = board.GP1 if split_side == SplitSide.LEFT else board.GP0 | ||
data_pin2 = board.GP0 if split_side == SplitSide.LEFT else board.GP1 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another unused import.
No description provided.