0
\$\begingroup\$

I am making a device, similar to a cross between a controller and a mouse, and I wondered how I would send input to the computer.
For example: Transmitting movement, buttons pressed etc.
Also, how would I make it so the computer automatically detects it as a mouse.

Thanks in advance.

\$\endgroup\$
2
  • \$\begingroup\$ Are you starting from scratch, or using a framework / HAL / OS that exists? (e.g: Arduino, Zephyr, etc...) You're probably most interested in the "Human Interface Device" class. \$\endgroup\$ Commented Jan 13, 2024 at 18:54
  • \$\begingroup\$ The normal way to do this would be with a library for your microcontroller that implements USB HID. \$\endgroup\$ Commented Jan 13, 2024 at 19:31

1 Answer 1

1
\$\begingroup\$

You need to look up how USB works.

When plugged in, there is an enumeration process where PC asks what kind of device was connected, and in this case, your device likely wants to tell the PC that it a mouse or some other standard HID device. Then you need to send movement and button changes in USB packects according to HID standard.

\$\endgroup\$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.