Synopsis of the project: The following project presents an electronic device that can play the Piano Tiles Game. The game has tiles falling from the top of the screen. The player is expected to tap the tiles (black in colour) as quickly as possible without missing any. Using this electronic device, the player can make a higher score efficiently. I've chosen this project because I found it an exciting and easier way to win the game.
The colour of the tile is sensed as black or white using LDR, and touch is simulated at appropriate locations on the screen using a logic programmed into the Arduino.
Requirements:
Arduino reads the voltage drop across the LDR. Observe the voltage for black and white tiles, and choose a suitable threshold voltage to say Vt ( in this case it's 700). If the voltage is less than the threshold voltage, then there is a larger drop across LDR, the larger the resistance, which implies a Black tile and vice versa. I have simulated the touch accordingly. The values of the delays can be tweaked to get the best result.
I have managed to complete all the requirements for a good project. There are still small problems regarding the LDR because of the phone's screen and the Relay's ability to conduct. I have learned how to use Arduino software to connect LDRs wires and coins accordingly so that the current will go through the coins correctly.
Arduino Code: https://github.com/ShibaInu66/PianoTiles-Game