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

 Search Forum.. 
 Creat New Topic   Reply 


Is there any way to increase drawing speed? I'm using the 320x240 IPS touchscreen, and drawing even a small filled rect (FR) is very slow, and not usable for quickly drawing UI elements between screens.


If you need a filled rectangle, use drawing window, then clear the drawing window with a back ground color, it is faster than regular filled rectangle function.

Rectangle function is operated pixel by pixel, and also affected by the line pattern, but clearing draw window only fill the memory with special value, so, it should be faster.


 That's much faster, thanks!



I would also like to use this function! Can you please post this code example here? Please!!!!

Thank you very much!


#define LCDWidth 240  //define screen width,height
#define LCDHeight 320
#define _Digole_Serial_I2C_  //To tell compiler compile the special communication only, 
//#define TOUCH_SCEEN   //if the module equipt with touch screen, use this, otherwise use // to disable it
//#define FLASH_CHIP    //if the module equipt with 2MB or 4MB flash chip, use it, otherwise  use // to disable it
#define V33           //if the version of firmware on display is V3.3 and newer, use it
//all available are:_Digole_Serial_UART_, _Digole_Serial_I2C_ and _Digole_Serial_SPI_
//end changing
//define 8 bit color, see:https://en.wikipedia.org/wiki/8-bit_color
#define WHITE 0xFF
#define BLACK 0
#define RED 0xE0
#define GREEN 0x1A
#define BLUE 0x03
//define draw window
#define DW_X 5
#define DW_Y 8
#define DW_W (LCDWidth - 10)
#define DW_H (LCDHeight - 15)
#include <DigoleSerial.h>
//--------UART setup
#if defined(_Digole_Serial_UART_)
DigoleSerialDisp mydisp(&Serial, 9600); //UART:Arduino UNO: Pin 1(TX)on arduino to RX on module
//--------I2C setup
#if defined(_Digole_Serial_I2C_)
#include <Wire.h>
DigoleSerialDisp mydisp(&Wire, '\x27'); //I2C:Arduino UNO: SDA (data line) is on analog input pin 4, and SCL (clock line) is on analog input pin 5 on UNO and Duemilanove
//--------SPI setup
#if defined(_Digole_Serial_SPI_)
DigoleSerialDisp mydisp(8, 9, 10, 11); //SPI:Pin 8: data, 9:clock, 10: SS, 11:SI. you can assign 255 to SS, and hard ground SS pin on module
int x,y,r,r1;
void setup() {
  mydisp.begin(); //initiate serial port
void draw_Filled_Rectangles_Fast(void)
    mydisp.cleanDrawWindow(); //clear draw window use the new back ground color
  mydisp.drawStr(0, 0, "Draw filled rectangle use draw window");
  for (i = 0; i < 20; i++)
#ifdef V33
    x = random(15, DW_W - 10);//top-left position
    y = random(DW_H - 10);
    r = random(DW_W - x);//width
    r1 = random(DW_H - y);//height
    mydisp.setDrawWindow(x, y, r, r1); //draw a filled rectangle:x,y,width,height
    mydisp.cleanDrawWindow(); //clear draw window use the new back ground color


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