Skip to content

config for upside down boards#6

Open
mlgarchery wants to merge 2 commits into
Nuclear-Squid:mainfrom
mlgarchery:main
Open

config for upside down boards#6
mlgarchery wants to merge 2 commits into
Nuclear-Squid:mainfrom
mlgarchery:main

Conversation

@mlgarchery

@mlgarchery mlgarchery commented Nov 18, 2025

Copy link
Copy Markdown

OS: Ubuntu 24.04

I printed the PCBs and bought a helios rp2040 microcontroller (https://github.com/0xCB-dev/0xCB-Helios) which is supposed to be compatible with the new_sparkfun_rp2040() function in zero.rs, but I had to make some changes in the order of the pins in the matrix to make it work.

Here's the code. Most of it is either typo fixing or my prettier extension formatting Rust, but the relevant change is in new_sparkfun_rp2040(). My question is: was this function tested before or only the new_promicro() one ?

My other hypothesis is that something else is reversed in my configuration, but if I had put the microcontroller in the wrong order nothing would have worked so I am not sure.

image

Comment thread firmware/src/zero.rs Outdated
Comment thread firmware/Cargo.toml Outdated
@Nuclear-Squid

Copy link
Copy Markdown
Owner

Thank you for your contribution. I’d like to address some things with you, though :

  • Why did you try to add libudev-sys ? Was there a problem with the firmware ? This is a system library to interface with the udev permission system on Linux, so I don’t see why you’d need it in the firmware ?
  • How did you install the promicro controller on your board ? We installed it « right side up » in our boards, but we later discovered most people install it « upside down » (which is why the footprint is in reverse, by the way). If that’s the case, then I get why the pin order would change, but I’d ask that you create a separate function for it, that way you don’t break boards with the controller mounted « right side up ». Adding a .upside_down() method (or one with a similar name, suggested signature below) that handles the permutation could be a nicer way to implement it, that way it can be used for any promicro board.
impl<C, R> Col2RowMatrix<C, R>
where
    C: OutputPin,
    R: InputPin,
{
    // -->8 snip >8---

    fn upside_down(self) -> Result<QuackenZeroMatrix, Infallible> {
        // ...
    }

    // -->8 snip >8---
}

@TeXitoi

TeXitoi commented Nov 18, 2025

Copy link
Copy Markdown

That’s because the promicro is supposed to be soldered the other way.

Also, You should redo the soldering, it should look like volcanos: https://docs.keeb.supply/basics/soldering/promicro/thtcontroller-soldered_huda6ecd2bfc0610395ffa35c6acda60b9_251484_87ead76292307859ff005a99ccd79171.webp

@mlgarchery

mlgarchery commented Nov 18, 2025

Copy link
Copy Markdown
Author

@Nuclear-Squid for the libudev-sys dependency, that's my bad, I added it by mistake when installing missing packages. Removing the line.

I understand. I've seen the microcontroller face down on other setups, and felt invited to put it that way with the anotations on the PCBs
image
image

An upside_down() function is indeed clearer. Will do

@mlgarchery mlgarchery force-pushed the main branch 5 times, most recently from cfcd340 to c068dc9 Compare November 18, 2025 15:09
@mlgarchery

Copy link
Copy Markdown
Author

@Nuclear-Squid ready for review. Feel free to incorporate the changes you want (first commit is about typos fixing and formatting, second commit is the upside_down function)

@mlgarchery mlgarchery changed the title new_sparkfun_rp2040() changes in pins order config for upside down boards Nov 19, 2025
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.

3 participants