Modified Bob Stone's code for ILI9341 QVGA TFT's without touch capability. Navigation is now done with rotary encoders - two for position, & one setting the maxiterations.
Dependencies: SPI_TFT_ILI9341 TFT_fonts mbed
Fork of Mandelbrot by
Should have mentioned in the above: Encoder code is specific to the STM32F4, tested on Nucleo F401, should work on the Nucleo F411..
Diff: main.cpp
- Revision:
- 1:a9641f372bea
- Parent:
- 0:a954bd7fd162
- Child:
- 2:b1169b84a563
--- a/main.cpp Sat Apr 13 19:27:43 2013 +0000 +++ b/main.cpp Wed Apr 17 18:14:12 2013 +0000 @@ -100,7 +100,8 @@ //Set new centre and zoom p = tt.to_pixel(p); centrex += (2.0 * p.x - WIDTH) / (zoom * WIDTH); - centrey += (2.0 * p.y - HEIGHT) / (zoom * HEIGHT); + centrey += (2.0 * p.y - HEIGHT) / (zoom * WIDTH); zoom *= 4.0; + tt.rect(p.x - WIDTH / 8.0, p.y - HEIGHT / 8.0, p.x + WIDTH / 8.0, p.y + HEIGHT / 8.0, Yellow); } } \ No newline at end of file