I would like to make a button, that functions like the left click button of a mouse, and hooks up to a computer through USB...
ideally, if it could be wireless that would be awesome
but I can't even figure out what I need to make the wired version of it... I've tried googling this but can't find anything, does anyone know what compenents I would need to make this happen, what kind of IC takes in a click and sends it USB... or how does a computer even recognize that a mouse is plugged into its USB port?
any help would be much appreciated, sorry if anyone already ran into this post, I thought I posted it the other day, but I can't find it on here.
How many of these do you need? If it's under, oh, say, 50, you're probably far better off just purchasing off-the-shelf mice and hacking them up as needed for your application.
Mice, as a rule, are low-speed (1.5Mbps) devices. As such, with a fast enough microcontroller you can (and a few people do) "bit bang" the protocol -- but it's far easier to find a so-called "USB microcontroller" (most of the major manufacturers have them -- Cypress and Atmel are certainly popular) that has a "hardware serial port" that runs at the right speed (and usually has a small FIFO). However, after that you have all the software, and while the USB low-level (physical level) protocol is somewhat more complex than, e.g., an RS-232-type serial port, the higer-level ("mouse" level) protocol is *far* more complex than, e.g., a PS/2 mouse -- if at all possible, you'll want to just re-use some existing code, tweaked as needed, rather than writing it all from scratch (...it's not an exaggeration to suggest that writing all the software from scratch could easily exceed 1000 hours depending on your skills and how much testing you do...).
Here's some reading to get you started:
formatting link
-- most of the other USB microcontroller manufacturers will have something similar. For more information on USB itself, Googling "USB tutorial" will get you a lot of hits, and Jan Axelson's book --
formatting link
-- is a very popular tome that will tell you pretty much everything you need to know.
Atmel has a couple of app notes. One for an RF (2.4 GHz ISM) mouse link to a USB-connected receiver and one for a "regular" wired USB mouse . Example source code seems to be available on the respective dev board pages.
Is this a one-off project? If so, I'd recommend just getting a mouse and rips the guts out of it. Then, re-package it the way you want, but just don't hook up any of the undesired buttons.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.