Pages: 1 ... 14 15 [16]   Go Down
Author Topic: U8glib: Graphics Lib for LCDs and OLEDs  (Read 49380 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, the listing file would be nice to see.
Depending on the fonts U8glib requires about 10K. If you do not need ASCII chars with code higher than 127, then fonts with a "r" postfix can be used to reduce flash memory.
Also other libraries and the use of floating point are common reasons for increased memory usage.

Oliver

Do you think doing this procedure would help me to reduce the size to possibly upload the code to an ATtiny85? If so, how can I do this procedure?

Thanks in advance! =D
Logged

Germany
Offline Offline
Edison Member
*
Karma: 137
Posts: 1515
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

In the HelloWorld example, line 130, replace
Code:
u8g.setFont(u8g_font_unifont);
with
Code:
u8g.setFont(u8g_font_unifontr);
Try to upload this example. If you get the same errors, then u8glib might be to big for the Attiny85.

Oliver
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the "r"!!

I tried to compile (just compile, Ctrl + R) the "Hello World" from the u8glib and i get the following results, according to the board i've choosen:

Board:::::::::::::Result
Arduino Uno: Compiling successful
Arduino Nano w/ ATMega328: Compiling successful
ATtiny85 (internal 1 MHZ clock):
Code:
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr25/crttn85.o: In function `__vector_default':
(.vectors+0xa): relocation truncated to fit: R_AVR_13_PCREL against symbol `__vector_5' defined in .text.__vector_5 section in core.a(wiring.c.o)
core.a(main.cpp.o): In function `main':
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/main.cpp:15: relocation truncated to fit: R_AVR_13_PCREL against undefined symbol `serialEventRun()'
ATtiny85 (internal 8 MHZ clock):
Code:
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr25/crttn85.o: In function `__vector_default':
(.vectors+0xa): relocation truncated to fit: R_AVR_13_PCREL against symbol `__vector_5' defined in .text.__vector_5 section in core.a(wiring.c.o)
core.a(main.cpp.o): In function `main':
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/main.cpp:15: relocation truncated to fit: R_AVR_13_PCREL against undefined symbol `serialEventRun()'

I have followed this tutorial to use my Arduino as ISP for the ATtiny: http://highlowtech.org/?p=1695

Thanks again!
Logged

Germany
Offline Offline
Edison Member
*
Karma: 137
Posts: 1515
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

Somehow the error messages sounds like, that the sketch is still to big. But again, i am not an expert for the Attiny45. It seems to be more often discussed in " Arduino Forum :: Using Arduino :: Microcontrollers".

Oliver
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, thanks for your help! ^^
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi


Amazing Library, I am using it with a small OLED display I bought from eBay:
http://www.ebay.com/itm/121288137874

I chose U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE) and it works perfectly.


Thank you for creating it.


May I ask you,
the webstore ElectroDragon sells 2 LCD-TFT Displays:




http://www.electrodragon.com/?product=eds-tft-lcd-lcm-spi-interface-variable1-82-2



The left one is 1.8",
the right one is 2.2".


I bought the 1.8" one, and according to their Wiki page, it is based on ST7735S.
http://www.electrodragon.com/w/EDS_TFT_LCD_LCM_SPI_Interface


Does U8glib support that display too?

From the list of classes, I did not find that chip,
but maybe it's another name?


Thank you
« Last Edit: September 15, 2014, 12:53:40 pm by card5 » Logged

Germany
Offline Offline
Edison Member
*
Karma: 137
Posts: 1515
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

Thanks.

The question regarding color displays  came up very often. I finally decided to split off color displays and created Ucglib: https://code.google.com/p/ucglib/.

It has some small differences: I removed the "picture loop" (because it does not make sense for color TFTs/OLEDs), added true color support to all graphics primitives and updated the fonts a little bit (actually i replaced one of the fonts with another font).

Ucglib has its own thread here: http://forum.arduino.cc/index.php?topic=214966.0

Ucglib is quite young and it does not have the popularity as UTFT or the Adafruit Lib, But Ucglib is infact U8glib for color displays, especially for those users, who do not want to miss a large collection of fonts and an online documentation.

Oliver



Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great,
I will wait for the display from ElectroDragon to arrive, and then use Ucglib.

Thank you for creating them smiley
Logged

Pages: 1 ... 14 15 [16]   Go Up
Jump to: