4display-shield-160 problem

Hi all.

Im using a 4display-shield-160 with a Mega ADK.

Im using the displayshield4d.h library from Brico Geek.

My code is as follows:

#include <displayshield4d.h>
DisplayShield4d  oled;

void setup()
{

  /* add setup code here */
	Serial.begin(57600);
	oled.Init();

}

void loop()
{

  /* add main program code here */

	oled.Clear();
	delay(2000);

	oled.setfont(OLED_FONT5x7);
	oled.setfontmode(OLED_FONT_TRANSPARENT);

	oled.drawstringblock(5, 5, 0, oled.RGB(255,255,255), 1, 1, "Test line #1");
	oled.drawstringblock(5, 18, 0, oled.RGB(255,255,255), 1, 1, "Test line #2");
	oled.drawstringblock(5, 41, 0, oled.RGB(255,255,255), 1, 1, "Test line #3");
	delay(2000);
	
}

The code compiles ok, and downloads to my board. When it runs however only the first and third lines are displayed on the screen. Have tried connecting an external powersupply and that doesnt help.

Anyone have any ideas please?

Thanks in advance.

I have stripped pieces out of that library so I haven't used it directly but one thought is that you are converting your colors on the fly. See what happens if you do:

unsigned int white = oled.rgb(255,255,255)

And replace that portion of your code with white. If that doesn't work, put a very slight delay in between the calls to drawstringblock. The Display takes a second to process the command you sent it and it might be missing that second one. Especially at 57600.

I had all of my standard colors call once and print to serial. Once I knew the values, I DEFINED them in the declarations section and stripped the code. The only one this wouldn't work for was Black which I call at setup for some reason, the string call does not like 0.