Firmware flow
How a stored animation frame reaches the display
Selected monochrome frame rendering code.
Read the stored monochrome pixels, expand them to the selected scale, centre the result and send the completed buffer to the display.
This excerpt shows decoding, scaling and display transfer. It does not show frame timing, buffer allocation or the complete photo-booth interaction.
Read the implementation
drawFramephoto1 excerpt · selected source lines 185–205. Source inspection is not a hardware test.
for (uint16_t y = 0; y < FRAME_HEIGHT; y++) {
for (uint16_t x = 0; x < FRAME_WIDTH; x++) {
uint16_t byteIndex = y * FRAME_BYTE_WIDTH + (x / 8);
uint8_t bitIndex = 7 - (x % 8);
uint8_t b = pgm_read_byte(&photo1[frameIndex][byteIndex]);
bool pixelOn = (b >> bitIndex) & 0x01;
uint16_t color = pixelOn ? 0xFFFF : 0x0000;
for (uint16_t j = 0; j < SCALE_FACTOR; j++) {
for (uint16_t i = 0; i < SCALE_FACTOR; i++) {
uint16_t px = x * SCALE_FACTOR + i;
uint16_t py = y * SCALE_FACTOR + j;
spriteBuffer[py * spriteWidth + px] = color;
}
}
}
}
uint16_t posX = (TFT_WIDTH - spriteWidth) / 2;
uint16_t posY = (TFT_HEIGHT - spriteHeight) / 2;
lcd_PushColors(posX, posY, spriteWidth, spriteHeight, spriteBuffer);
free(spriteBuffer);Open the exact source-level diagramTechnical notes
Animation and device state
The application uses animation for photo-booth feedback.
Network and display interfaces
The application combines ESP32, Wi-Fi and HTTP interfaces with display control, including text checks and grid data handling.
Display status
The development scope connects display logic with the photo booth’s user feedback.