Introduction: Clicker Cheater for IPhone Arduino From the Cucumber Clicker Maker
WARNING: My DCcEle DCcduino Uno BROKE AFTER 5 HOURS OF WORK. IT SEEMS THIS SERVO IS TOO POWERFUL FOR THIS CHIP. USE WEAKER SERVO OR EXTERNAL POWER SOURCE!
Once i made clicker for iPhone speed tapping from Arduino and Cucumber. Video got 48k views on Youtube and a lot of laughs. It's time to make something better and stable.
Today i have a fancy oldschool lens Helios 44-2 so images would be warm and blurry, sorry for that!
Step 1: What You Need
1. Some Lego parts. Generally just any to make phone holder.
2. Lego board (green tning).
3. iPhone or any smartphone.
4. Arduino (i took DCcEle DCcduino Uno, but tried on Arduino Mega and DCcEle DCcduino Nano, everything was ok).
5. Servo motor. Any.
6. 4 male-male wires.
7. Capacitor. 240μА 35V was ok for me (it serves well for any servo i have).
8. Foam block (optional)
9. Bare Conductive electric paint.
Step 2: Building Holder
Take Lego board and build a rectangle in a shape of your smartphone. Take any parts you have. They will not fit well because Lego inventors had no idea of iPhone when they invented pin distances.
Two black parts on the picture are additional holders because my iPhone had magnet attachment on the back. You don't need them probably.
Step 3: Compactors
Take foam block. I had plenty of them from Chinese packages. Or you may take any soft material.
Cut it into thin pieces and then glue them to inside borders of Lego rectangle.
Step 4: Electronics
Time to build your board.
I was lucky to have nice Japanese robot servo Vstone VS-S092J. Take any from your helicopter, RC car or somewhere else. Regular motors or step motors would not fit with this schematics and program!
It is posible to go without breadboard. Just insert capacitor into servo jack. As you can see in diagram my servo is Futaba Style. Short leg (-) should be on black wire, Long leg (+) on the red wire. Grey wire goes to pin 9 on Arduino. Insert wires in servo connector in the same pins with capacitor. So red comes to 5V, black – GND.
Step 5: Conductivity
Put some Bare Conductive electric paint on your iPhone. My test subject had broken screen but still works.
Paint should be placed on your onscreen button position. It is better to put flat stain.
Let it dry completely. 5 minutes.
Prepare one wire as shown. It shout be L-shaped.
Step 6: Code
Time to code. You need to find servo moving ranges so it is better to flash this code to Arduino now.
When servo starts to move you'll see where to place servo and arm.
Code below, just paste it to Arduino and push Upload.
#include Servo myservo; // create servo object to control a servo
myservo.attach(9); // attaches the servo on pin 9 to the servo object
int del=40; //delay value
myservo.write(49); // up position
delay(del); //give time to go down
myservo.write(51); //down position
delay(del); //give time to go up
Step 7: Finish
Glue Servo with glue gun (hot melt adhesive). When you switch on your machine find lower position of servo, glue Lego part as arm so that end of it is only 3-4 mm high above iPhone screen. Then glue L-shaped wire so it touches conductive spot.
At this part you will see iPhone reacting. Connect L-shaped wire to GND on Arduino. This magic combination replaces finger, nose, elbow, Korean sausage and cucumber.
To make your servo jerk well adjust parameters in code.
You can't know which side of servo is up so try to line up parameters for up and down position.
The delay part is very important, sometimes servo has no time to go these funny degrees, so it may seem working well but indeed it makes errors. So for stable work you should be serious with delay.
int del=40; //delay value
Step 8: Tuning
At first it will work well and fast. But then iPhone will stop reacting. Tune the code parameters.
You may add some conductive paint on L-shaped wire.
Use this with all clicker games like Cookies, Clicker - Tap your own City, Speed Clicker, Рубль.
See my tech blog on yagodin.com (cyrillic tongued friends).
We have a be nice policy.
Please be positive and constructive.