Close
0%
0%

Driverless Mouse and Keyboard Sharing

Instantly share mouse and keyboard across computers on any platform.

Similar projects worth following
This project was originally incorporated into my trackball at the Mouse Controller Project. I entered that into The 2014Hackaday Prize, and this device was split off from it.
How it works:
- Connect four USB cables for up to four computers of any operating system.
- Plug in mouse and keyboard.
- No drivers and no software needed.
- Mouse pointer moves from one screen to the next by display edge detection.
An all hardware solution to Synergy* software without the hassles like LAN connectivity (*See link.)

For the 2015 Hackaday Prize:

I have had so much fun and encouragement from Hackaday this year! Thank you so much for your time!

System integration:
More of the original system design details are in the System Design Considerations project log.

Whats Working:
USB Host Shield, Teensy 3.1, and a Teensy-LC connected to two computers.

Where I would like to be:
I would have liked to been ready for the Best Product contest, but a wide variety of setbacks kept me from sending a prototype this year.

There are some very short videos, linked on the left side, that show what I have working so far.

A detailed description of what is working is in the I2C Challenge project log.

A list of credits and links is in the USB Host Shield with Teensy 3.1 credits and links project log.


Project Logs: Table of Contents

  • Transparent Acrylic Inlays

    frankstripod08/04/2015 at 07:12 15 comments

    Ponoko Laser Cutting Service: Front Panel Tests.

    3mm clear acrylic skull inlays in black (painted) acrylic, with two 2mm red LED eyes. The red LEDs are not connected yet, but look like tiny jewel domes in the light. There are some more pictures below.
    The inlays can be done in a variety of Ponoko's material combinations. I would like to play with inlays in wood, or in felt for clothes, but those are different projects.

    “Make Your First Product for Free”

    I totally fell for the 'sign up now' because I was thinking I would eventually need to for the coupon I won.

    The Catch:

    Anyone can sign up for an account, and to find out there are 10 days left to use a $20US discount towards a laser cutting service only, not including shipping.

    That actually was not a bad deal for me. I have never ordered any cutting or 3D printing before, so I knew for sure I would make a mistake on my first design. Not wanting to mess up a $100 order, I decided to play along and jump through the hoops. I thought the OpenSCAD Skull from the Human Interface log would be easy to send off. That might have been easier if it was 3D printed, but the preferred method of this laser cutting service is colored SVG files.

    Ponoko has some great instructions for first time users.

    Following the design-it-yourself starter kits has to be fool proof, right? Fearing my LibreOffice Draw would be too quirky, I opted for the free Inkscape option so I could follow the directions. The good news is I learned some Inkscape in a few days. It's important to understand how lines connect with nodes, and how to watch for tricky connections and overlapping lines. The Ponoko directions in the starter kits are great, but now that I understand SVG files better, I will only be using LibreOffice.

    The upper left image is the 0.010mm width blue cut line for the laser cutter (No square corners).

    The other five are me playing with different line widths to get an idea of what the cut pieces might look like. The cut pieces ended up almost identical.

    The second is the actual laser cut width of 0.40mm (+0.20mm on each side of the cut line.)

    The third is the skull subtracted from material, then material subtracted from skull, overlaying both, and last with the 2mm LEDs I ordered.

    I made two test face plates 150mm x 70mm but without the USB holes. Also some extra skulls, as recommended in the Ponoko directions with tiny pieces (<5mm can fall through the bed.) Also some circles as bases to mount the skulls. I also found How to Make Snug Joints in Acrylic helpful to prevent cracking in the corners.

    Cutting the inlays the same size made for a loose fit (0.4mm on each side). Next time I will get closer by cutting different size shapes outside the panel. Another mistake was not putting through holes through the circle bases for the LED leads, just like I did on the 3D prints also.

    Inkscape vs. LibreOffice Draw

    Inkscape shows the instructions outside the boarder,
    and LibreOffice shows the actual drawing.

    Adhesive paper holds parts in place. Scorch marks on paper only. This saved almost all of the 1.6mm diameter 3mm long cylinders cut out from the eyes!

    Material and Cost

    Ponoko recommends testing designs in cardboard for affordability, but I chose to see the more expensive 3mm anti static clear acrylic, 181 x 181 x 3mm (P1). The edges are sharp and clean all the way through.

    It was three days for processing, one day to make and ship it, two day priority mail, making it six days total from idea to in my hands. $22 is $2 over the $20 discount, plus 9.55 shipping, means the total cost was $11.55. I made a few mistakes, but now I can order custom material inlays with more confidence for a variety of projects, so I would say getting my feet wet with this was worth it.

    Some more test pictures:

    These LEDs looked so much bigger on the computer screen when I ordered them.

    This is with the paper backing on both sides:

    Stacked and extended out 3mm past the panel:

    Recessed 3mm into the panel:

    Recessed eyes:

    That's all for now. Back to...

    Read more »

  • Prototype Buttons

    frankstripod07/20/2015 at 08:31 5 comments

    How Awesome is Hackaday for Collaborating and Getting Help?

    First: I won the Show Us Your Human Interface; Win Laser Cutting Time contest: a $100 gift card for Ponoko laser cutting service!

    ANYONE COULD HAVE WON! There were only 28 entries in a thirty prize contest.

    Second: My prototype buttons are being printed thanks to @Alpha Charlie and his Mini Kossel Delta 3D printer. It is so amazing to see a design go from virtual to reality.

    The first buttons are being printed with NinjaFlex Water Semi-transparent. Under normal light, they appear white and in need some fine tuning. That is being worked on; more on that soon.

    The back light test was fantastic.

    In the dark and with a dim green LED.

    Here is the Mini Kossel in action.

    Auto calibration.

    There are more videos about the printer build linked on @Alpha Charlie's profile page, just below the mandatory Tesla Coil every mad scientist should have.

  • Human Interface

    frankstripod07/15/2015 at 02:54 0 comments

    I finished the front panel design just in time for the Show Us Your Human Interface; Win Laser Cutting Time contest. Here is a peek.

    Three function Skull button light design

    • Back light glows yellow when screen switches.
    • Eyes glow red when keyboard connects.
    • Push button for manual switching.

    The button will be made of semi-transparent NinjaFlex with a yellow LED back light. I already know someone who might print it for me. The two eyes are Lumex 2mm thru-hole red LEDs, Digi-Key 67-1197-ND. Beware, the part numbers are confusing:
    http://www.digikey.com/product-detail/en/SSL-LX203CIT/67-1197-ND/144607
    http://www.digikey.com/product-detail/en/SSL-LX203CSRT/67-1200-ND/144616
    http://www.lumex.com/content/files/ProductAttachment/SSL-LX203CSOT.pdf
    http://www.lumex.com/ssl-lx203csot

    Last night I learned OpenSCAD!

    Criticism is welcome on my first OpenSCAD code at the end of this log. Everything should be to scale. The button will be printed with a base that slides into a tube, for a push button switch behind it. I may recess the eyes for effect.

    Dimensions: 19mm wide. 17mm high. Base and skull height are adjustable.

    Extra Ports

    I added extra USB ports to the front panel, because I always use more than one mouse, and will be swapping other devices. The four bottom unswitched connectors will be USB 3.0, provide direct access to each computer, and have two amps of power each, for charging or powering multiple projects.

    Dimensions: 70mm x 150mm x 200mm.

    Skull Button Light:

    UPDATE: Beware; I did not get these to work yet.

    base = 10; //Height of Base.
    hi = 7; //Height of Skull.
    //Base
    cylinder(h = base, r=9.5, $fn = 360);
    //Head
    difference() {
        translate([0, 0, base])
            cylinder(h = hi, r=4, $fn = 360);
        translate([-1.8, 0, base-1])
            cylinder(h = hi+2, r=1, $fn = 360);
        translate([1.8, 0, base-1])
            cylinder(h = hi+2, r=1, $fn = 360);
    }
    translate([-1.7, -4, base])
        cylinder(h = hi, r=.8, $fn = 360);
    translate([0, -4, base])
        cylinder(h = hi, r=.8, $fn = 360);
    translate([1.7, -4, base])
        cylinder(h = hi, r=.8, $fn = 360);
    //Wrenches
    module wrench() {
        translate([-3.5, 1.5, base])
            rotate([0, 0, 45])
                cube([2, 3, hi], hcenter = true);
        translate([-5.5, 5, base])
        difference() {
            cylinder(h = hi, r=2, $fn = 360);
            translate([-.75, -.75, -1])
                rotate([0, 0, 45])
                    cube([2, 3, hi+2]);
        }
    }
    wrench();
    mirror([1, 0, 0]) wrench();
    mirror([0, 1, 0]) {
        wrench();
        mirror([1, 0, 0]) wrench();
    }
    //2mmLEDs Don't print these
    translate([-1.8, 0, base+hi]) {
        color("red") {
            sphere(1, $fn=100);
            translate([3.6, 0, 0])
                sphere(1, $fn=100);
        }
    }
    This looks interesting also: www.openjscad.org Thanks @charliex

  • I2C Challenge

    frankstripod07/10/2015 at 18:51 4 comments

    I'm very happy with the progress of this right now!

    • Last week was my first SPI project!
    • This week is my first I2C project!
    • I can't tell you how happy I am that both are working side by side.
    • I think I bricked a Teensy!
    • Check out the fast I2C mouse action in the videos!

    (Turn the sound off – annoying fan noise in background.)

    First up is one mouse, a Teensy 3.1 with a Win7 on the left, and a Teensy-LC on an Ubuntu 14 computer on the right. The two microprocessors simultaneously act like mice, and the mouse movement data that is scrolling on both serial monitors is identical.

    The second video is setup for high contrast. Up until now I was skeptical there would be some sort of noticeable delay or sluggishness in the mouse movement. Both mouse cursors seem to move identically as if they were from the same microprocessor. I was also afraid that SPI and I2C would have eternal conflicts, but both work great, even when hot swapping the computers USB ports.

    Saved the best for last. They are Not going from one screen to the next. They are each individually just wrapping the mouse cursor from one side to the other of the same screen.

    ( Firefox is displaying Hackaday message notifications on both computers :)

    This is a big milestone for me. This means all the software will work. It won't be long until I have it switching automatically. There is no data being sent from the computers at all, so it maintains the “driverless” feature. Not only are the mice hot swappable, but the computers are also.


    My First I2C experience

    This was kind of scary because of what looked like an infinite amount of I2C problems online, some requiring expensive test equipment to diagnose. There were a variety of pullup resistor suggestions online ranging from 190ohms to 10K. I found Paul's wire library information to be simple and straight forward at PJRC.com

    My desk is a mess :)

    I had two 4.7K resistors, but one looked deformed and the other I broke a lead off. I had some others ready if I had to experiment with different values. I soldered in two 2.2K resistors and it worked the first time with no hardware adjustments. I will be ordering better headers for the farm soon.

    Bottom view:

    Opps! Is this better? Resistors are on the top side.

    I bricked a Teensy-LC :(

    I am hoping I might find a cure. I have not researched it yet because I have been so busy with the software. My meter says it has 5V and 3.3V on the board, otherwise very brickish. It seemed to happen when I was screwing up the I2C bytes being transferred.

    My workarounds, for now.

    The Teensy 3.1 acts like the master and as the first slave at same time by mashing the software together, then the Teensy-LC is added as a second slave. It works for now, but I want to eventually separate them to leave as much spare processing power as possible on the master.

    That will allow more flexibility for hardware accessories like encoders and other sensors, or software patches like global acceleration and cross platform gestures for example.

    I used the basic Arduino wire library

    Having very small functions that are coordinated together worked the best. I used: write three bytes, end, on receive get three bytes, repeat. I didn't know I would have to calculate by own method of transferring 7 bit bytes on both ends with 8 bit positive and negative mouse data (-127 to +127 for each axis). The Arduino site is usually not much help, but this worked. I kept it really simple.

    http://playground.arduino.cc/Main/WireLibraryDetailedReference

    I2c and big numbers: http://forum.arduino.cc/index.php?topic=78528.0

    https://www.arduino.cc/en/Tutorial/MasterWriter

    Translation of previous paragraph :

    #include <Wire.h>

    Master:

    int actualX;
    int getX;
    char type = 'x';
    uint8_t  x = 0;
    uint8_t  y = 0;
    
    void wiresend()
    {
      Wire.beginTransmission(1);
      Wire.write(type);
      Wire.write(x);
      Wire.write(y);
      Wire.endTransmission();  // See Wire.onReceive
    }
    void loop() 
    {
    // actualX is the x axis mouse data recieved
    getX = actualX + 127;
    x = highByte(getX);
    y = lowByte(getX);
    ...
    Read more »

  • Mouse Works Like Synergy

    frankstripod07/02/2015 at 00:47 6 comments

    I just got the software working for the slaves that acts like Synergy! With all the pixel counting too! Right now it is only on the Teensy 3.1 with the USB Host Shield. It only runs one screen, but its super fast and the mouse cursor runs off one side of the screen to the other to simulate switching. Lets get right to the video:

    Side Note: I just downloaded CamStudio (Open Source). It probably needs some new codecs (ffdshow) installed, so sorry the video is 581MB, 22sec, and 10 lousy frames per second. You will have to believe me that is is much much smoother than it looks, until I can get better screen recording.

    In the entire video, the mouse position is constantly estimated without any drivers or communication with the computer.

    • Mouse movement is super fast!
    • Left, right, and middle buttons.
    • Mouse moves to center of screen one time on Teensy startup.
    • No set up.
    • All Win7 settings, like acceleration, work great.
    • No screen switching at protected corners, size adjustable.
    • Mouse cursor bumps against the left or right and hangs until you push it more.
    • The size/force of the bump forces switching, and its adjustable.
    • The screen simulates switching by wrapping the coursor to the other side, like Synergy would.
    • The serial monitor shows x/y estimating.
    • All calibration for guessing the x/y position is continous and unnoticeable.
    • Mice are hot swappable.
    • Just as fast as a direct connection (unnoticeable with hand and double click speed :)

    Still A Lot of Work To Do:

    • Set up I2C for the slaves.
    • Sketch needs to be cleaned up and tested on the Teensy-LC.
    • Sketch for the Teensy 3.1 as a master.

    The setup, from the last log:

  • Atmel ATMega328P

    frankstripod06/26/2015 at 10:54 0 comments

    I added two ATMega328P based boards to my project to see if they could work as slaves also, for the third and fourth computers, just in case I wanted to play with the Atmel idea again.

    Right now none of the slaves are working yet, but the Teensy 3.1 outputs mouse movement data to the Arduino serial monitor.

    It's Alive!

    Note: might need V-USB?

    New pins:

    The boards are from the hack: Badger Hack Workshop

  • SPI Problems

    frankstripod06/26/2015 at 10:28 15 comments

    I got some cheap perfboard and noticed how spoiled I was with the exact spacing on my mouse (2.54mm in both directions). None of my boards with pins fit, and I thought I was out of female headers. Then I found some baby 1x2 and 1x4 headers and decided to start a header farm.

    The new sockets work fine.

    I had this briefly working before, then when I set it up again, I got nothing. I thought I had blew up a board and totally missed the blue smoke. I checked everything with a meter a hundred times, and re-soldered everything three times. This is what I came up with.

    This doesn't work:

    This does:

    I am thinking its interference in the shape of the SPI wires, even though the boards are so close to each other. (Blue=3.3V, Green=Ground.)

    Am I wrong?

    The differences:

    Not working:

    • MISO crosses over MOSI
    • SS goes around MISO on the Teensy side.

    Does work:

    • SS crosses over MOSI
    • MISO goes around SS on the USB Shield side.

    (This makes more sense now that I see it on paper.)

    This is very scary for me because I am just starting to play with KiCad, and would hate to order a board that had this problem.

    Would a board with a ground plane and no “crossed wires” help so much that the shape wouldn't matter?

    Are there board designs that are less SPI friendly than others?


    I used LibreOffice Draw to map the pins and wires upside down.

    Rotated diagram matches wiring pictures above:

    I cut the VBUS jumper on the USB Host Shield that supplies power to the host connector, added a USB hub for power instead, and put in a 100uF cap, as recommended here:
    http://pjrc.com/teensy/td_libs_USBHostShield.html
    and here:
    https://www.circuitsathome.com/usb-host-shield-hardware-manual

    Teensy-LC

    Even though the Stickvise comes in handy most of the time...

    but I prefer to get the spacing right for pins here first.

  • USB Host Shield with Teensy 3.1 credits and links​

    frankstripod06/26/2015 at 09:54 2 comments

    My project would not be possible with out the hard work and extreme dedication of these people and those who support them.

    Teensy 3.1 and Teensy-LC. Thank you Paul Stoffregen!
    pjrc.com
    github.com/PaulStoffregen

    USB Host Shield Mini. Thank you Oleg Mazurov!
    circuitsathome.com
    github.com/felis

    Also xxxajk (Andrew J. Kroll) wrote spi4teensy3, Thank you!
    github.com/xxxajk/spi4teensy3

    Paul Stoffregen also has a forum for project help, loaded with great information like this Teensy Quick Reference: Code Examples, Tips and Tricks.

    Oleg Mazurov wrote an awesome series of articles that go over the basics of USB report descriptors and HID.

    Visualizing HID device reports and report descriptors:
    A simple introduction to USB interface and report descriptors.
    https://www.circuitsathome.com/mcu/usb/visualizing-hid-device-reports-and-report-descriptors

    HID support for USB Host Shield Library 2.0 released:
    Interfacing to HID boot protocol devices.
    https://www.circuitsathome.com/mcu/hid-support-for-usb-host-shield-library-2-0-released

    Arduino USB host Articles:
    Arduino USB host – Communicating with HID Devices
    https://www.circuitsathome.com/communicating-arduino-with-hid-devices-part-1

    Arduino USB host – Pre-prototyping – Part 1
    https://www.circuitsathome.com/mcu/programming/arduino-usb-host

    Arduino USB host – First programs – Part 2
    https://www.circuitsathome.com/mcu/arduino-usb-host-part-2-classes

    Arduino USB Host – USB Descriptors – Part 3
    https://www.circuitsathome.com/mcu/arduino-usb-host-part-3-descriptors

    Arduino USB Host – Peripherals – Part 4
    https://www.circuitsathome.com/mcu/arduino-usb-host-part-4-peripherals

    Lightweight USB Host Articles:
    Lightweight USB Host. Part 1 – Motivation
    https://www.circuitsathome.com/mcu/lightweight-usb-hostpart-1

    Lightweight USB Host. Part 2 – Hardware
    https://www.circuitsathome.com/mcu/lightweight-usb-host-part-2

    Lightweight USB Host. Part 3 – accessing MAX3421E
    https://www.circuitsathome.com/mcu/lightweight-usb-host-part-3

    Lightweight USB Host. Part 4 – The code
    https://www.circuitsathome.com/mcu/lightweight-usb-host-part-4-the-code-repository

    Lightweight USB Host. Part 5 – control transfers
    https://www.circuitsathome.com/mcu/lightweight-usb-host-part-5-control-transfers

    Lightweight USB host. Part 6 – introduction to HID
    https://www.circuitsathome.com/mcu/lightweight-usb-host-part-6-hid

    Other Links:

    Circuits@Home.com USB Host Shield References

    USB Host Shield Projects: A summary and Links for Hardware information, Arduino Libraries, and Application-specific information
    https://www.circuitsathome.com/arduino_usb_host_shield_projects

    USB Shield Blog: Some are older articles not used here, but have valuable information.
    https://www.circuitsathome.com/category/mcu/arduino/usb-shield

    Hardware Manual with Pictures of how to hook up the hardware!

    • Layout (Pinout descriptions)
    • Basic Usage
    • Power Options (3v & 5v limitations)

    https://www.circuitsathome.com/usb-host-shield-hardware-manual
    (Compare with Teensy 3.1 “USB Host Shield Library” below.)

    Teensy 3.1 USB Development Board References

    Teensy 3.1 – Main Page: New Features, Technical Specifications, and Pinout Diagrams.
    http://www.pjrc.com/teensy/teensy31.html

    Teensyduino
    Teensyduino is a software add-on for the Arduino IDE software.
    http://www.pjrc.com/teensy/teensyduino.html
    Also see
    https://forum.pjrc.com/threads/28207-Arduino-1-6-2-support

    Download the Arduino Software
    http://www.arduino.cc/en/Main/Software

    Download Teensyduino
    http://www.pjrc.com/teensy/td_download.html

    Teensy 3.0 now supported by the USB Host library: 3.1 support and pinouts!
    https://www.circuitsathome.com/mcu/teensy-3-0-now-supported-by-the-usb-host-library

    USB Host Shield Library with Pictures of how to hook up the hardware!

    • Hardware Requirements
    • USB Host Capacitance
    • USB Host Power Voltage (Power requirements for all devices)

    http://www.pjrc.com/teensy/td_libs_USBHostShield.html
    (Compare with USB Host Shield “Hardware Manual” above.)

    Teensy 3.x Native USB Host Preview Available 3-24-2015
    Looks like something else to play...

    Read more »

  • Stickvise Rules

    frankstripod06/16/2015 at 19:54 3 comments

    I had been using the roll-of-solder-to-hold-a-circuit-board-down trick forever until I won this Stickvise from the Hackaday Store. The Hackaday Prize is fantastic!

    Review conclusion:

    A solid bench tool that exceeds expectations and will last for years.

    Unpacking it, I quickly made the mistake of underestimating its small size. It firmly holds a board in place, nice and flat, with a solid metal feel. It flips over to so you can check your work. The grove in the jaws is perfect for holding boards, and I like the idea of jaw upgrades.

    Here was the biggest surprise:

    I took it out of the package and within 20 seconds, I had a Teensy in it adjusted to the perfect tension I wanted. Adjusting the exact tension and tightening the wing nut with one hand came naturally on the very first try because of its intuitive but simple design.

    Adjusting it tight will be good for stubborn parts, odd shaped parts, or gluing and clamping. It will be interesting to see what other uses it will have.

    This was also easy to set up in seconds:

    This one held tight and is about 5.5” x 7.5” (140mm x 190mm). It needs a little support on the ends.

    I want to find a wood base plate to attach it to, like Alex mentions at Stickvise.com/hacks/diy-upgrades, but would like a quick release system so that I can still peek underneath the board.

    Bottom:

    I like the idea of adding the Locking Ball and Socket Gooseneck System Alex also has, but prefer attaching it to the base plate rather than the Stickvise jaws.

    Ultimately I will be looking for the parts for a setup where the Stickvise, the Gooseneck System with helping hands, and a magnifier can all snap together onto the base plate, or quick release out of the way without disturbing anything.

    Stickvise: Mad Scientist Approved!

  • Five Reasons I Need a Stickvice

    frankstripod06/01/2015 at 02:43 0 comments

    $50k in Play: Awarding 65 Stickvise this Week

    Five Reasons I Need a Stickvice:

    1

    2

    3

    4

    5. My ENTIRE soldering setup: I need all the tools I can get!

    - 15w Radio Shack PC soldering iron. I can make it work on just about anything.

    - 25w Chisel tip soldering iron. Great for melting IC's or pealing off traces and pads.

    - Soldering iron holder doubles as a hammer (but only after the iron has cooled down.)

    - Cardboard protects the wood desk.

    - Stickless knockoff vise grips I got for free.

    - Plumbing solder

    - Chem-Wick and Radio Shack solder I know is more than 10 years old.

    My New Soldering Setup, with Upgrades as pictured above:

    - Frozen dinner tray from the recycling bin to hold water. Disregard soldering iron tip shaped notch taken off the side.

    - A sponge I stole from the kitchen to clean my soldering tip. This is a huge upgrade from the paper towel I was using.

    - A piece of foil to protect the cardboard. I am pretty sure the cardboard is not much more than 10 years old, but I may just splurge and replace that too!

    - New solder, flux and desoldering bulb I got from my local electronics store, and its like I'm a kid again!

View all 15 project logs

Enjoy this project?

Share

Discussions

canavan wrote 05/06/2015 at 21:45 point
I have a device (an AdderLink IP) that has VGA+PS/2 Keyboard+Mouse inputs and outputs and acts as a VNC server. It has a similar problem, in that it has to match the mouse pointer position of the VNC client to the mouse position on the server, among others to ensure that the entire screen of the remote system is actually reachable. The solution they came up with is to calibrate the mouse behaviour of the system it's connected to. You're instructed to have a plain background in the upper left corner of the screen; to measure the behaviour, the device runs the mouse to 0,0, moves it by various increments and checks the video output where the pointer actually ends up. It turns out that this is surprisingly accurate, in that they detect the type of acceleration (i've seen it detect X11, Windows and MacOS, if I'm not mistaken), and apparently the 1 or 2 additional numeric parameters required to compute the actual pointer position. They still have a button in their GUI to resync the mouse pointer position in case anything goes wrong. Obviously, you don't have the luxury of "watching" the video output to be able to chracterize the mouse acceleration. You could however try a calibration routine where the hardware and a python client work together. Afterwards, the Python client could store the resulting parameters in the hardware.

  Are you sure? yes | no

frankstripod wrote 05/07/2015 at 07:13 point

Amazing that is so accurate. This VGA framegrabbing link on the Had blog (thanks Rogan) was interesting too. It would add a lot of hardware cost, but you are giving me some good ideas! Thank you :)

  Are you sure? yes | no

chris.osiecki wrote 05/06/2015 at 16:20 point

So for the USB issue, why not do your switching virtually? Use your own hardware to receive and route data from the keyboard and mouse. When a host computer connects, go ahead and create two HID devices for it (a mouse and a keyboard) but leave them idle. When your device decides that computer [x] should be active, it routes all of its intercepted commands to the already-connected USB device. I realize this will likely cause your material cost to increase, but then you can do fun things like duplicate your input to all outputs and your switching time would go away since the computers wouldn't be connecting/disconnecting devices all the time. Also, I've had some instances where the PC would temporarily freeze when USB devices were added/removed and this caused interruptions to other USB connected hardware. Anyway, just an idea.

  Are you sure? yes | no

frankstripod wrote 05/07/2015 at 06:57 point

If by hardware you mean use one PC as a kind of "server" to chain the rest together, then loosing one PC would cause disconnections. I think the HaD blog comment using a "JUC400 Wormhole Switch" (thanks Karl) suggests the same thing. I would like to experiment with something like this and already have a board I can dedicate to it, so I would appreciate it if you could expand on your idea or offer any advice. Thank you!

  Are you sure? yes | no

josh wrote 05/08/2015 at 02:23 point

Not necessarily a PC: you could link 4 micro's together (spi, i2c, etc) where each provides the target computer a combined mouse/keyboard profile. a fifth would act as host to read from the real mouse/keyboard. A protoype could probably be done up with a quintet of Teensy's

  Are you sure? yes | no

frankstripod wrote 05/08/2015 at 05:36 point

That is exactly what I am trying to put together for this weeks 125 Teensy-LC givaway. I have been working on it already. Your advice would be appreciated when I get the project log up :)

  Are you sure? yes | no

