Go Down

Topic: StackRobot (Read 3786 times) previous topic - next topic

SMM2

Hi, currently I am working on a robot that will play the game "Stack" by Ketchapp. I am using an Arduino Uno, one 9g micro servo, and a touch stylus. I have already attached the stylus to the servo, and I ran into a problem... When the servo motor moves the touch stylus to tap the screen, the stylus does indeed make contact with the screen but the phone seems to not acknowledge the touch stylus... And I have used the touch stylus with the phone and everything works just fine, but when the servo moves it to tap the screen nothing happens. :smiley-confuse:

Here is my code:
Web Editor link: https://create.arduino.cc/editor/SMM2/63a9d9b3-0259-4456-a738-729e2afca422/preview

Code: [Select]
#include<Servo.h>;

Servo servo1;

void setup() {
  // put your setup code here, to run once:
servo1.attach(9);
servo1.write(80);
}

void loop() {
  // put your main code here, to run repeatedly:
delay(600);
servo1.write(30);
delay(200);
servo1.write(65);
}


Any help would be great.
"Success is not built on success. It's built on failure. It's built on frustration. Sometimes its built on catastrophe."

PaulS

So, some application is detecting screen presses, and not working. So, you posted some other code. Hmmm.

Is the stylus detected as a capacitive sensor? That is, does it need to be held by a human who is also holding the phone? Try attaching the stylus to a stick. Lay the phone on a wood table. Press the stylus to the phone using the stick. Is it registered?
The art of getting good answers lies in asking good questions.

SMM2

Hi PaulS, first of all thanks for taking the time to help me out :)

Now, I did some tests and I believe this touch screen stylus that I am using is in fact
Quote
detected as a capacitive sensor
. I believe this because before I had started this topic I had already attached the stylus to a popsicle stick and when testing this robot I had the phone lying on a wooden table, and the phone still wouldn't react to the stylus. Then, I believe I truly found evidence to support that this really is detected as a capacitive sensor. So what I did is I cut the power from the robot and with my hand I grabbed the stylus and moved it to touch the screen and the phone responded... But when I grabbed the popsicle stick and moved the stylus down to touch the screen it wouldn't respond...

So it seems that this stylus does indeed
Quote
need to be held by a human
in order to function properly.

Now my question is what stylus or alternative method should I use for this robot to work? Should I use a different type of stylus..? Or attach the stylus in a different way..?
"Success is not built on success. It's built on failure. It's built on frustration. Sometimes its built on catastrophe."

PaulS

I suspect that the problem is not the stylus. It is the phone. If it has a capacitive touch screen, sticks won't work. It needs a human finger.

Perhaps you could find a victim, and lop off a fresh finger each time you want the robot to play the game... (Don't take that seriously.)
The art of getting good answers lies in asking good questions.

SMM2

So there's no way to do this with the phone I am using?
"Success is not built on success. It's built on failure. It's built on frustration. Sometimes its built on catastrophe."

PaulS

So there's no way to do this with the phone I am using?
Read through this whole thread. Where have you mentioned what phone you have?

Can you play the game with the phone on the wooden table, using the popsicle stick?
The art of getting good answers lies in asking good questions.

SMM2

I am using an iPhone 5c.

And yes I have tried that
Quote
So what I did is I cut the power from the robot and with my hand I grabbed the stylus and moved it to touch the screen and the phone responded... But when I grabbed the popsicle stick and moved the stylus down to touch the screen it wouldn't respond...
"Success is not built on success. It's built on failure. It's built on frustration. Sometimes its built on catastrophe."

Go Up