bitmap from RAM and not PROGMEM #71
flyingzebra
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to add a bitmap function next to the existing one, with two small differences.
Since I like to make generative bitmaps based on math instead using of pre-built byte arrays from EEPROM memory
void SSD1306Device::bitmap_stripe(uint8_t x0, uint8_t y0, uint8_t byte_len, const uint8_t bytes[]) {
setCursor(x0, y0);
ssd1306_send_data_start();
for (uint16_t x = 0; x < byte_len; x++)
ssd1306_send_data_byte(bytes[x]);
ssd1306_send_stop();
}
example usage:
uint8_t b[3] = {0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80}; // just any array built in RAM by algorithm
uint8_t x = 0;
uint8_t page = 0;
oled.bitmap_stripe(x, page, sizeof(b), b);
Beta Was this translation helpful? Give feedback.
All reactions