Closed MechaPhoton closed 4 months ago
It is difficult to support any none-Arduino IDE, but here are some ideas:
void loop() {
u8g2.clearDisplay();
u8g2.drawHLine(1,1,10);
u8g2.drawHLine(1+5,2,5);
u8g2.setFont(u8g2_font_ncenB10_tr);
u8g2.drawStr(0,24,"Hello World!");
u8g2.sendBuffer();
}
Try to add a delay, just to see, whether the flashing was caused by the same code.
Another test could be to repeat the begin statements, like this:
void loop() {
u8g2.begin();
u8g2.setContrast(180);
u8g2.setFont(u8g2_font_6x10_tf);
u8g2.setFontRefHeightExtendedText();
u8g2.setDrawColor(1);
u8g2.setFontPosTop();
u8g2.setFontDirection(0);
u8g2.clearDisplay();
u8g2.drawHLine(1,1,10);
u8g2.drawHLine(1+5,2,5);
u8g2.setFont(u8g2_font_ncenB10_tr);
u8g2.drawStr(0,24,"Hello World!");
u8g2.sendBuffer();
}
One more point: "SPI.setCS(5);" should not be used. There might be a conflict with the CS signal from U8g2 and the hardware generated CS signal from the SPI interface. So it is probably better to disable hardware chip select.
Thank you for getting back to me Oli, and thank you for an excellent library. It is working correctly in Arduino IDE which is good enough for now. I'm also using MUIU8g2 in my project and it is making it so easy. I couldn't be happier.
feel free to close.
Hi, I'm having some issues with my LCD, using the hello world example the text is briefly visible but after a fraction of a second is replaced by a solid white screen and never returns. my neopixel backlights are working correctly.
LCD:fystec mini 12864 v2.1 LCD controller: ST7567 IDE: vscode extension: platformIO board: pico
link to LCD board circuit
plaformio.ini
main.cpp
what I tried next is to use the porting instructions mentioned in issue 2159 however this gives me the same behavior.
same platformio.ino
main.cpp
some differences between my failed attempt and issue 2159 successful solution that I've identified: I am using platform io and they are using pico SDK I am using st7567 vs SSD1305 In their provided image they don't appear to have the reset pin plugged in to Pico pin 11 I am using draw_display in my void loop(), which I understand to be the equivalent of their int main(), whereas they are using display_sequence(); I do not have stdio_init_all(); in my loop(), this function is not supported by earlephilhower core.
maybe I need to change something in my u8x8_byte_pico_hw_spi or u8x8_gpio_and_delay_pico to account for the difference in LCD's maybe I need to change something in u8x8_d_st7567.c to account for the specifics of this board.
I have tried changing the draw color to 0 I have tried without the delay(100) in loop() I have tried with display_sequence() in loop()
any help appreciated, thank you.