EA DOGM204W-A

pd0lew

Well-known member
The EA DOGM204W-A is a very nice display however not much information special when using SPI.

Here my test setup with a Teensy 4.0
Look here EA DOGM204A-A


T4.0 ------------ EA DOGM204W-A
13 ------------- 40
11 ------------- 39
23 ------------ 44
gnd-------------- 29
+3.3V-------------- 30
+3.3V-------------- 31
gnd-------------- 32
+3.3V-------------- 41
+3.3V-------------- 42
+3.3V-------------- 43

Other pins are floating.

There are three parts and well main code, DOGM204.cpp and DOGM204.h

Goodluck,

Best,
Johan



Code:
#include "DOGM204.h"

DOGM204 lcd(23);

uint8_t percent = 0;

void setup() {

    lcd.begin();

    lcd.setContrast(30);

    lcd.writeString(0, 0, "DOGM204 Library");

    lcd.setCursor(0, 2);
    lcd.print("Ready...");
}

void loop() {

    // move value text
    lcd.setCursor(0, 1);
    lcd.print("Value:      ");
    lcd.setCursor(7, 1);
    lcd.print(percent);

    // draw moving bar
    lcd.drawProgressBar(0, 3, 20, percent);

    // change direction (bounce)
    percent += dir;

    if (percent >= 100) {
        percent = 100;
        dir = -1;
    }

    if (percent == 0) {
        dir = 1;
    }

    delay(150);
}
 

Attachments

  • DOGM204.cpp
    11.7 KB · Views: 10
  • DOGM204.h
    973 bytes · Views: 10
Back
Top