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

Thread: Computer-to-computer over USB Keyboard feasibility

  1. #1
    Junior Member
    Join Date
    Dec 2012
    Posts
    2

    Question Computer-to-computer over USB Keyboard feasibility

    Hi,
    I wanted advice on feasibility of a project.
    I have two computers, the controller and the target. I want to drop a text file into a folder on the controller and have the characters sent to the target as if they were typed on a USB keyboard.
    My initial thought is to have a have a program on the controller poll for the file and when it detects it send it out through the serial port. A sketch on a Teensy could read the characters off of Serial Input and write them using Keyboard.print in Teensyduino.
    I would appreciate any suggestions for improvements, alternate approaches, etc. as well as the best Teensy for the task.
    Thanks, in advance, for your help.
    Mark "SonOfAWolf"

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,301
    The tricky part of this will be detecting when the card has been written. You can't access the card with the SD library while the USB code has control of it. There are some undocumented APIs intended to let you take the card away from the PC (the PC sees a removable media eject) so you can gain access to the card. But how you'll know when to "eject" the media will be tricky....

  3. #3
    Junior Member
    Join Date
    Dec 2012
    Posts
    2
    Thanks Paul. Do you think I would be better off trying this with a Teensy 2.0, Teensy++ 2.0 or a Teensy 3.0 ? Does the Teensyduino environment USB Type functionality work the same with the different Teensy boards? Does one of the Teensy boards do a better job with digital input (from the controller computer) ?

    Regards,
    Mark

  4. #4
    Quote Originally Posted by SonOfAWolf View Post
    Thanks Paul. Do you think I would be better off trying this with a Teensy 2.0, Teensy++ 2.0 or a Teensy 3.0 ? Does the Teensyduino environment USB Type functionality work the same with the different Teensy boards? Does one of the Teensy boards do a better job with digital input (from the controller computer) ?

    Regards,
    Mark
    If I understand it correctly you will put a TXT file in a specific folder on your controller PC. Then you have a program running on the PC to look for a file and send the content to a serial port. This serial port is wired via a usb to serial converter to a teensy and not via the standard USB that is plugged into the 2nd PC as a USB keyboard device. the Sketch on the Teensy will basically listen for Serial input and repeat it via the USB keyboard interface.

    Most of your development effort would be on the Controller PC app and not the sketch, so I would think any of the teensy 2 or 3 would do. I am far from an expert, but as the 3.0 software is still beta I typically develop using a teensy 2.0 and when my code is working I move it to 3.0 which runs MUCH faster.
    If you ever envision the device would need to act as a USB host, you would have to get a 3.0 (and wait a few months for a software update and get a 2nd Teensy to program it to use the host mode)

Tags for this Thread

Posting Permissions

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