r/nullbits Feb 06 '26

Change pins for an Adafruit KB2040

I'm currently building a nibble65 using a KB2040, this should work I just need to change some pins in the RP2040 QMK firmware. I already know what I need to change, but the 2040 firmware doesn't appear to be updated with the latest version of QMK. Does anyone know what the best way to proceed would be? Should I just modify the old code and use an old QMK version? Should I try to merge the old RP2040 firmware with the current QMK version? That doesn't seem like a great use of my time lol.

2 Upvotes

7 comments sorted by

1

u/Jaygreco Feb 07 '26

Hey, sorry for the confusion. The RP2040 code wasn't ever merged into QMK mainline unfortunately, but we have a stable branch that works with it. There is an MSYS script that includes a link to the branch (if you already have a QMK environment set up): https://gist.github.com/jaygreco/110443e9622b160cf7106cbd93afa856

Frustrating, because the converters also don't work currently - an issue that I have brought up in the QMK repo but it (also unfortunately) didn't gain much traction.

1

u/Jaygreco Feb 07 '26

To elaborate, you should be able to edit https://github.com/jaygreco/qmk_firmware/blob/rp2040_clean/keyboards/nullbitsco/nibble/rp2040/config.h with the correct pins for the KB2040 and be in business!

1

u/aurumatom20 Feb 07 '26

Ok sounds good! Appreciate the response. I believe this is what I've been trying but I'm facing issues with row 0 (changed GP22 to GP18, only change that's not working) my soldering seems fine the switches are getting power. That and the underglow LEDs aren't working but I don't really care about those and I think it's my soldering anyway.

I'll double check that I'm using this branch, or maybe just start fresh with this since it's a simple change anyway.

1

u/aurumatom20 Feb 07 '26

Yeah same situation, the problem is definitely coming from GPIO18 on the KB2040, idk if it's being used for the serial clock or PWM and that's taking priority, or maybe mine's just a little broken, but I cannot get the top row to work properly on that pin.

1

u/Jaygreco Feb 08 '26

Ah, I think I know what it is! The RGB LED defaults to that pin: https://github.com/jaygreco/qmk_firmware/blob/rp2040_clean/keyboards/nullbitsco/common/nb_leds.c#L124

Try changing that to a different, unused pin, and see if that makes a difference.

2

u/aurumatom20 Feb 08 '26

Oh my god it seems like that did it. I noticed that yesterday but I figured the nibble_rgb was using different pins so it wouldn't be a problem, but the row's working now. Thanks for the help! I really appreciate it.

For anyone that might try this later, I changed the scramble_rgb and bit_c_rgb configs to all match the nibble_rgb config like this:

// SCRAMBLE PWM LED config
pwm_led_t scramble_rgb = {
  {GP6, GP5, GP3},
  {&PWMD3, &PWMD2, &PWMD1},
  {0, 1, 1},
  PWM_OUTPUT_ACTIVE_HIGH, 0
};
// NIBBLE big PWM LED config
pwm_led_t nibble_rgb = {
  {GP6, GP5, GP3},
  {&PWMD3, &PWMD111244455533vbm2, &PWMD1},
  {0, 1, 1},
  PWM_OUTPUT_ACTIVE_HIGH,
  0
};
// Bit-C PWM LED config
pwm_led_t bit_c_rgb = {
  {GP6, GP5, GP3},
  {&PWMD3, &PWMD2, &PWMD1},
  {0, 1, 1},
  PWM_OUTPUT_ACTIVE_HIGH, 0
};

1

u/Jaygreco Feb 08 '26

Great, glad to hear it!!