hello david
thanks for response
i use the lcd according to link that you said , but it is so slowly,
for example when i want to draw a box , it take about 5 second !!!
what is wrong??
First off. Run every example from the u8g2 library. Select the appropriate constructor. It is nothing more than removing two Slash characters.
Study those examples that do the operations that you want to use.
If you have a problem, paste your code here.. Or attach a ZIP if it is too big.
Speed generally comes down to your program logic. I draw a pencil flowchart. Then hand-trace the logic flow. Read sensors at a sensible rate. Only update display when something has changed.
Sketch uses 32368 bytes (100%) of program storage space. Maximum is 32256 bytes. Global variables use 458 bytes (22%) of dynamic memory, leaving 1590 bytes for local variables. Maximum is 2048 bytes. Sketch too big
i only draw 4 frame and print some text on lcd for viewing a welcome screen and main screen.
how i can reduce sketch size??
2- When i plug the lcd to 5V DC power , i see this picture 1, and when i connect it to arduino to receive data i see picture 2. what is that 2 dark lines ???
As pointed out by David, there are too many different fonts. U8g and U8g2 includes a complete documentation of the fonts which includes the size of the font.
U8g2 has two more improvements over U8glib: Fonts are available in different sizes (different number of chars, like ranges from 32 to 127 or 32 to 255, etc). Furthermore U8g2 fonts are compressed to save another 20% to 50% of flash memory.
Hello every body.
After several effort , I couldn't reduce size of my sketch , then i decide to use arduino MEGA2560 for big Flash memory , also for speed up showing data on LCD , i switch LCD to parallel mode,
according to gallery · olikraus/u8g2 Wiki · GitHub i set PSB pin to 5V and RW pin to GND and in sketch i write this code ,U8G2_ST7920_128X64_1_8080 u8g2(U8G2_R0, 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 48, U8X8_PIN_NONE , 52);
but lcd show wrong character or don't show any thing , however arduino and other part work well (RTC SD card EEPROM).
May be definition is wrong??
Hello oliver, yes i use short wire , even i use clock example on the library and LCD work very very well , but another example or my sketch not working, i am confused , and don't know what i do it.
zed71220:
Hello oliver, yes i use short wire , even i use clock example on the library and LCD work very very well , but another example or my sketch not working, i am confused , and don't know what i do it.
thanks for your response .
Vahid
You mean, there are examples which work very good and other examples do not work?
Hello Oliver , Hello David
I come back again.
I purchase a new LCD for my new project , But i don't know how i configure it with u8g2 library.
This a link that i purchase my LCD : 404