I bought this display:
It is a nice display to use, but is a little slow. Is there any way to speed it up?
My test code is below. To take 340 milli seconds to write 60 characters is quite a long time.
I already tried changing the I2C speed from 100k to 400k, and deleting the twi.o and wire.o files to force a recompile, but no change, so I guess the part that takes a long time is somewhere in the display or the display library.
#include <I2C_LCD.h>
I2C_LCD LCD;
byte I2C_LCD_ADDRESS = 0x51;
String line_1;
String line_2;
String line_3;
String line_4;
String line_1234;
unsigned long start = 0;
unsigned long finish = 0;
unsigned long total = 0;
void setup() {
Wire.begin();
LCD.CleanAll(WHITE);
}
void loop() {
line_1 = String(“Time to”);
do {
line_1 = String(" " + line_1);
} while (line_1.length() < 15);
line_2 = String(“print a”);
do {
line_2 = String(" " + line_2);
} while (line_2.length() < 15);
line_3 = String(“string”);
do {
line_3 = String(" " + line_3);
} while (line_3.length() < 15);
line_4 = String(total);
line_4 = String(line_4 + " milli sec");
do {
line_4 = String(" " + line_4);
} while (line_4.length() < 15);
line_1234 = String(line_1 + line_2 + line_3 + line_4);
LCD.FontModeConf(Font_8x16_1, FM_ANL_AAA, BLACK_BAC);
LCD.CharGotoXY(0, 0);
start = millis();
LCD.println(line_1234);
finish = millis();
total = finish - start;