You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My goal is to create gaming keypad with joystick and 26 keys similar to Razer Tartarus, Hori TAC, Azeron Cyborg, Saitek PZ31a etc. Im using Pi Pico (for prototyping) and later will use Pi Zero.
I want to use my joystick the same way author did - by assigning WASD to it.
I adjusted my code so it looks like this:
import board
from kmk.kmk_keyboard import KMKKeyboard
from kmk.keys import KC
from kmk.scanners import DiodeOrientation
from kmk.modules.layers import Layers
from kmk.modules.analog import AnalogKey #handles analoginput
keyboard = KMKKeyboard()
layers = Layers()
ana = AnalogKey()
keyboard.modules = [layers,ana]
keyboard.col_pins = (board.GP18,board.GP19)
keyboard.row_pins = (board.GP12,board.GP13)
keyboard.diode_orientation = DiodeOrientation.COL2ROW
keyboard.keymap = [
[
KC.A, KC.B,
KC.C, KC.D,
]
]
#ANALOG
ana.pins = (board.A0,board.A1) #define analog pins
ana.reverse = False #flips direction(standard is: analog value goes down when key pressed)
# define per layer if keypresses should be Threshhold(0) or Rapid trigger(1) explanation: https://wooting.io/rapid-trigger
ana.keypType = (1,1)
#threshold: when analog value is passed key is pressed
#rapit: when a certain distance is surpaced key is pressed (the lower the value the faster responce but at a certain point noise can trigger keypress)
#use the provided "maxChangeInVal.py"+ 300 to find a good rapid trigger value
ana.threshold = (30000,1800) #default (30000,1800)
ana.map = [
[
KC.W,KC.A,KC.S,KC.D
]
]
if __name__ == '__main__':
keyboard.go()
Unfortunately im geting an error:
code.py output:
Starting
Traceback (most recent call last):
File "code.py", line 9, in <module>
ImportError: no module named 'kmk.modules.analog'
Is there other way to achieve what i want?
The text was updated successfully, but these errors were encountered:
My goal is to create gaming keypad with joystick and 26 keys similar to Razer Tartarus, Hori TAC, Azeron Cyborg, Saitek PZ31a etc. Im using Pi Pico (for prototyping) and later will use Pi Zero.
Im following this
https://github.com/LennartEd/Analog-WASD-Keyboard-kmk-pi-pico-rp2040/blob/main/README.md
I want to use my joystick the same way author did - by assigning WASD to it.
I adjusted my code so it looks like this:
Unfortunately im geting an error:
Is there other way to achieve what i want?
The text was updated successfully, but these errors were encountered: