-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complete the "binary" documentation such that anybody can write a "wrapper" #106
Comments
For anybody who stumbles on this issue and is also wondering how the DrawBW call works. As @DesiOtaku pointed out, the byte orientation is not immediately obvious; if you write a loop which sets every bit one by one, the activated pixel will first move right to left, after which it suddenly jumps to the next line. The location where this occurs is not the same on each line either, which makes it tricky to figure out what is going on. There are two things which cause confusion here:
Once you know these two things, you can figure out how to map a
|
For drawing black and white, I think it's helpful to imagine the LED matrix as a list of 306 pixels that are turned on or off with a list of bits. After turning the bits into bytes, we can send those bytes to the LED module:
If you define the Here's the rest of the code:
|
Right now, inputmodule-rs is a python + rust project. Great for command line, not so great for developers who wish not to touch either language.
Good news is that there is some binary level documentation available here: https://github.com/FrameworkComputer/inputmodule-rs/blob/main/commands.md
However, it is currently incomplete. Things like how the bytes are oriented for images (left to right then down, or up to down then left to right?), how to make a custom animation, etc. This would be useful for developers who wish to make their own "wrapper" (like a C/C++ wrapper, or somebody wants to write everything in Java) and would not need an external dependency.
The text was updated successfully, but these errors were encountered: