I'm displaying lines on a tft LED screen using a for loop..
Ive read many of the blink without delay tutorials but none seem to fit my needs here or I'm just not getting it.
example code below..
for(int i = 0; i<=34; i++){
tft.drawLine(i, y,x2, y2, TFT_YELLOW);
Now before I display the next 'i' I must erase the previous Line with a delay(22)..
delay(22); //this prevents screen flicker
tft.drawLine(i, y,x2, y2, TFT_BLACK);
I've been trying to implement millis to replace the delay but am not having much success.
My code will run in
void loop()
but the delay is stopping other functions from running during the delay(22) period.
Where do I place the standard millis code in my function?
Thanks