Attempting to recreate Cosmic Unicorn driver

Hi all!

I’ve been teaching myself embedded, and seeing as I’m a generative artist I figured something like the cosmic unicorn could be a great place to start. Being a stubborn, picky person when it comes to languages I figured I could rewrite the driver in Rust so I could have all my preferred language features while working on it.

But I have been stuck for months now, coming back to it periodically only to get nothing but a brief flash across the upper LEDs.

Recently I figured I may as well write it in C so I can mostly copy-paste and hopefully remove any issues that originate in the Rust Pi Pico HAL, but the result was the same. So I’m wondering if there’s some obvious mistake I’m making in translating the code over to other languages in general.

Would someone be willing to take a look?
Here’s the repo

I suspect I may be misunderstanding how the PIO program works, I grok the general idea. The actual implementation less so. There don’t seem to be any crashes when I run my code, though, so whatever it is it’s in the logic.