Modified N5110 Library
Fork of N5110 by
Diff: N5110.cpp
- Revision:
- 8:40abe5736eca
- Parent:
- 7:3010f24e0a81
- Child:
- 9:7701f0126ba7
diff -r 3010f24e0a81 -r 40abe5736eca N5110.cpp --- a/N5110.cpp Mon May 19 18:23:21 2014 +0000 +++ b/N5110.cpp Mon May 19 18:45:48 2014 +0000 @@ -261,4 +261,21 @@ buffer[i][j]=0; } } +} + +// function to plot array on display +void N5110::plotArray(float array[]) { + + int i; + + for (i=0; i<84; i++) { // loop through array + // elements are normalised from 0.0 to 1.0, so multiply + // by 47 to convert to pixel range, and subtract from 47 + // since top-left is 0,0 in the display geometry + setPixel(i,47 - (int) array[i]*47.0); + } + + refresh(); + + } \ No newline at end of file