Serial.println("B-Modus!");
u8g2.firstPage();
u8g2.setFont(u8g2_font_ncenB08_tr);
do{
for(int i = 0; i <= message.length(); i++){
int x = i % 129;
int y = i / 129;
if(message[i] == '1'){
u8g2.drawPixel(x,y);
}
}
}while(u8g2.nextPage());
}
What i tried:
Using F-Mode in Constructer and clearbuffer/sendbuffer but still the messed up display!
Can somebody help me or have anyone an idea?
I think it has something to do with a full buffer or something
Okay it seems, i cant attach a picture. The bottom half of the picture is most of the times noisy, off center or just black.
Please post a link to the actual item that you bought. e.g. Ebay sale page
Using F buffer or 1 buffer will make no difference to a D1 mini. It has plenty of SRAM memory.
Post a buildable sketch. Then readers can replicate your problem on the same screen and similar CPU board.
Try to make a sketch that does not require third party libraries (except U8g2lib of course)
Paste in a code window or attach as a INO or ZIP file.
The following sketch breaks down the basic funcionality of the display but it seems to be working flawlessly.
Because of this i guess the reading of the String from Gist is faulty. I have to dig deeper, im open and thankful for any proposals
String tmp = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111000000000000000000000001111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111110000000000000000111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111000000000000111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111000000000011111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111100000011111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000001111111110000111111111100001111111111000011111111100000000000000000000000000000000000000000000000000000000000000000000000000000011111110000000001111111100111111110000000000111111100000000000000000000000000000000000000000000000000000000000000000000000000001111110000000000000111111001111111000000000000111111000000000000000000000000000000000000000000000000000000000000000000000000000111111000000000000000111111111111000000000000000111111000000000000000000000000000000000000000000000000000000000000000000000000001111110000000000000000111111111100000000000000000111110000000000000000000000000000000000000000000000000000000000000000000000000011111000000000000000001111111111000000000000000001111100000000000000000000000000000000000000000000000000000000000000000000000000111110000000000000000001111111100000000000000000011111100000000000000000000000000000000000000000000000000000000000000000000000011111000000000000000000001111110000000000000000000011111000000000000000000000000000000000000000000000000000000000000000000000000111110000000000000000000011111100000000000000000000111110000000000000000000000000000000000000000000000000000000000000000000000001111100000000000000000000011110000000000000000000001111100000000000000000000000000000000000000000000000000000000000000000000000011111000000000000000000000011000000000000000000000011111000000000000000000000000000000000000000000000000000000000000000000000000111110000000000000000000000000000000000000000000000111110000000000000000000000000000000000000000000000000000000000000000000000001111100000000000000000000000000000000000000000000001111100000000000000000000000000000000000000000000000000000000000000000000000001111100000000000000000000000000000000000000000000111111000000000000000000000000000000000000000000000000000000000000000000000000011111000000000000000000000000000000000000000000001111100000000000000000000000000000000000000000000000000000000000000000000000000111110000000000000000000000000000000000000000000011111000000000000000000000000000000000000000000000000000000000000000000000000001111110000000000000000000000000000000000000000001111110000000000000000000000000000000000000000000000000000000000000000000000000001111100000000000000000000000000000000000000000011111000000000000000000000000000000000000000000000000000000000000000000000000000011111000000000000000000000000000000000000000000111110000000000000000000000000000000000000000000000000000000000000000000000000000111111000000000000000000000000000000000000000011111100000000000000000000000000000000000000000000000000000000000000000000000000000111111000000000000000000000000000000000000001111110000000000000000000000000000000000000000000000000000000000000000000000000000001111110000000000000000000000000000000000000011111100000000000000000000000000000000000000000000000000000000000000000000000000000001111110000000000000000000000000000000000001111110000000000000000000000000000000000000000000000000000000000000000000000000000000001111110000000000000000000000000000000000011111100000000000000000000000000000000000000000000000000000000000000000000000000000000011111100000000000000000000000000000000001111110000000000000000000000000000000000000000000000000000000000000000000000000000000000011111100000000000000000000000000000000111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111100000000000000000000000000000011111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111100000000000000000000000000001111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111100000000000000000000000000111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111100000000000000000000000011111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111110000000000000000000011111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111110000000000000000001111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111110000000000000000111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111000000000000111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111000000000011111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111100000011111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111110011111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
#include <Wire.h>
#include <U8g2lib.h>
U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE);
u8g2_uint_t offset;
u8g2_uint_t width;
void setup() {
u8g2.begin();
u8g2.setFont(u8g2_font_ncenB08_tr);
u8g2.setFontRefHeightExtendedText();
u8g2.setDrawColor(1);
u8g2.setFontPosTop();
u8g2.setFontDirection(0);
}
void loop() {
u8g2.clearBuffer();
u8g2.drawStr(0,0,"test");
u8g2.sendBuffer();
delay(500);
u8g2.clearBuffer();
for(int i = 0; i <= tmp.length(); i++){
int x = i % 128;
int y = i / 128;
if(tmp[i] == '1'){
u8g2.drawPixel(x,y);
}
}
u8g2.sendBuffer();
delay(500);
}
I had to cut the length of the string because of the forums limitation.