Example drawing mandelbrot on the RA8875 with touch to zoom in or out. Touch and hold > 4s to zoom out, touch to zoom in.
Saw the nice mandelbrot demo from Bob Stone and leverage it to use this library.
Diff: main.cpp
- Revision:
- 2:feda27c3a523
- Parent:
- 1:14319ec53540
- Child:
- 4:857e3bf77211
--- a/main.cpp Thu Jan 15 12:37:13 2015 +0000 +++ b/main.cpp Fri Dec 18 00:05:21 2015 +0000 @@ -94,8 +94,8 @@ pc.printf("\r\nRA8875 Portrait Mode Dev. - Build " __DATE__ " " __TIME__ "\r\n"); pc.printf("Press 'P' to PrintScreen as bmp on local file system\r\n"); + lcd.init(); lcd.frequency(10000000); - lcd.init(); width = lcd.width(); // Could have set the dimensions, let's just adapt. height = lcd.height(); @@ -152,6 +152,7 @@ zoom *= 4.0; lcd.rect(p.x - width / 8.0, p.y - height / 8.0, p.x + width / 8.0, p.y + height / 8.0, Yellow); + wait_ms(100); } waitingOnUser = false; }