Hello. Those of you with Arduino and TFT display are probably well acquainted with the example that comes with most libraries that loads a bmp from sd card and displays it. I decided to ad touchscreen functionality to this sketch. Once the first image is loaded and displayed, the program waits for the user to tap the screen to load the next image. After learning how to accept input from the touch screen, I decided to try something more exciting. I wanted to load a full size image (one larger than the 320 by 240 display and tap the screen in the appropriate region to scroll in that direction. I am working on scrolling to the left in portrait mode. The program scrolls one screen width (240 pixels) to the left and displays the next section of the image. But if I go beyond one screen width (if I tap again) the scan lines are jumbled and out of order and misplaced on the screen. As if it has lost its place in the bmp file. I just can't figure it out. I have attached the code of the entire program. If you put a large image on a sd card in a directory called "fullsize," you can try it out. The code comes from the library MCUFRIEND_kbv for ili9341 2.4 lcd examples. I am using a touch shield version with arduino uno. A small edit will allow you to have the touchscreen enabled slide show for normal sized (240x320) images. I already have that working. I think the function showBMP is losing its place in the row/ column bits of the bmp file. But I can't fix it.
Level: New Member
Joined: Mon. Nov 13, 2017
Posts: 9 View posts
Last Edited: Wed. Nov 29, 2017 - 06:03 AM