Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 1.51 KB

README.md

File metadata and controls

37 lines (30 loc) · 1.51 KB

Sharp Memory LCD

Single header Arduino framework library for SHARP Memory LCD Displays, with Adafruit_GFX compatibility

IMG_0026 IMG_0033

Pinout

The DISP pin is not used, just pull it to VCC.
External VCOM inversion signal is used, so pull EXTCOMIN to VCC. (I don't like having SPI transactions inside interupt timers, so invert via SPI won't work that well if display is not updated)

Example

#include <SharpMemoryLCD.h>
#include <SoftwareSerial.h>
#include <TeensyTimerTool.h>

LS013B7DH06 mlcd(10, 9); // cs, extcomin
TeensyTimerTool::PeriodicTimer extComUpdate;

void setup() {
    Serial.begin(115200);
    mlcd.begin();
    extComUpdate.begin([] { mlcd.VCOMInvert(); }, 500ms);
}

void loop() {
    mlcd.fillScreen(MLCD_BLACK);
    uint16_t c[] = { MLCD_RED, MLCD_YELLOW, MLCD_GREEN, MLCD_CYAN, MLCD_BLUE, MLCD_MAGENTA };
    for (int i = 0; i < 6; i++)
        mlcd.fillCircle(64 + 44 * std::cos((millis() / 500.) - i / 3. * M_PI), 64 + 44 * std::sin((millis() / 500.) - i / 3. * M_PI), 20, c[i]);
    mlcd.fillCircle(64, 64, 20, MLCD_WHITE);
    mlcd.update();
}

GIF 2023-6-28 上午 01-40-58 GIF 2023-6-28 上午 01-42-09