Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 13 of 13

Thread: Send mouse clicks from a second pc to my pc - Teensy 3.6

  1. #1
    Junior Member
    Join Date
    Sep 2018
    Posts
    13

    Send mouse clicks from a second pc to my pc - Teensy 3.6

    How can I do this?

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    1,788
    What did you already try out to solve the problem? We always try to help people here in the forums, but most probably nobody wants to do the whole engineering work and coding for you.

    As you have for sure already analyzed, you will have to write software for the 1st PC which grabs the mouse actions and sends them to the Teensy over USB/Serial. The second step is writing code for the Teensy which decodes the incoming mouse messages, translates these and sends them again out to the second PC.
    Last edited by Theremingenieur; 09-14-2018 at 07:19 PM. Reason: struggling with French autocorrect when writing English...

  3. #3
    Junior Member
    Join Date
    Sep 2018
    Posts
    13
    I discovered Teensy a couple of days ago and I am not fully sure how does it work but I did figure I would need to do something like that. I am just wondering how would I connect the teensy to be able to recieve commands from the first pc and also send the input to the second pc.

  4. #4
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    it all depends on the “input” app. do you plan to use a terminal to send commands to the other teensy which runs code on other PC?

  5. #5
    Junior Member
    Join Date
    Sep 2018
    Posts
    13
    Yes like a terminal.

  6. #6
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    Ok.... so you want terminal on one pc to talk to terminal on other PC?

    if this is correct you just need to connect the UART lines between both teensies and pass their data inputs over to USBserial

  7. #7
    Junior Member
    Join Date
    Sep 2018
    Posts
    13
    Well yeah one PC has the terminal and should send commands for teensy to have mouse input onto the other PC. How would I connect the UART lines? I still have only 1 teensy so I have to order one more, but just want some information until it arrives.

  8. #8
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    what kind of mouse commands, moving the cursor using absolute positioning or just clicking at a specific location?

    you can do this with one teensy you dont need both (if you have a 3.3v TTL uart adaptor).

    teensy would be connected to the pc you want to control and the uart adaptor at the PC running terminal app

    first you need to decide how you want the mouse to do what you want, you can do this on the same PC when testing teensy, you can add the uart adaptor/teensy to it when you got it running right

  9. #9
    Junior Member
    Join Date
    Sep 2018
    Posts
    13
    I just need a mouse click at the center of the screen ( Doesn't matter where it clicks ). I already made it to work on the same PC, I just need to transfer it over to send the commands from the other PC. I will check out if I can buy the adaptor somewhere.

  10. #10
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    yes so you only need one teensy and either or another teensy OR uart adaptor (3.3V TTL)

    the clicking can be done when you send keystrokes from the terminal app easily

  11. #11
    Junior Member
    Join Date
    Sep 2018
    Posts
    13
    So I should do Terminal PC --> TTL adaptor --> Teensy --> Recieving PC? I see some of these adaptors on aliexpress etc for a couple of bucks. Would those be fine?

    It can also be keyboard pressess or mouse clicks since I optimized the thing I want to do to be able to do it both ways. So that part should be easy. Just gotta get the adaptor and try it. Do you know if there are any big delays between sending the keystroke and the teensy executing it? I need it to be under like 10 ms.

  12. #12
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    yeah they work, some have dual 3.3v/5v switchable jumpers, be careful and make sure you use 3.3V only jumper if it has one or risk damage to teensy

  13. #13
    Junior Member
    Join Date
    Sep 2018
    Posts
    13
    Thanks man, really helped. This was the hardest part of my big project

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •