Show Posts
Pages: 1 [2] 3 4 ... 83
16  Using Arduino / Displays / Re: help lcd on: April 17, 2014, 02:52:06 am
This is a "controller-less" display. There is no library for the Arduino and controlling such a display is almost impossible.

Oliver
17  Using Arduino / Displays / Re: A new Color OLED and TFT Library... on: April 17, 2014, 12:13:07 am
1) Frame around string:
You are a right, the "getStrWidth()" function is missing, correct?
As a workaround use:
ucg_GetStrWidth(ucg.getUcg(), const char *s);

2) Abstract class
This is already implemented for Ucglib and U8glib, although it is not done in C++.  I started to document this interface here: http://code.google.com/p/u8glib/wiki/devicedesign

Oliver

Edit: I have created issue 20 for the missing getStrWidth function. Thanks for this.
18  Using Arduino / Displays / Re: A new Color OLED and TFT Library... on: April 16, 2014, 02:16:24 pm
Let me start to answer your question on the last section: The calculation of a frame around a string is discussed here for U8glib: http://code.google.com/p/u8glib/wiki/tstring. It should be the same for Ucglib, although function names might differ a little bit.

I agree to your other statements. But i would call it an impossible task to create a generic open source graphics library. As an open source project, there is no budget to buy all the different hardware. I had some fun to buy new displays and spent time to make it work with U8glib, but my resources are limited. Same applies to Ucglib also. I rewrote Ucglib based on the sources of U8glib, but i also tried to improve the architecture and the commands. So some differences are there.
U8lib is optimized for monochrome displays.
Ucglib is optimized for true color displays.

M2tklib is even more complicated. I tried to make it as portable as possible, but i also see some limitations meanwhile.

Oliver

19  Using Arduino / Displays / Re: A new Color OLED and TFT Library... on: April 16, 2014, 12:45:29 am
Thanks

Yes, i plan to add support for Ucglib in M2tklib, however i did not find time to do so.

In prinziple, you need to write a graphics procedure, like for example this: http://code.google.com/p/m2tklib/source/browse/dev/glcd/m2ghglcdffs.cpp

From a long term perspective, I will probably remove color support in U8glib. U8glib is optimized for monochrome devices and the software architecture of U8glib does  not support color devices very well.

Oliver
20  Using Arduino / Displays / Re: Hebrew support for oled(ssd1306) on: April 12, 2014, 12:04:24 pm
Looks correct, which U8glib constructor did you use?
This display requires this constructor:
Code:
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NO_ACK);

Oliver
21  Using Arduino / Displays / Re: Hebrew support for oled(ssd1306) on: April 12, 2014, 11:36:41 am
Well I don't know,it's just doesn't work smiley-confuse
Did you try U8glib? What is your Arduino board? How did you wire the OLED?

Oliver
22  Using Arduino / Displays / Re: Hebrew support for oled(ssd1306) on: April 12, 2014, 10:57:58 am
Oh, my mistake. Replace SPI by I2C.
U8glib supports SPI but also Hardware I2C for this controller. In fact, this display should be supported by U8glib. See also the gallery page: http://code.google.com/p/u8glib/wiki/gallery and the related discussion here: http://forum.arduino.cc/index.php?topic=219419.0.

However Software I2C is not supported by U8glib, so my question should be: What is the reason that you can not use Hardware I2C?

Oliver
23  Using Arduino / Displays / Re: Hebrew support for oled(ssd1306) on: April 12, 2014, 05:58:41 am
U8glib only supports HW SPI (https://code.google.com/p/u8glib/wiki/device).

Why can't you use HW SPI?

Oliver
24  Using Arduino / Displays / Re: Hebrew support for oled(ssd1306) on: April 10, 2014, 04:46:11 pm
Hi

I put together unifont codes 0x0000 ... 0x007f and 0x0580 ... 0x05ff into one u8glib font (u8g_font_unicode_0_11.c). This font can be set with the command "u8g.setFont()". The font itself can be pasted directly into the .ino file.

The result of
Code:
u8g.drawStr(&u8g, 0, 20, "ALEF:\xd0 BET:\xd1");
can be seen in the attached png file.

Oliver
25  International / Deutsch / Re: Problem mit GLCD on: April 06, 2014, 11:40:57 pm
Alternativ könnte das Display auch direkt an den Arduino angeschlossen werden. Für den KS0108 controller gibt es einige funktionsfähige Libs (openGLCD, U8glib). Allerdings werden dann recht viele Leitungen benötigt.

Oliver
26  International / Deutsch / Re: 2.4" SPI Touchscreen Display von Eckstein-Komponente: Verbindung herstellen on: April 06, 2014, 03:14:06 pm
Das von Dir gekaufte Display läßt sich so nur im parallel Mode betreiben, auch wenn der Chipsatz theoretisch SPI unterstützt. Hinzu kommt noch, daß man möglicherweise ein Adapterboard braucht, wenn man das Display an 5V Boards wie dem Uno oder Mega betreiben will. Und schließlich gibt es (soweit ich weiss) keine Lib, die dieses Display im SPI Mode unterstützen würde.

Um also das Display zum Laufen zu bekommen, braucht man entweder einen Due oder ein Adapterboard oder ganz viele Pegelwandler. Da ist dann schon die Frage, ob man nicht ein Board/Display nimmt, das von Haus aus SPI unterstützt.

Ich hatte mal einen kleinen Report mit SPI displays zusammengestellt. Inklusive "Straßenpreisen"...
http://forum.arduino.cc/index.php?topic=222327.msg1617891

Als Tip: Displaymodule auf Basis des ST7735, wie hier zu sehen, haben oft einen eingebauten Pegelwandler und lassen sich direkt am Uno mit SPI betreiben. Neben einem Widerstand für die Hintergrundbeleuchtung braucht man dann keine weiteren Bauteile. Ausserdem funktioniert die Arduino interne TFT.h und das ganze kostet aus China nur ein drittel deines Displays. Bestellung und Lieferung via ebay.com klappten übrigens problemlos.


Oliver
 
27  Using Arduino / Displays / Re: DUE + u8glib + ssd1325 (NHD 12864 OLED) = slow refresh rate :( on: April 06, 2014, 08:47:26 am
Did you pull out the analogRead from the inner loop? But i agree, also with the analogRead inside the loop, it should be much faster.

I have not yet tested Arduino 1.5.6-r2 IDE. Latest tested release is 1.5.5

Oliver

28  Using Arduino / Displays / Re: DUE + u8glib + ssd1325 (NHD 12864 OLED) = slow refresh rate :( on: April 06, 2014, 08:16:02 am
Hi

Code:
U8GLIB_NHD27OLED_GR u8g(3, 4, 5, 6);   // SPI Com: SCK = 3, MOSI = 4, CS = 5, A0 = 6

HW and SW SPI is selected based on the number or arguments. With the constructor above, you will always select SW SPI.
HW SPI is only available at specific Pins of the Due (109 MOSI  and 110 clock, if i remember correctly). So you just need to remove the first two arguments and reconnect SCK and MOSI:

Code:
U8GLIB_NHD27OLED_GR u8g(5, 6);   // HW SPI, CS = 10, A0 = 9

The other slow down is caused by the fact that the analog read is part of your picture loop:
A little bit simplified, your code looks like this:

Code:
void loop(void) {
  u8g.firstPage();
  do {
    sensorValue = analogRead(A0);
    u8g.setPrintPos(80, 62);
    u8g.print(sensorValue);
  } while( u8g.nextPage() );
}

Instead do this:
Code:
void loop(void) {
  sensorValue = analogRead(A0);
  u8g.firstPage();
  do {
    u8g.setPrintPos(80, 62);
    u8g.print(sensorValue);
  } while( u8g.nextPage() );
}

Details on the picture loop are given here: https://code.google.com/p/u8glib/wiki/tpictureloop

Additional speedup is possible (but also more RAM will be used) with the 2X constructor.

Hope this helps to solve your performance problems.

Oliver

29  Using Arduino / Displays / Re: DUE + u8glib + ssd1325 (NHD 12864 OLED) = slow refresh rate :( on: April 06, 2014, 03:33:25 am
Hi

Which is the actual U8glib constructor you use?
U8glib supports HW SPI with the DUE, but these pins are only available on the ISP header.

Another cause for a slowdown often is to call analog read inside the u8glib "picture loop". Sequence should be:
a) read analog value
b) store the value in a variable
c) execute picture loop, output value from variable

Maybe you can also post your code for further discussion.

Oliver
30  Using Arduino / Displays / Re: Library for the NHD12232KZ on: April 04, 2014, 12:26:07 pm

Should be supported by U8glib (http://code.google.com/p/u8glib/).

Uncomment and use this constructor:
U8GLIB_SBN1661_122X32(d0, d1, d2, d3, d4, d5, d6, d7, cs1, cs2, di, rw [, reset])

Oliver
Pages: 1 [2] 3 4 ... 83