Public Access
Set up PlatformIO project for EL512.256-H on ESP32
PlatformIO skeleton (esp32dev, Arduino, Adafruit GFX) with a local EL512 library: EL512Panel (1 bpp framebuffer, two-bit-mode row encoder, I2S DMA refresh stub) and EL512_GFX (Adafruit_GFX subclass). Adds a test sketch, pin map, README with wiring and timing, and moves the datasheet to docs/datasheet/. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
873bdcd23e
16 files changed
+555
No files matched your search
@@ -0,0 +1,63 @@
|
||||
// Test sketch: bring up the EL512.256-H and draw a test pattern with Adafruit GFX.
|
||||
#include <Arduino.h>
|
||||
#include <EL512.h>
|
||||
|
||||
#include "pins.h"
|
||||
|
||||
static EL512Panel panel({
|
||||
el512pins::VCLK,
|
||||
el512pins::VID,
|
||||
el512pins::TVID,
|
||||
el512pins::HS,
|
||||
el512pins::VS,
|
||||
el512pins::ENABLE,
|
||||
el512pins::LOWPWR_N,
|
||||
});
|
||||
static EL512_GFX display(panel);
|
||||
|
||||
static void drawTestPattern() {
|
||||
display.fillScreen(0);
|
||||
display.drawRect(0, 0, display.width(), display.height(), 1);
|
||||
display.drawLine(0, 0, display.width() - 1, display.height() - 1, 1);
|
||||
display.drawLine(display.width() - 1, 0, 0, display.height() - 1, 1);
|
||||
|
||||
// Checkerboard strip to check VID/TVID column ordering.
|
||||
for (int16_t y = 8; y < 24; y++)
|
||||
for (int16_t x = 8; x < 136; x++)
|
||||
if ((x ^ y) & 1) display.drawPixel(x, y, 1);
|
||||
|
||||
display.fillCircle(display.width() / 2, display.height() / 2, 40, 1);
|
||||
display.setTextColor(1);
|
||||
display.setTextSize(2);
|
||||
display.setCursor(8, 32);
|
||||
display.print("EL512.256-H");
|
||||
display.setTextSize(1);
|
||||
display.setCursor(8, 56);
|
||||
display.printf("%ux%u %.1f Hz", EL512Panel::WIDTH, EL512Panel::HEIGHT,
|
||||
EL512Panel::refreshHz());
|
||||
display.display();
|
||||
}
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
Serial.println("EL512.256-H test");
|
||||
|
||||
if (!display.begin()) {
|
||||
Serial.println("panel init failed (out of DMA memory?)");
|
||||
while (true) delay(1000);
|
||||
}
|
||||
drawTestPattern();
|
||||
Serial.printf("free heap: %u\n", ESP.getFreeHeap());
|
||||
}
|
||||
|
||||
void loop() {
|
||||
static uint32_t last = 0;
|
||||
static uint32_t frames = 0;
|
||||
if (millis() - last >= 1000) {
|
||||
last = millis();
|
||||
display.fillRect(8, 72, 120, 8, 0);
|
||||
display.setCursor(8, 72);
|
||||
display.printf("uptime %lus", (unsigned long)frames++);
|
||||
display.display();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user