Another game has been going viral recently – Piano Tiles.
I tried playing it, and it sure is entertaining, but there’s no way I can beat some of my friends, they’re just too good (Sunny, I’m looking at you ๐ ). Not willing to throw in a towel that easily, I employed robots to do the dirty job. Results can be found below.
I used an Arduino Uno with a relay shield (makes for more compact package than having relays on breadboard), photoresistors to read the color (~light intensity) of the tile (black vs white), and strips of copper foil attached to the screen to simulate touch by grounding them. Algorithm is monitoring the timing between tiles, to account for increasing speed at which tiles move as the game progresses.
Reliably simulating touch was the toughest part – I tried a number of different approaches (pennies, washers and more), but 3-4 layers of copper tape seemed to work best. Just make sure that the glue on copper tape is also conductive (I used this one) and that you share the ground with phone (i.e. by connecting a stripped USB cable to the phone and getting the ground from there).
Photos:
YouTube video –ย compilation:
YouTube video – raw footage:
Leave a Reply