ST7920 not showing anything with any code or circuits

so, my 128x64 lcd display didnt show anything with any code or any circuits for some reason while it does show that its on, it usually works every time i use it.
i have trimmed it multiple times with every code and circuits
i even change the display with the other newly bought 128x64 lcd display, and theres still nothing to show.
i am using arduino mega 2560 and try changing it to arduino uno board, and its still doesnt work
i still have no idea what is the problem.

Welcome! You have an interesting project, but first please read the advice in the topic "How to get the best from this forum". There is a proper way to post code, this allows us to help you. It will only take you another 10 seconds after your figure it out (kode). l have no clue as to what each hardware device is or how it interacts with your code, post an annotated schematic, the language of electronics, showing how you have wired it, not pictures such as frizzy (wiring) drawings they are useless for troubleshooting. Do include links to "Technical information" on the hardware parts, links to sales outlets like azon are next to useless. Doing this will have a big positive effect on your answers and will improve the accuracy of the answer a lot.

I would sure like to help you but since you did not take the time to read the forum guidelines I will not burn the time trying to figure out the gibberish you posted. All I can say is good luck!

1 Like

(for example) this circuit


and this code

#include <DHT.h>
#include <U8g2lib.h>
#include <U8x8lib.h>

#define DHTTYPE    DHT22

char temperature [5];
char humidity [5];
const char DEGREE_SYMBOL[] = { 0xB0, '\0' };

DHT dht(7, DHTTYPE);

U8G2_ST7920_128X64_1_HW_SPI u8g2(U8G2_R0, /* CS=*/ 10, /* reset=*/ 8);

void setup() {  

  dht.begin();
  Serial.begin(9600); 
  u8g2.begin();
  u8g2.enableUTF8Print();
  u8g2.setFont(u8g2_font_helvB10_tf); 
  u8g2.setColorIndex(1);  
}

void loop() {  
  u8g2.firstPage();
  do {   
    draw();
  } while( u8g2.nextPage() );
}
  
void draw(){

  readTemperature();
  readHumidity();
  
  u8g2.drawFrame(0,0,128,31);         
  u8g2.drawFrame(0,33,128,31);           
  
  u8g2.drawStr( 15, 13, "Temperature");   
  u8g2.drawStr( 35, 28, temperature);   
  u8g2.drawUTF8(70, 28, DEGREE_SYMBOL);
  u8g2.drawUTF8(76, 28, "C");

  u8g2.drawStr(30,46, "Humidity");         
  u8g2.drawStr( 37, 61, humidity); 
  u8g2.drawStr(75,61, "%");  
}

void readTemperature()
{
  float t = dht.readTemperature();
  dtostrf(t, 3, 1, temperature);
}

void readHumidity()
{
  float h = dht.readHumidity();
  dtostrf(h, 3, 1, humidity);
}

so, the problem is the trimmer. i must have turned it too much. well, next time i will show the code and the circuit. thanks gilshultz!

1 Like

You are welcome but what you posted is a wiring diagram not a schematic. Thanks for the effort.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.