I downloaded this library a couple days ago and am having a blast with it! It is the most comprehensive and flexible display library I've seen.
However, I'm having a bit of trouble doing some simple stuff.
I'm basically trying to get my screen to plot the input of the ADC; a line over time, sort of like the way an oscilloscope scans when the time/div is big enough. Or how an EKG display refreshes (which is what my application is.) I was previously doing this with a generic parallel GLCD using the GLCD library. Here's how I was doing it:
int xPos = 0; // X position value.
int pot; // Potentiometer value.
for(xPos = 0; xPos < 127; xPos += 1)
pot = analogRead(A0); // Sample ADC
pot = map(pot, 0, 1023, 0, 63); // Scale down readings to LCD's vertical pixel count.
GLCD.DrawVLine(xPos, 0, 63, WHITE); // Erase column of pixels previously set.
GLCD.SetDot(xPos, pot, BLACK); // Set new pixel.
} // End FOR statement.
if(xPos == 127)
xPos = 0; // Return to the first column when the last column is reached.
} // End IF statement.
} // End void loop()
I changed this to fit the profile of this library by doing away with the For loop and fitting it in a Do While, changing the functions, so on. (I'd post it, but it appears that I didn't save it
) It of course doesn't work since this library (to my understanding) rewrites the entire screen each time it cycles rather than just the pixels specified in the functions. Instead, it just scans a single pixel.
I guess what I'm asking is for some insight on how I might be able to get this library to continuously draw without necessarily rewriting the entire display, if that's possible in the first place.
If I must rewrite the full display, I guess I could store all 128 columns in an array and write them all over every time I refresh. I'm not sure how efficient that is, though.