36 epd = il3820_init(0, 1, 2, 3, 4, 5, 128, 296);
37 fillRoundRect(epd, 30, 30, 30, 30, 5, 0);
39 setDisplayRotation(epd, 1);
40 drawLine(epd, 0,0,50,0, 0);
42 fillRect(epd, 20, 20, 60, 60, BLACK);
44 drawRect(epd, 22, 22, 56, 56, INVERSE);
46 fillCircle(epd, 50, 50, 20,
WHITE);
47 drawCircle(epd, 50, 50, 18, BLACK);
48 fillCircle(epd, 50, 50, 16, BLACK);
49 drawCircle(epd, 50, 50, 14,
WHITE);
51 setCursor(epd, 10, 5, 0);
53 drawPrint(epd,
"Screen Testing 0123456789");
55 setCursor(epd, 20, 90, 0);
58 drawPrint(epd,
"Font Size Test");
60 for (
int t = 0; t < getDisplayHeight(epd); t+=10) {
64 for (
int t = 0; t < getDisplayWidth(epd); t+=10) {
77 setDisplayRotation(epd, 0);
79 for (
int i = 1; i < 4; i++)
81 for (
int r = 0; r < 4; r++)
83 for (
int o = 0; o < getDisplayWidth(epd); o += 10) drawFastVLine(epd, o, 0, getDisplayHeight(epd), BLACK);
84 for (
int o = 0; o < getDisplayHeight(epd); o += 20) drawFastHLine(epd, 0, o, getDisplayWidth(epd), BLACK);
88 setCursor(epd, 0, 0, 0);
90 drawNumber(epd, 28, DEC);
92 drawNumber(epd, -28, DEC);
94 drawNumber(epd, -28, HEX);
96 drawNumber(epd, 28, BIN);
97 drawNumber(epd, 28, OCT);
99 drawNumber(epd, -36.93715, 2);
101 for (
int xy =
'A'; xy <=
'Z'; xy++)
118 for(
int r = 0; r < 4; r++)
120 il3820_setRotation(r);
122 for(
int o=0; o<il3820_getWidth(); o+=10) il3820_drawFastVLine(o, 0, il3820_getHeight(), BLACK);
123 for(
int o=0; o<il3820_getHeight(); o+=20) il3820_drawFastHLine(0, o, il3820_getWidth(), BLACK);
125 for(
int df = -20; df < 120; df += 10) il3820_drawLine(df, 40, 40, 120 - df, BLACK);
126 il3820_updateDisplay();
129 il3820_clear(0,0,il3820_getWidth(),il3820_getHeight());
163 for(
int r = 0; r < 4; r++)
165 il3820_setRotation(r);
167 for(
int o=0; o<il3820_getWidth(); o+=10) il3820_drawFastVLine(o, 0, il3820_getHeight(), BLACK);
168 for(
int o=0; o<il3820_getHeight(); o+=20) il3820_drawFastHLine(0, o, il3820_getWidth(), BLACK);
171 il3820_drawLine(1, 1, 20,20,
WHITE);
173 il3820_drawLine(20, 20, 30, 10,
WHITE);
175 il3820_drawLine(30, 10, 45, 80, BLACK);
176 il3820_drawLine(45, 80, 125, 30, BLACK);
177 il3820_drawLine(125, 30, 45, -5, BLACK);
178 il3820_drawLine(45, -5, -10, 20, BLACK);
180 il3820_updateDisplay();
183 il3820_clear(0,0,il3820_getWidth(),il3820_getHeight());
190 for(
int r = 0; r < 4; r++)
192 il3820_setRotation(r);
194 for(
int o=0; o<il3820_getWidth(); o+=10) il3820_drawFastVLine(o, 0, il3820_getHeight(), BLACK);
195 for(
int o=0; o<il3820_getHeight(); o+=20) il3820_drawFastHLine(0, o, il3820_getWidth(), BLACK);
197 il3820_drawCircle(10, 10, 5, BLACK);
pause(5);
198 il3820_drawCircle(15, 20, 10, BLACK);
pause(5);
199 il3820_drawCircle(20, 30, 15, BLACK);
pause(5);
200 il3820_drawCircle(25, 40, 20, BLACK);
pause(5);
201 il3820_drawCircle(30, 50, 25, BLACK);
pause(5);
202 il3820_updateDisplay();
205 il3820_clear(0,0,il3820_getWidth(),il3820_getHeight());
212 for(
int r = 0; r < 4; r++)
214 il3820_setRotation(r);
216 for(
int o=0; o<il3820_getWidth(); o+=10) il3820_drawFastVLine(o, 0, il3820_getHeight(), BLACK);
217 for(
int o=0; o<il3820_getHeight(); o+=20) il3820_drawFastHLine(0, o, il3820_getWidth(), BLACK);
220 il3820_fillCircle(10, 10, 5, BLACK);
pause(5);
221 il3820_fillCircle(15, 20, 10, BLACK);
pause(5);
222 il3820_fillCircle(20, 30, 15, BLACK);
pause(5);
223 il3820_fillCircle(25, 40, 20, BLACK);
pause(5);
224 il3820_fillCircle(30, 50, 25, BLACK);
pause(5);
225 il3820_updateDisplay();
228 il3820_clear(0,0,il3820_getWidth(),il3820_getHeight());
233 for(
int r = 0; r < 4; r++)
235 il3820_setRotation(r);
237 for(
int o=0; o<il3820_getWidth(); o+=10) il3820_drawFastVLine(o, 0, il3820_getHeight(), BLACK);
238 for(
int o=0; o<il3820_getHeight(); o+=20) il3820_drawFastHLine(0, o, il3820_getWidth(), BLACK);
240 il3820_fillRect(10, 10, 5, 5, BLACK);
241 il3820_fillRect(15, 20, 10, 10, BLACK);
242 il3820_fillRect(20, 30, 15, 20, BLACK);
243 il3820_fillRect(25, 40, 20, 30, BLACK);
244 il3820_fillRect(30, 50, 25, 40, BLACK);
245 il3820_updateDisplay();
248 il3820_clear(0,0,il3820_getWidth(),il3820_getHeight());
251 for(
int r = 0; r < 4; r++)
253 il3820_setRotation(r);
255 for(
int o=0; o<il3820_getWidth(); o+=10) il3820_drawFastVLine(o, 0, il3820_getHeight(), BLACK);
256 for(
int o=0; o<il3820_getHeight(); o+=20) il3820_drawFastHLine(0, o, il3820_getWidth(), BLACK);
258 il3820_fillRoundRect(10, 10, 5, 5, 5, BLACK);
259 il3820_fillRoundRect(15, 20, 10, 10, 5, BLACK);
260 il3820_fillRoundRect(20, 30, 15, 20, 5, BLACK);
261 il3820_fillRoundRect(25, 40, 20, 30, 5, BLACK);
262 il3820_fillRoundRect(30, 50, 25, 40, 5, BLACK);
263 il3820_updateDisplay();
266 il3820_clear(0, 0, il3820_getWidth(), il3820_getHeight());
273 il3820_setRotation(0);
274 il3820_setTextSize(1);
275 il3820_setTextFont(1);
276 il3820_setCursor(0, 0, 0);
277 il3820_drawText(
"Done.\n");
278 il3820_updateDisplay();
283 #endif // TEST_IT_ALL