
Relays before being modified to play Towers of Hanoi.
The first step is to find a way to interface with the capacitive touch screen of the iPhone. Normal stylus doesn't work. So after trying a few methods, I settled with putting drops of water on the area I want to "touch" and using a metal paper clip to make contact with the water drops. It's better illustrated with the picture below.

Drops of water become "fingers" when contacted with a metal paper clip.
The relays were stripped and only the coil part was used. I suspended a metal paper clip above the coil so whenever the coil is energized, the paper clip moves downwards and make contact with the drop of water on the screen, thus effectively making a "touch".
This method wasn't perfect because everything was slap together with parts that I can find around the house. To be able to achieve 100% accuracy at high speed, a proper solenoid is needed. But for playing Towers of Hanoi, 5 moves per second should be more than enough to beat the highscore. So I thought.

Solenoids are controlled by transistors that are controlled by the parallel port.
After helping a friend with a parallel port project, I had the base program to control the parallel port. I wrote a VB program to sequence the relays so they will move the disks in the game in the proper order. The relays are not really optimized for high speed but I managed to squeeze out 5 moves per second consistently without error. 7 moves per second was possible, although there were a few error touches. But since it must be 100% perfect since we're following a sequence, it was unacceptable. But in the video I have included a video showing how much faster it was when running at 7 moves per second.

Closer view of the relays with their metal paper clip "fingers".
Here's the video of the robot in action. In the first part, I show the robot solving all 7 levels at 5 moves per second. After a few closeups, there's a short clip of the robot running at 7 moves per second. It managed to solve the first few levels but then errors started popping up and it was unable to finish the whole game. A better touch interface should solve that problem.
You may ask, won't the paper clip scratch the screen? No, because the iPhone's screen is built pretty tough and you can't easily scratch it. Now the only question remaining is, why didn't I beat the all time highscore?

I (or rather my robot) am the highest scorer in the last 24 hours.

But I still couldn't beat mike with 5 moves per second.
So either mike can make more than 5 moves per second with his fingers, or he, like me, is cheating.
I think he's cheating.




