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 

noticable screen flash on update

Hi, I just recently bought 2 of the 1.8" OLED DS160128COLED-35 panels.

I am using arduino via i2c. I have mode set to C   mydisp.setMode('C'); 

I am using the display to show a bar graph (solid box).

On each update I clear the screen and then execute the box command

mydisp.clearScreen();

mydisp.drawBox(0, 30, 120, 60);

This update happens each time an anlog value changes and requires me to update my bar graph.

What I noticed, is that on each update the screen noticable flashes. IANy tips on how to update my bar graph with without the noticable screen flash?

Thanks

-AL

RE:noticable screen flash on update

You can set color to 0, and draw a box to erase the area, don't use clear scree on your application.

RE:noticable screen flash on update

Hi Victor,

I tried this as well. Seems to work ok on one or two horizontal bar graphs(boxes). But is terrible on vertical ones. The more verical bar graphs I have to update, the worse it is. I have 5 vertical bar graphs and each gets updated when a value changes, using the black box method works better than clear screen on 1 update, but as soon as I have to update more than one at the same time it is as bad as clear screen. Any other suggestions?

Last question, does Digole have a graphic display that works well in full sun light? Turns out these OLED ones blow in full sun light. So they will be used for another project. Maybe standard monochrome displays will update cleaner?!?

 

Thanks

-AL

RE:noticable screen flash on update

 We suggest you do like this:

eg.: if the old bar is 10 pixels height, and this time you only need 8 pixels height, just draw a black bar with 2 pixels height form pixel 9 to 10.

if the old bar is 8 pixels height, and you need 10 pixels height now, draw additional 2 pixels bar as normal.

so, you need calculate the different between old bar and new bar.

If you want to use the display under sun light, we have regular LCD module for your choice.

Thanks,

RE:noticable screen flash on update

made modifications to my code to do incremental bar graph additions/reductions.

This seems to do the trick...A lttle more work than I wanted to do, to just display 4 bar graphs...but hey it is what it is.

 

Now riddle me this...I print some text using   mydisp.drawStr(0, 0, charBuf);

charBuf is a length of 5.

If I try to print another string right behind it, it seems to fall to the next line, even though both easily fit on the same line

Ex: charBuf1¨[5] = "Hello"  , charBuf2¨[5] = "World"

mydisp.drawStr(0, 0, charBuf1);

mydisp.drawStr(80, 0, charBuf2);

//the above two drawStr will force second one to wrap, regardless if only one char or five

Now if I combine both chars and print, they easily fit on the same line.

charBuff[11]="Hello World"

mydisp.drawStr(0, 0, charBuf);

 

Any tips as to why it would be wrapping. Even tried setPrintPos(x,y) and then print(string) , but it also wraps.

 

RE:noticable screen flash on update

define a string: unsigned char a[5]="hello" is not correct, it will remove the termial mark, the terminal mark is value of 0, the correct is:

unsigned char a[]="hello", or unsigned char a[6]="hello", all string must be endded by the terminal mark.

RE:noticable screen flash on update

Hi Victor, I appreciate your help.

However it does not seem to work right

Example1)

   mydisp.begin();
  mydisp.clearScreen();
  mydisp.displayConfig(0);
  mydisp.disableCursor();
  mydisp.setMode('C');
  mydisp.clearScreen();
   char a[]="hello";
   char b[]="world";
  mydisp.drawStr(0, 0, a);         //write hello at x=0 y=0
  mydisp.drawStr(0, 40, b);      //write world at x=0 y=40  40px lower

Observations: Screen prints Hello, but not World

 

Example 2)

   mydisp.begin();
  mydisp.clearScreen();
  mydisp.displayConfig(0);
  mydisp.disableCursor();
  mydisp.setMode('C');
  mydisp.clearScreen();
   char a[6]="hello";
   char b[6]="world";
  mydisp.drawStr(0, 0, a);         //write hello at x=0 y=0
  mydisp.drawStr(0, 40, b);      //write world at x=0 y=40  40px lower

Observations: Screen prints Hello, but not World

 

Example 3)

   mydisp.begin();
  mydisp.clearScreen();
  mydisp.displayConfig(0);
  mydisp.disableCursor();
  mydisp.setMode('C');
  mydisp.clearScreen();
   char[] a="hello";
   char[] b="world";
  mydisp.drawStr(0, 0, a);         //write hello at x=0 y=0
  mydisp.drawStr(0, 40, b);      //write world at x=0 y=40  40px lower

Observations: ERROR expected unqualified-id before '[' token

 

Example 4)

   mydisp.begin();
  mydisp.clearScreen();
  mydisp.displayConfig(0);
  mydisp.disableCursor();
  mydisp.setMode('C');
  mydisp.clearScreen();
  unsigned char a[6]="hello";
  unsigned  char b[6]="world";
  mydisp.drawStr(0, 0, a);         //write hello at x=0 y=0
  mydisp.drawStr(0, 40, b);      //write world at x=0 y=40  40px lower

Observations: Invalid conversion from 'unsigned char*' to 'const char*'

 

 

So please show me an example of how I can write two pieces of texts in their expected locations.

I would like to be able to do over/under

  mydisp.drawStr(0, 0, a);         //write hello at x=0 y=0
  mydisp.drawStr(0, 40, b);      //write world at x=0 y=40  40px lower

and back to back

  mydisp.drawStr(0, 0, a);         //write hello at x=0 y=0
  mydisp.drawStr(80, 0, b);      //write world at x=80 y=0  80px mid-screen after first text

 

Thanks

-AL

RE:noticable screen flash on update

 Wrong papameters on drawStr, the drawStr takes row and colunm number, not pixel,

mydisp.drawStr(0,1,b); will work.

the display module will caculate the accurate position as pixels according the font that you currently set and the row/colunm number.

PS: if you want print the string at a position as pixel, you can use: mydisp.setTextPosAbs(x,y) function, this function takes x,y as pixel

RE:noticable screen flash on update

Thanks Victor, the setTextPosAbs was exactly what I was looking for.

Which Monochrom LCD do you recommend for bright sun light?

RE:noticable screen flash on update

 Almost all LCD display are good under sun light.

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