Skip to content

Instantly share code, notes, and snippets.

@dagon666
Created May 11, 2014 17:54
Show Gist options
  • Save dagon666/88b9ab35784ab1ba6117 to your computer and use it in GitHub Desktop.
Save dagon666/88b9ab35784ab1ba6117 to your computer and use it in GitHub Desktop.
dithered gradient
uint8_t buffer[(PCD8544_W * PCD8544_H) >> 3] = {0x00};
for (uint8_t x = 0; x < PCD8544_W; x++) {
for (uint8_t y = 0; y < PCD8544_H; y++) {
if (common_ditherPoint(((float)y/PCD8544_H)*64, x, y))
PCD8544_SET_BIT_HIGH(buffer, x, y);
}
}
pcd8544_blit(&lcd, buffer);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment