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

epd_draw_pixel not working #28

Open
nellydocs opened this issue Feb 15, 2021 · 3 comments
Open

epd_draw_pixel not working #28

nellydocs opened this issue Feb 15, 2021 · 3 comments
Labels

Comments

@nellydocs
Copy link

i tried using

void epd_draw_pixel(int x, int y, uint8_t color,
                    uint8_t *framebuffer);

from epd_driver.h

i tried it using
epd_draw_pixel(500,200,0,framebuffer);
and
epd_draw_pixel(500,200,255,framebuffer);

both lines didnt work unf.

i am using the touchtest example code where i removed the center text.
a snippet where i added the line
` epd_poweron();
epd_clear();

//Draw Box
epd_draw_rect(600, 450, 120, 60, 0, framebuffer);
cursor_x = 615;
cursor_y = 490;
writeln((GFXfont *)&FiraSans, "Prev", &cursor_x, &cursor_y, framebuffer);

epd_draw_rect(740, 450, 120, 60, 0, framebuffer);
cursor_x = 755;
cursor_y = 490;
writeln((GFXfont *)&FiraSans, "Next", &cursor_x, &cursor_y, framebuffer);

epd_draw_pixel(500,200,0,framebuffer);

Rect_t area = {
    .x = 160,
    .y = 420,
    .width = lilygo_width,
    .height =  lilygo_height
};
epd_copy_to_framebuffer(area, (uint8_t *) lilygo_data, framebuffer);

epd_draw_rect(10, 20, EPD_WIDTH - 20, EPD_HEIGHT / 2 + 80, 0, framebuffer);

epd_draw_grayscale_image(epd_full_screen(), framebuffer);
epd_poweroff();` 

what am i doing something wrong?
could someone correct me please or prive a small snipped?

thanks

@martinberlin
Copy link

martinberlin commented Mar 1, 2021

Looks ok are you sure is not drawing the pixel over another black element and you don’t see it?
Try to draw 3 or 4 and do it on gray (255/2 or alike)
I would also start with an empty screen to draw a pixel like this. I’m adding here on my wiki the things I research about this epaper:
https://github.com/martinberlin/cale-idf/wiki/Model-parallel-ED047TC1.h#analysis-of-pixel-buffer

@martinberlin
Copy link

@nellydocs unless Lilygo has the will of updating this one day ( Check #33 )

I highly recommend to use this repository:
https://github.com/vroland/epdiy

That has an upgraded version of the same base library used here. This also supports software rotation that is here not implemented and comes with examples. Works for ESP-IDF Framework and also Arduino-esp32.

Alternatively if you want to use Espressif IDF and C++ I have a component called Cale-idf that fully supports this epaper and it's touch component.

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants