Hello Guys, please i need help with my TFT display.
I recently bought a TFT 3.5 INCH MCUFRIEND for arduino uno and am attaching an image of the screen now to show what it looks like. 0*6814 type.
I have been working on a code for my final year project and it was going well. I reached 70% of memory usage like displayed on the terminal and i suddenly found out the screen works no more.
At this point i tried many other examples from the libraries and they work pretty well but when loading my code, which was previously working it doesn’t work anymore. It give me a grey screen.
AM attaching the an photo of how the screen look when i load up my code.
when i load other examples it appears well, but when i load my code without resetting the board, it messes up with the most recent program ran on it. I HAVE TRIED TO RESET SEVERAL TIMES BUT IT STILL PERSIST.
am also attaching my code
telemiyo.ino (12.7 KB)
Buy pencil and paper. Sit down with a nice cup of tea and design your program.
Draw your flowcharts. Trace the flow with your pencil with arrows showing the execution logic.
Then write your Arduino code by translating each block in your flowchart.
If you have a problem, post a photo of your flowchart. Pencil drawings are fine. Just make sure that the photo is "readable".
You have so many mistakes in the .INO file that it is best to start again. I suggest that you:
- press ctrl-T to format the code neatly.
- trace the execution from setup() to the first loop()
- how can you interrogate a button if it is never initialised?
- your numberToString() function is seriously wrong.
It is your project. You must do the design work.
We can help with specific questions. But it would be wrong for us to do your assignment.
Hi David, thanks for your help. OKay now am facing problems with doing a button that increments a quantity on pressing that button, how do I achieve that? am not really a code geek but I have some little experience.
I posted a demo example in this message
You will need to configure for MCUFRIEND_kbv and TouchScreen.
And use your Calibration lines.
The demo example is fairly complicated.
There is a simpler example attached to this older message
I suggest that you print the example code on paper. It requires some careful study.
But my main advice is : Design your project first. Do not attempt to code anything util you have your project flowchart drawn on paper.
Then you can ask specific questions. I will be happy to help with specific questions.
Hi again, i have the flow chart now on a word document as it shall be easier for readability purposes.
My main worry is now at the level of implementing a button that handles the ‘add’ or ‘delete’ functions and stores the final result of button action as a quantity that can be sent over a wireless network like zigbee.
flowchart.pdf (22.7 KB)