Introduction: UNO R3 2.8 TFT Touch Screen With SD Card Socket for Arduino Board Module
Trying to get this touch screen display working has caused some people frustration. The unit came in an anti-static bag as shown in the pictures with a stylus and NO documentation. After searching around I found some libraries and arduino code that worked with this module. After some modifications I was able to execute a simple paint program, number pad, bitmap display (from SD), and a simple screen saver / calibration helper sketch that shows raw data; good for troubleshooting. Read the next steps to find out more information and view the source code examples.
Step 1: Get Connected
Connect your touchscreen shield to the arduino uno board as show in the pictures. There will be two pin slots open on each side.
You can download the number pad sketch along with all the needed libraries here:
You need to unzip and extract the download then copy the contents of the libraries folder into the Arduino libaries folder: on windows usually it is in \documents\Arduino\libraries
Step 2: Screen Saver and Calibration Helper Sketch
Copy the code example in the demonstration video and upload the sample sketch to an Arduino Uno. This sketch allows you to touch the screen and get raw x, y and transposed x, y coordinates. The raw data is necessary to properly calibrate the touch screen. The sketch also demonstrates shifting states based on touching one of the onscreen buttons. Depending on the state, the program will display a different shape at the location of the touch. The program will also go into a screen saver mode that displays the current state shape.
Step 3: Bitmap Display for UNO R3 2.8 TFT Touch Screen
This sketch demonstrates the standard bitmap display from the SD Micro card inserted into the touch screen. The bitmap files first needed to be copied to the root folder of the SD card. You can do this using a computer. The files need to be named the same as those in the sketch, or you can change the sketch to reflect different file names. Watch the video to view the demonstration and source code.
Step 4: Paint Sample for UNO R3 2.8 TFT
This video demonstrates the standard AdaFruit paint program modified to work with UNO R3 2.8 TFT Touch Screen module.
Step 5: Touch Screen Numeric Pad Example
This video demonstrates a number pad sketch for the UNO R3 2.8 TFT Touch Screen Module. The original sketch had issues on this module. The numbers when touched were reversed on one axis; touching "1" would produce "3" and "4" would produce "6" and middle numbers like "2" and "5" were correct. This sketch fixes this problem by accurately transposing the raw x, y coordinates.
Step 6: Fix for Mirror Display Bug
I connected this module to my Arduino Mega 2560 and uploaded the sketch. When the number pad displayed, all the numbers were in the correct place but everything was mirrored! I uploaded my screen saver sketch and everything worked as expected, no mirroring. I uploaded the paint sketch and that worked as expected as well. So I examined the code and noticed the only difference with the number pad sketch was that the rotation was not set. The number pad uses the default rotation and this value was not set. So I added this to the setup function and everything looked normal.
So if you are using the Arduino Mega 2560, make sure you add the following line to the setup function: tft.setRotation(0);
Step 7: Moving Forward...
Moving forward with this display I decided to do another project graphing analog signals. The project uses two analog signals: one from a photo resistor and one from a mic / amp module.
If you are interested, take a look a the instructable https://www.instructables.com/id/Arduino-Analog-Sig...
2 People Made This Project!
We have a be nice policy.
Please be positive and constructive.
Is there any way, with an UNO, to add other I/O, given all the pins are used/covered, and none are brought through? I'd like to interface a 5-pin joystick. Is the only answer "buy a Mega"?