ietsnut / Secret Santa gift

For Secret Santa I drew classmate Corina Vettore, and decided to make an avatar generator as she likes avatar creators. I’ve had my eyes on the TTGO T5 from LilyGO, a microcontroller based on an ESP32 with a built-in 2.13 inch E-paper E-ink display.

I followed this video by ShotokuTech to set it up and get the codebase. Then I created 6 250×122 illustrations for all three body parts:

After converting them into byte arrays, I could get 3 random elements and concatenate them all into a single byte array.

    int b = (int) random(0, 6);
    int m = (int) random(0, 6);
    int t = (int) random(0, 6);

    uint8_t set[3984];
    memcpy(set, tops[t], sizeof(tops[t]));
    memcpy(set+sizeof(tops[t]), middles[m], sizeof(middles[m]));
    memcpy(set+sizeof(tops[t])+sizeof(middles[m]), bottoms[b], sizeof(bottoms[b]));

Here is a video of the working prototype:

Because it is an E-paper E-ink display, the last drawn bitmap image will stay forever once the power is off: