hi all,
wish a nice year 2024 !
i have made a sketch which shows temperatures of 5 locations.
used u2g8 with 128x64 lcd-display on Arduino nano
in dec23.
As there where no sensors available an array of 5 temperatures
as example where set.
All worked satisfactionable as picture may show.
this all was built together on a test board.
Now i built the final box with all parts in it.
Checking wiring seems ok.
But i dont see what u see in the picture. Only on resetting
the Arduino a black horizontal line in the middle of screen appears for
half a second, then vanishes.
The same effect i have with adapted simplified example code , what i show
here
/*
lcd128x64_GraphicsTest_simple3.ino
Status : 15.12.2023
Author : W.W.Fietz
Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/)
*/
#include <Arduino.h>
#include <U8g2lib.h>
#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif
/*
U8g2lib Example Overview:
Frame Buffer Examples: clearBuffer/sendBuffer. Fast, but may not work with all Arduino boards because of RAM consumption
Page Buffer Examples: firstPage/nextPage. Less RAM usage, should work with all Arduino boards.
U8x8 Text Only Example: No RAM usage, direct communication with display controller. No graphics, 8x8 Text only.
*/
// Please UNCOMMENT one of the contructor lines below
// U8g2 Contructor List (Frame Buffer)
// The complete list is available here: https://github.com/olikraus/u8g2/wiki/u8g2setupcpp
// Please update the pin numbers according to your setup. Use U8X8_PIN_NONE if the reset pin is not connected
U8G2_ST7920_128X64_F_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* CS=*/ 10, /* reset=*/ 8);
//U8G2_ST7920_128X64_F_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* CS=*/ 10);
void u8g2_prepare(void) {
u8g2.setFont(u8g2_font_6x10_tf);
u8g2.setFontRefHeightExtendedText();
u8g2.setDrawColor(1);
u8g2.setFontPosTop();
u8g2.setFontDirection(0);
}
void setup(void) {
u8g2.begin();
u8g2_prepare();
}
void loop(void)
{
u8g2.clearBuffer();
u8g2.drawBox(5,10,20,10);
delay(1000);
u8g2.drawRFrame(5, 10,40,30, 1);
delay(1000);
u8g2.setFontDirection(0);
u8g2.drawStr(50,10, "wolf");
delay(1000);
u8g2.drawLine(5, 10, 100, 10); //- x,y,b,h
delay(1000);
u8g2.sendBuffer();
delay(1000);
}
but it shows same line at reset only for a second anyways. i have checked wiring
many times..dont know now how to proceed..
