First, I have successfully built the Pimoroni examples in C++, but my current interest is the inky_pack example, which works fine after I reversed the pen colors, as I like a white background. Have been attempting to modify the demo code, but ran into a problem with partial_update() from the uc8151 libraries. The end result is to use the inky_pack as a weather station, as OLED displays are a bit small. So, to do this with the skinny documentation I have been able to find is a bit hard. While attempting to update a portion of the inky_pack screen, I end with gibberish. The lines used below are modified directly from the demo.
int main() {
graphics.set_pen(15);
graphics.clear();
graphics.set_pen(0);
graphics.set_font("bitmap8");
graphics.text("Large Text Here", {20, 0}, 296, 4);
graphics.text(" What we have is by God's Grace!", {0, 38}, 296);
graphics.text(" Another Line", {80, 64}, 296);
graphics.text(" for address", {80, 80}, 296);
graphics.text("And other stuff", {80, 96}, 296);
graphics.text("---------------", {80, 112}, 296);
uc8151.update(&graphics);
sleep_ms(5000);
graphics.text("Ye Gads ! ARGH", {0, 0}, 296, 4);
uc8151.partial_update(&graphics, {0, 0, 296, 34});
return 0;
}
Lines above the “sleep_ms()” line work fine. The “partial_update” was gleaned from the uc8151.hpp file in the drivers subdirectory. My ultimate goal is to get input from sensors (such as the bme280, etc.) and have the data display in a particular location on the e-ink display. Documentation on the Inky Pack is, for the most part, nonexistent. Any insight would be appreciated. I am not interested in Python, at least for the Pico, but see similarities in the coding.