First post, by CalamityLime
- Rank
- Member
Hey there.
A project that I've been working on the past little while is building an adaptor to convert a bog standard USB mouse to a Serial mouse.
Some people might remember me from this topic -> Fixing up a broken 486 I got from a local radio. While I had been working on this project I was keeping an eye on eBay for some Serial mouse to use at a decent price, while a few popped up, they were a bit rubbish. Thus began my adventure looking for some way to convert a newer mouse to a serial mouse.
I had a look around the forums for solutions. Matze's, Lameguy64's and Necroware's PS/2 to serial boards popped up as did that one solution that used a nullmodem cable + a pi to go from USB to Serial.
At the time I decided go with Matze's solution and ordered the bits to make up my own board, plus a few extra with the intention of trying to sell off the few extra. There's a bit more information on this in the thread linked above. Ultimately I thought "why can't this be done with a USB mouse?"
I turned to the Pi Pico because it has a USB host device caked in plus I had three of them kicking around. There aren't many examples out there for the Pico acting as a USB host which was frustrating and in the end I went with the C SDK from the Raspberry pi foundation. I hadn't used C since learning to code so it was a bit of a challenge.
It already exists....
A few days into hacking code together and trying to figure out how exactly a Serial Mouse works I found that I'm not the only one who's had this idea. A fellow vogons user by the name Aviancy made amouse, which was exactly what I was trying to make. Their thread is here.
For a while I actually thought I was the only person actually going down this path since I honestly couldn't find anything on using a Pico to convert a USB mouse to Serial mouse, other than people suggesting the idea. The discovery hurt my motivation for bit, it was sort of embarrassing since I found that project right after I made a post talking about this idea on my other thread (which I do suggest reading).
None the less, I decided to keep going and try to enjoy it. BTW because that project exists, I'm not writing this post as an announcement and more like a blog.
It did something!
After I got my hands on a max232 I very quickly wired it up and it actually did something. The PC detected the pico as a mouse but that was all at the time.
The momentum from this moment got me to make something very hacky but did actually work. I could connect a mouse to the pico and the pc was happy out using that input as serial mouse input.
I called it a day after that since it was sometime in the AMs by then. Since that point I've been cleaning up my code and trying to make the user experience better than "if the LED stops blinking, it crashed"
Where is this project now?
It's still in the "cleaning up code and improving user experience" stage. I'm not releasing the code right now just because the code is still a bit of a mess. I'm quite self conscious about my code and I'd like to doll it up before sharing.
Why am I even posting this?
Well I'd like to get some idea as to how much interest there is for something like this. Depending on the interest level, I could even go as far as to make up and sell a small batch of ready made boards.
If you're interested on where and how far this project goes, let me know. If you have ideas for this, feel free to comment. I'm all ears!
In terms of pin header options here's what I have currently.
- 25%/50%/75% Mouse XY Tracking Speeds. (Thanks to my testing mouse being broken!)
- Three Button / Microsoft Wheel mouse.
- Double Stop bit. (This idea came from Necrowares PS/2 to Serial adaptor)
I'm not sure what else to say, so I'll leave it here for now.
Thank you for reading, your comments and your interest.
-Lime
Be Happy, it's only going to get worse.
- Projects
Limes Strange 3D models
USB-2-232