Introduction: Robot Tablet Player

About: Living and working in Berlin

Me and my son we were playing "Asphalt 8", a car racing game on a tablet computer. In this game you gain points/coins and you can buy new cars with these coins. One simple method to raise virtual money is to start a so called K.O. race (or elimination race) where the goal is to avoid the last position as the last one is knocked out every 30 seconds. However, if your car is eliminated you receive some points regardless of your position. So, starting a elimination race and losing it right away gives you money without actually having to concentrate on the race itself, all you have to do is repeatedly pressing some buttons. This, however, is a stupid and boring task that cries for automation. I attached a video showing the working robot player.

Step 1: Material

I mostly took material I already had at hand except for the stylus pen with a conductive tip that I bought for this project.

Material needed:

  • 3 Servo motors (actually it should work with just two)
  • Mini 2-Axis Camera Mount for SG90 Servo
  • Polymorph
  • metal bar (perforated steel sheet) to elongate the servo arm
  • Tablet stylus (conductive material on tip)
  • wooden plank
  • small screws
  • ARDUINO nano clone
  • wire,
  • solder
  • blank soldering plate

Step 2: Mounting and Soldering

The servos have to build an arm that can move vertically and horizontally. I ordered a camera mount from China for ~3 Euro a few months ago, found it in my stack, and therefore used this for this project. Basically you can easily mount two servos without the above camera mount. Check out instructables for some ideas. I used a 5 cm piece of perforated steel sheet to elongate the servo arm and polymorph formable plastic (search instructables for polymorph if you do not know polymorph yet!) to glue the stylus to the arm. In addition I used polymorph to mount the third servo to the camera holding thingy instead of a camera.

The servos have to be wired to VCC and GND and the signal lines go to pin 10, 11, and 12 on the ARDUINO. I highly recommend using an external power supply for the servos! If you do so, make sure to connect grounds of both circuits (common ground).

Before screwing the arm to the wooden blank I made some tests with the software for fine tuning of the correct timing and arm position.

Step 3: Software

The software is straight forward giving the position of the servos and thereby clicking the buttons on the tablets with the stylus.

// Robot Tablet Player

// by Lars Lewejohann

#include

Servo myservo[3]; // create servo object to control a servo

int door1Srv[3]={10,11,12};

void setup()

{

myservo[0].attach(door1Srv[0]); // attaches the servo on pin 10 to the servo object

myservo[1].attach(door1Srv[1]); // attaches the servo on pin 11 to the servo object

myservo[2].attach(door1Srv[2]); // attaches the servo on pin 12 to the servo object

myservo[0].write(118);

myservo[1].write(100);

myservo[2].write(45);

delay(5000);

myservo[2].write(60);

delay(2000);

}

void loop()

{

myservo[2].write(20);

delay(140);

myservo[2].write(90);

delay(3000);

myservo[0].write(145); //145

delay(1000);

myservo[1].write(100);

delay(1000);

for(int i=0; i<3;i++)

{

myservo[2].write(20);//20

delay(240);

myservo[2].write(90);

delay(2500);

}

delay(80000);

for(int i=0; i<4;i++)

{

myservo[2].write(20);//20

delay(240);

myservo[2].write(90);

delay(2500);

}

myservo[2].write(60);

delay(5000);

myservo[0].write(118);

delay(10000);

}