Need Help, stuck on code!!!

Yes, if you are using the same library as I am, you can initialize the display with

 myGLCD.InitLCD(PORTRAIT);

to change the orientation.

I don’t think we’re using the same libraries. I use

#include <Adafruit_GFX.h>    // Core graphics library
//#include <Adafruit_TFTLCD.h> // Hardware-specific library
//Adafruit_TFTLCD tft(A3, A2, A1, A0, A4);
#include <MCUFRIEND_kbv.h>
MCUFRIEND_kbv tft;       // hard-wired for UNO shields anyway.
#include <TouchScreen.h>

I am using the UTFT library at http://www.rinkydinkelectronics.com/library.php?id=51

Thank you, but I am not very keen on chaning libraries right now, when I am so close to making it work. :D

I have a bad expiriance with the Arduino Due and libraries.

Broda: Thank you, but I am not very keen on chaning libraries right now, when I am so close to making it work. :D

I have a bad expiriance with the Arduino Due and libraries.

There isn't any reason to change if you have it working. In my case, I believe the UTFT library is the only one that supports my display module. I don't know about rotation in the Adafruit library. It should be possible, Adafruit stuff is usually very well written.

Yeah I found something trying to make it landscape.

Maybe you missed one of my previus posts, so I'll ask again, can i make the text that is red from the file and shown od the tft stay until keypress on my 4x4 keypad?

Broda: Yeah I found something trying to make it landscape.

Maybe you missed one of my previus posts, so I'll ask again, can i make the text that is red from the file and shown od the tft stay until keypress on my 4x4 keypad?

I saw it, but I'm puzzled by the question. Anything you write to the TFT stays there until you write something else, or clear the screen. Am I missing something?

Maybe it's the libraries but, if I don't put a delay or something it just blinks.

My bad i had na tft.reset line belove thats why it disapired. But I still like to change the text on the display on click.

At this point, it would be better if you could just post your new code, but the entire sketch please.

Here is the code I made the screen landscape, and everything Works, now only the 4x4 keypad.

sketch_may03a.ino (17 KB)

You could reduce the size of your code by about 10 times. The for loop that selects questions should be used to call the same block of code, because it is repeated 16 times. The only difference in each one, is the file number, and the correct answer number. Both of those should and can be implemented in code, rather than repeating the same code over and over.

The file names already are numbered, so could be opened by number. The answers could be stored in an array.

Yes I agree. I wrote it like this temporary I'm going to change it, but first i need to make the keypad work.

Witch I don't have the slightest idea how to do, I am exhausted, It's 4 in the morning in Serbia, my brain hurts.

Broda: Yes I agree. I wrote it like this temporary I'm going to change it, but first i need to make the keypad work.

Witch I don't have the slightest idea how to do, I am exhausted, It's 4 in the morning in Serbia, my brain hurts.

Sure, it's not good to work when you're tired. You will probably see the problem in the first 10 seconds of looking at it, in the morning! It happens to me a lot.

I did, I go some rest then I worked on the code and got the keypad initialized, but, after it initializes it shows the first tekst on the screen then the tekst from the file on the SD card. The problem is that it shows rondom numbers after that without pressing anything on the keypad.

I’ll upload my current code.

Code.ino (17.5 KB)