Digole
Digital Solutions
iDigole Buyer ProtectioniDigole Buyer
Protection
My shopping cart
0 Items:
Secure Checkout
Top Rated Plus
Visit Our Live Auctions
99.9% Customer's Satisfaction
 
Forum : Digole Serial Display :

 Search Forum.. 
 Creat New Topic   Reply 

2.4 IPS, display background and text color programming problem

 Hello,

I am trying to do something (I thought), would be easy....

I want to display characters on the long side (rotation 1) with a completely blue background, with white letters (Arduino UNO)

But...I can't seem to figure out what I am doing wrong. Instead I get a black background, with dark blue letters. The background of the letters is in bright blue (but the rest of the display is black).

If I reset the UNO, the background becomes all light blue, with the letters staying dark blue.

Below is the code I use. Can anyone please help?

***************************************************************

 

#define SC_W 240 //screen width in pixels

#define SC_H 320  //screen Hight in pixels

#define _Digole_Serial_UART_

 

#include <DigoleSerial.h>

 

#if defined(_Digole_Serial_UART_)

DigoleSerialDisp mydisp(&Serial, 9600); //UART:Arduino UNO: Pin 1(TX)on arduino to RX on module

#endif

 

void setup()

{

mydisp.begin();

prepareScreen();

}

 

void loop()

{

 

void prepareScreen()  

{

mydisp.clearScreen(); //Clear screen

mydisp.setRotation(1);

mydisp.setBgColor(0x0b);

mydisp.setColor(0xff);

mydisp.setTextPosAbs(20, 30);

mydisp.print("This should be white on blue (and the whole background should be blue, but it is not!");

}

RE:2.4 IPS, display background and text color programming problem

 What's the firmware version on your module?
It seems V3.4 on your module, so, add this line at the top of your sketch:

#define Ver 34

Also move clearScreen after setBgColor, then the clearScreen function will use the BgColor to clear whole screen.
 

RE:2.4 IPS, display background and text color programming problem

That helped!!!!

But now rotation is not working...it stays in portrait mode instead of landscape....

 

Any ideas?

RE:2.4 IPS, display background and text color programming problem

 move setRotation after clearScreen,
clearScreen function will reset all parameters to default (such as direction, position, line pattern, current font, draw window, draw mode) and use current BgColor to fill the whole screen.
For more details, please refer to programmin manual.
 

RE:2.4 IPS, display background and text color programming problem

Thank you for your help.

I finally managed to make it work as intented.

But now I have a new problem... :-)

I read an potensiometer, that i map to some values and display that value on the lcd display.

The refresh rate (update) is super slow, and if i make sudden changes, strange characters are displayed (like "..ttx/.."

Is there any way to make this display refresh faster? I already tried serial 115200 instead of 9600, without any change.

 

Regards,

George

RE:2.4 IPS, display background and text color programming problem

 Your problem seems sent data to module too fast and the module can process data in time, then drive the receiving buffer overflowed.

Please consider the full screen updating rate should less 5 fps, but if you using a draw window to update content in a small area, the fresh rate could up to 8~15 fps.

Copyright Digole Digital Solutions, 2008-2017. All rights reserved.
Powered by Victor Sun