Hi, I don’t know if this is the right product but I am trying to create some interesting patterns for my QMK based mechanical keyboard. Would the code generated from PixelBlaze be compatible with Arduino SDK? Is that the point of this product? Is Pixelbalze meant to be a development environment so you can reuse the code on other platforms, or is it just to run patterns on the Pixelblaze device itself?
The patterns run on the Pixelblaze board itself. The board serves a web app which is a real-time IDE. As opposed to Arduino where you generally physically connect, then compile, and upload; Pixelblaze is type-code and see results (like, as each keystroke finishes a valid statement). So the time to iterate is pretty fast.
Also, the language is more Javascript inspired with C-style math. So the code itself wouldn’t run on an Arduino, but you might prototype the math behind your patterns a lot faster and then decide to convert it to Arduino C.
If you just really like the hardware (ESP8266, input protection, level shifters, sensor-add-ons) you can target an Arduino IDE to upload to the Pixelblaze’s ESP8266. There’s a $8 programming board for that on the Tindie store.
I’m guessing from your description you want to use certain single keystrokes on your QMK keyboard to trigger toggling between the patterns you’ve coded, is that basically right?
Thanks for your information. Yes, I am looking for a way to quickly see what the change in the code and math will do to the patterns. I am also looking for community resources for creating math based patterns. I am assuming most of the community patterns in the library don’t run out of the box on the Arduino version, but correct me if I’m wrong.
And yes, there will be patterns that just run on their own without any keyboard input, but others that are based on which key is hit, and where it is in the matrix (known as ripple effect) I don’t know if that can be done here.
Hi @jayshay,
Most of it will, with only minor syntax changes. For example, how C and JS use arrays and general math is very much the same. If you use floats for your numbers/arrays, then it should be all the same. Where it differs is the PB framework for getting those expressions to the pixels using render() and beforreRender(), and a few helper functions that are pretty easy to replicate like time()wave() and so forth, and a few syntactic differences around defining functions. But with a small bit of work, you can port the code and keep the heart of your patterns intact.