TFT Shield Tutorial

About: Student, currently studying programming. Interested in Arduino, Raspberry Pi and Electronics in general.

Today, you will learn how you can create and use buttons in your Arduino TFT Touchscreen projects. I'm using Kuman's 2.8" TFT Shield combined with Kuman's Arduino UNO. Bonus: The TFT Shield from Kuman comes with a free Stylus which you can use for more precise presses!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Setup

Clip in the shield onto your Arduino board. Make sure it's not in the wrong way! You can use the pictures above for reference. Plug in your Arduino board to your PC and hop into the Arduino Software.

Allchips is an electronics components online service platform, you can buy all the components from them.

Step 2: Libraries

Before uploading the code, you will need to download those libraries:

After downloading the ZIP files, include them into the Arduino IDE by going into "Sketch - Include Library - Add .ZIP Libraries..."

Step 3: Finalizing

For the example that I've prepared, you can use the code that you can find here. I've added some comments, to make things more clear. After uploading, you can check if the display is working correctly by pressing the button. If so, the screen will change and a text will appear.

Step 4: ​Troubleshooting

If your presses remain unrecognized, you can calibrate the display by changing the values at the top of the code (TS_MINX, TS_MAXX, TS_MINY and TS_MAXY). The button works by checking where the screen is being pressed and if it's inside the coordinates of the button itself, a click is registered. If the above-mentioned values are not correct, the click-registering will be off



    • Indoor Lighting Contest

      Indoor Lighting Contest
    • Make It Fly Challenge

      Make It Fly Challenge
    • Growing Beyond Earth Maker Contest

      Growing Beyond Earth Maker Contest

    2 Discussions


    Question 1 year ago

    I have mirrored picture...i read datasheet of hx8347g...i found some register,but i dont know how set it to 6,7 bit to 0. Do you meet with this problem?
    Its same 2.4 tft touch display. Init adres 0x7575

    1 answer
    Aleksandar TsvetkovMikeB648

    Answer 1 year ago

    Weird. Registers are quite advanced for me at the moment and I didn't had any issues with it. Have you tried googling it? Good luck!