Weird

I have a code that Works partialy fine. It shows the begining text screen then it initializes the SD card, goes in to the for loop and opens an txt file from the sd card, reads it, shows it on the display as it supossed to, but after that it should wait for an input on the keypad, and then depending on the input display text and then go to the next file read it and show it in the screen, etc. for 15 files.

The wird thing is that when it shows the first file, it only blinks it and then blinks the next file and after that it shows rondom numbers on the screen, without me pressing anything on the keypad.

If I press something on the keypad i writes the message it’s supossed to on the screen, blinks it, and again with random numbers.

I’ll upload the program as an atachment.

I’m using the tft Mcufriend 2,4’’ shield, 4x4 keypad, and LC studio Sd module. All connected to the Arduino due.

Adfruit library for the tft, SD-Master for the Sd module, and Keypad library.

sketch_may04a.ino (18.5 KB)

I have a code

No you don't there is no such thing as "a code"

I have a code that Works partialy fine

partialy fine

WTF "partialy fine"

Try posting your program. 9/10 people here will not look at attachments.

Mark

holmes4:
No you don't there is no such thing as "a code"

This is an international forum, perfect English grammar is not a requirement for posting. It's perfectly obvious what is meant. At least it's the right word, not "script" or silly thing like that.

Also, 18Kb can not be posted in code tags, it exceeds the size limit.

Hi,

If you want help for your problem, go back and edit the subject of this thread.
"weird" is not going to get members that may be able to help you to even consider checking you message.

A subject like;

"opening SD card file problems"

would be more informative.

Tom.... :slight_smile:

A liberal sprinkling of the F() macro is called for, I believe.

          tft.println('Tacan dogovor je pod A');

Oops.

AWOL:
A liberal sprinkling of the F() macro is called for, I believe.

          tft.println('Tacan dogovor je pod A');

Oops.

That would not be nearly as important if the question blocks were factored to reduce the code size by at least 10 times, as I suggested in reply #31 of this thread about the same program.

Ah! Cross-post.
OK.
(just noticed it's a Due too.)