I have been gone for a while, sorry. I finally got a spot to set up my desk and computers, and I realized I had all the parts I needed to piece something together.
I seriously want to make a real circuit board and make this project legitimate... Oh crud, I dead bugged it again... I thought this was a work around for cost, but forces me to realize my fear of asking for help.
The Major Problems
My original brainstorm, to count pixels and determine mouse location before and without communication with a computer, turns out to be more storm than brain. I have come up with two solutions to this, the first being the working version 1.0 prototype that cheats.
The second solution will be a long term experiment (with the pixel counting, or something), and a more powerful processor, possibly Intel based with Linux. This would keep my my other concept going, that it is possible to replace computer software drivers with an external hardware module system. The problem with the second solution is keeping the cost down. It will eventually get its own project log.
Getting this to work as intended is in need of a crude USB hack, that tricks the host computers into thinking the devices on this hub never get disconnected, even though they are switched around. My limited bubbled search leads me to believe it is an impedance hack, but there might be more to it then soldering four resistors on the USB output connectors.
Version 1.0 Prototype Cheats:
Cheat 1. Use the Teensy touch sensors with thin wire and sticker like buttons, in any or all of the four combinations:
- A. At the sides of a dedicated mouse pad for left right screen switching.
- B. Stuck on to a mouse as extra buttons for left right screen switching.
- C. At the top of a dedicated mouse pad for 1 through 4 instant switching.
- D. Stuck on four monitors for 1 through 4 instant switching.
Cheat 2. A Python Script (not working yet) on each computer that detects cursor edge position, then signals for the Teensy to do the switching through USB Serial. I know this really breaks my rule of No Drivers, and probably many other rules of common sense in programming, but it will look cool :)
All I have so far is for Windows only in the Python Shell, and where "yay left" and "yay right" = missing Teensy USB Serial code.
Python 3.4.3 32bit Win7 with pywin32 from: http://sourceforge.net/projects/pywin32/?source=navbar
import win32api screenx, screeny = 1279, 1023 x, y = 1, 1 def detect(x, y): while x > 0 and x < screenx: x, y = win32api.GetCursorPos() return x, y x, y = detect(x, y) if x == 0: print ("yay left") if x == screenx: print ("yay right")
I would definitely need a Linux and Mac solution also (help!)Q? Would putting in a delay (from time import sleep, sleep(0.1)) make it less taxing on the CPU?
Cheat 3. I hacked it from other working devices that I had laying around...
"Oh crud, I dead bugged it again"
I used two 4pin headers as a floating socket so the Teensy is removable.
LED's poke out the front show which port is selected. Another 4pin header also pokes out revealing four touch pins from the Teensy.
I used the relay and diode from my mouse project.
More pictures, USB cables, and hopefully a video of it all working will be posted soon.