Skip to content
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

Does not work well against the LCD of M5Stack CoreMP135 #3

Open
kuroda opened this issue Sep 21, 2024 · 1 comment
Open

Does not work well against the LCD of M5Stack CoreMP135 #3

kuroda opened this issue Sep 21, 2024 · 1 comment

Comments

@kuroda
Copy link

kuroda commented Sep 21, 2024

Hi.

I created the following script to test this library against the LCD of M5Stack CoreMP135.

Mix.install([
  {:framebuffer, github: "livinginthepast/framebuffer"}
])

{:ok, fb} = Framebuffer.open()
Framebuffer.clear(fb)

for x <- 0..99 do
  Framebuffer.put_pixel(fb, x, 10, {255, 0, 0})
end

No errors occurred, but there was no change in the LCD.

If there are any errors in the usage, I would appreciate it if you could let me know.

I understand that this library is a work in progress.

@sax
Copy link
Member

sax commented Sep 22, 2024

A couple of things to try:

  • IO.puts(fb) — this will output a bunch of things about the framebuffer... does the geometry make sense?
  • Look at the fb.fix_screeninfo vs its fb.var_screeninfo.
  • export NIF_DEBUG=true and recompile. You might need to add force: true to your mix install to make it recompile.

When I was working on this, it was for a pretty simple display that had pretty low bits per pixel. My initial guess is that the NIF is either getting incorrect values for the screen out of ioctl or that I have bad arithmetic for the color space of your device.

Also just wanted to note that this library draws pretty slows, and I never got to the point of trying to optimizing anything. I'm also kind of swamped by work so don't have a whole lot of time to add features—if you can figure out what's going wrong I'll be happy to merge pull requests, without much ability to verify them myself.

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

No branches or pull requests

2 participants