I made this a while ago, though I would share it to the forum.
Scroll trough the code and you will see many usefull snippets.
I used a cheap tft touch screen from AliExpress, and found a library that goes with it (google <MCUFRIEND_kbv.h>)
Code becomes most interesting halfway trough the code.
It has 1 level, 3 difficulties, WIN / LOSE screen, Scorecount.
Gives good insight on how to draw shapes on a screen.
I have 2 versions in the attachements (I used to have 3… one with bluetooth controller and android APK app that goes with it, but I can’t seem to find it)
version 1: touch + potentiometer (prefferably a slider) control
version 2: touch + left/right button control.
Everything should work, but since I found it drifting on my harddrive, please verify.
BrickDuino_01022017.ino (28.4 KB)
BrickDuino_24012017.ino (26.9 KB)
Adafruit_GFX.zip (8.88 KB)
MCUFRIEND_kbv-master.zip (211 KB)
TouchScreen.zip (4.75 KB)