trndr wrote 05/06/2015 at 09:17 point

An easy cross OS mouse detection solution would be to use pyautogui.

import pyautogui
screenSize=pyautogui.size()[0]
try:
    while 1:
        mousePosition=pyautogui.position()[0]
        if mousePosition==0:
            print("left")
        if mousePosition==screenSize-1:
            print("right")
except:
    pass

That said one approach would be to use a webcam and gaze detection to control which computer should be controlled, my personal gripe when I used synergy was I was never controlling the right computer.

  Are you sure? yes | no

frankstripod wrote 05/07/2015 at 06:33 point

I think that is exactly what I was looking for! I will try to use that for sure. Thank you so much for noticing my small cry for help. :)

  Are you sure? yes | no

Luke I`Liff wrote 05/06/2015 at 04:15 point

Have you thought about gestures? Stay with me here. Keep moving your mouse horizontally towards the edge of the screen. The mouse will stops horizontally but will have small movements vertically. Is there a way, over time, to poll the horizontal direction and then a number of pixel vertically?

  Are you sure? yes | no

frankstripod wrote 05/07/2015 at 06:26 point

I love the idea of gestures! I would like to work that into the hardware side, once that is all working.

  Are you sure? yes | no

rawe wrote 08/26/2014 at 20:44 point
I've never dealt with USB programming in detail (only read "USB in a nutshell"). Is there an "absolute relative" (e.g. "a% X, b% Y") positioning mode for USB HID mice? What is your plan to keep the polling delay(s) low?

  Are you sure? yes | no

frankstripod wrote 08/26/2014 at 21:29 point
I don't care to deal much with the USB side. I am trying to keep it simple so that anyone can duplicate the process. My creative hacking will use USB features from other circuits; like the absolute position from a Teensy 3.1 (hopefully), USB to serial from a USB Host Shield, switching from a USB four port switch. So my plan is to save about 2 years of research by taking advantage of circuits that already work. I just want one for me, I doubt anyone else would like its tradeoffs. Thank you for your comment! It helps me define this thing. Good to hear from you!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates