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

Manipulation of a single pixel on the screen. #47

Open
WanderLG opened this issue Nov 7, 2022 · 1 comment
Open

Manipulation of a single pixel on the screen. #47

WanderLG opened this issue Nov 7, 2022 · 1 comment

Comments

@WanderLG
Copy link

WanderLG commented Nov 7, 2022

Is it possible for someone to help me create a function to write only 1 pixel on the screen, so it is possible to use the library to generate square or sine wave graphs using the whole screen instead of just 8 vertical pixels. I did an experiment to create vertical lines, but strangely my function, works on Atmega328P but not on STM32. I didn't understand the reason for the error. But the question is: Does anyone have a function to combine multiples of 8 and write 1 single pixel in any position on the screen?

Thanks.

void L_V(byte a, byte p) //vertical line size. horizontal position
{
  for (byte i = 1; i <= 4; i++)
  {
    oled.setCursor(p, 6 - i);
    oled.startData();
    oled.sendData(B11111111 << ((8 * i) - a));
    oled.endData();
  }
}
@SpenceKonde
Copy link

This is a prime example of why I enable both issues and discussions
Issues is my list of action items, while discussions are things that may or may not lead to issues, but are often just people asking advice (like this issue).
I find it helpful to have a list of known or suspected problems that require action from a maintainer to correct, versus everything else.

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