USB Mouse over Bluetooth Serial

Status
Not open for further replies.

clausen

New member
I have myself a few Bluetooth serial modems and a few Teensy 3.1s. I was wondering if there is a way to send mouse or keyboard data over the Serial1 connection with a Bluetooth Serial modem. After writing and running some simple code I realize that this may more complicated that I originally anticipated. I realized something was up when the Teensy would stop clicking the mouse when I moved to battery power and did not have it connected to my PC over USB, only over Bluetooth. Would it be better to write a separate program to receive the commands over serial and click the mouse for me?

My code, I realize now it really shouldn't have worked at all, but hey I didn't know that when I first ran it.

Code:
void setup() {
  Serial1.begin(9600);
}

void loop() {
  Mouse.click();
  delay(1000)
}
 
Status
Not open for further replies.
Back
Top