475
you are viewing a single comment's thread
view the rest of the comments
[-] tiredofsametab@kbin.run 38 points 3 months ago

I will learn to build a mouse and write my own damn drivers first.

[-] captain_aggravated@sh.itjust.works 22 points 3 months ago

I actually know how to do this off the top of my head and you don't need to write a driver for it, you could simply use an Arduino Micro.

The Micro (and other Arduino-compatible Atmel ATMEGA 32u4-based microcontrollers) have native USB support so they have a library you can import that will work with generic USB keyboard/mouse drivers. It would be up to you to rig up the sensors and buttons, make a case and write a little firmware.

[-] tiredofsametab@kbin.run 5 points 3 months ago

Nice! Thank you!

[-] Aceticon@lemmy.world 2 points 3 months ago* (last edited 3 months ago)

Coming from the same side as you, in my experience just about any microcontroller that includes USB hardware support (which is very common even in the stupidly cheap ones) has software support for acting as a mouse or keyboard, not just via the Arduino framework but also in the manufacturer's libraries.

This is because the comms for that stuff in USB is an USB standard called USB HID (stands for Human Interface Device) which works not just for mice and keyboards but also for stuff like joysticks, game controllers and so on.

Meanwhile on the computer side, also because of all of this being standardized, support comes include in the OS and no drivers are needed. In fact even back in Windows 7 when you might need to install a driver, all that the "driver" was, was a text file telling the OS to, for a USB device with a specific ID (USB devices identify themselves using a two number code), use the OS' built-in USB HID support.

Nowadays the difficult part in making a good mouse or a keyboard is the mechanical side, not the hardware or software.

Unsurprisingly you can buy a basic mouse for 2 bucks from places like Aliexpress that's actually decent and reliable.

I really have no clue how Logitech expects to get away with this idea of theirs. Maybe they intend to leverage Brand loyalty for it?

[-] captain_aggravated@sh.itjust.works 2 points 3 months ago

Yeah what Arduino brings to the table is easily purchasable electronics and reference material/tutorials written for middle schoolers and not electrical engineers to understand. They invent basically nothing but make things more accessible.

The thing I would need to do the most googling on is the actual XY sensor. I don't know off the top of my head how available an optical mouse sensor is, or if you'd have to build a ball mouse, etc. I have occasionally played with USB HIDs but never for anything legitimate.

this post was submitted on 30 Jul 2024
475 points (95.4% liked)

Technology

59562 readers
2497 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS