Absolute mouse with teensy 3.2 Android / iOS

Status
Not open for further replies.

Ado

New member
Hi,

Using this code to make the mouse move on both Android(8.0) and iOS(14) tablets

Code:
const int ledPin = 13;

void setup() {
   Serial.begin(115200);
   pinMode(ledPin, OUTPUT);
   Mouse.screenSize(1920, 1080);  // configure screen size
   
  } 
void loop() {

Serial.println("0,0");
Mouse.moveTo(0, 0);
digitalWrite(ledPin, LOW);
delay(1000);

Serial.println("click");
Mouse.click();
digitalWrite(ledPin, HIGH); 
delay(1000);

Serial.println("400,225");
Mouse.moveTo(400, 225);
digitalWrite(ledPin, LOW);
delay(1000);

Serial.println("click");
Mouse.click();
digitalWrite(ledPin, HIGH); 
delay(1000);

Serial.println("600,300");
Mouse.moveTo(600, 300);
digitalWrite(ledPin, LOW);
delay(1000);

Serial.println("click");
Mouse.click();
digitalWrite(ledPin, HIGH);
delay(1000);

}




The pointer is seen on both tablets and the clicks work but the pointer doesn't move. (Yet everything works fine on MacOS 10.13 and Windows 8)

RELATIVE Mouse.move(x,y) works though !

Maybe some of you had success with that in the past.

Regards.
 
Status
Not open for further replies.
Back
Top