0

GFX library on 2.7 inch oled with gradients
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

GFX library on 2.7 inch oled with gradients

by rvdokkum on Thu Feb 14, 2019 10:38 am

I am using the 2.7 inch Oled screen.

https://learn.adafruit.com/2-7-monochrome-128x64-oled-display-module/overview

in the sample code I found this about gradients.

Code: Select all | TOGGLE FULL SIZE
// The Arduino UNO doesnt have enough RAM for gradients
// but the *display* supports it!
void graydient()
{
  unsigned char x, y;
  display.command(0x15); /* set column address */
  display.command(0x00); /* set column start address */
  display.command(0x3f); /* set column end address */
  display.command(0x75); /* set row address */
  display.command(0x00); /* set row start address */
  display.command(0x3f); /* set row end address */
  for (y = 0; y < 64; y++) {
    for (x = 0; x < 4; x++) {
      display.data(0x00);
      display.data(0x11);
      display.data(0x22);
      display.data(0x33);
      display.data(0x44);
      display.data(0x55);
      display.data(0x66);
      display.data(0x77);
      display.data(0x88);
      display.data(0x99);
      display.data(0xAA);
      display.data(0xBB);
      display.data(0xCC);
      display.data(0xDD);
      display.data(0xEE);
      display.data(0xFF);
    }
  }
}


I would like to show a large font with antialias edges.

Maybe just by showing a grayscale image.

If at all, how would that be possible?

thanks

Remko
rvdokkum
 
Posts: 25
Joined: Fri May 16, 2008 12:46 pm
Location: Amsterdam - The Netherlands

Please be positive and constructive with your questions and comments.