1
\$\begingroup\$

I'am Doing a "Wireless mouse using data glove" . In this user wears a Hand glove equipped with sensors, microcontroller & transmitter. I could detect left & right movement of hand & i could detect clicks & transmit them using transmitter.

The receiving module consists of a receiver, microcontroller and receiver should be connected to USB of computer. Now, Which protocol i should use to indicate the computer to move mouse pointer accordingly ?

\$\endgroup\$
4
  • \$\begingroup\$ what options do you have? \$\endgroup\$
    – Andy aka
    Commented Feb 15, 2014 at 16:29
  • 2
    \$\begingroup\$ You want it to act as a HID device so that the operating system doesn't need special drivers to use it as a basic mouse. \$\endgroup\$ Commented Feb 15, 2014 at 18:36
  • \$\begingroup\$ USB Human Interface Device (HID). USB HID for mice is standardized, and depending on your microcontroller you probably have examples for a usb hid mouse (Some Pic or Msp430 do). See usbmadesimple.co.uk/ums_5.htm \$\endgroup\$
    – Passerby
    Commented Feb 15, 2014 at 22:20
  • \$\begingroup\$ Implementing your own 'mouse' is the ideal, but easiest of all may be to connect hardware inputs to an existing mouse. \$\endgroup\$
    – Russell McMahon
    Commented Feb 16, 2014 at 12:46

2 Answers 2

1
\$\begingroup\$

As mentioned in comments the HID (Human Interface Device) class is what you're looking for to operate as a mouse without any special drivers. You can find the full specifications at HID Related Specifications at USB.org although they're fairly heavy reading.

Your best bet to get started is probably to buy a development board that contains a USB compatible microcontroller and has a vendor supported USB stack available. Both the AVR and PIC series have one available if you're after a small 8-bit solution, but many vendors provide the same.

As an example recently I purchased a Microchip Low Pin Count USB Dev kit that came with complete working examples that made getting started easy. While I was using the CDC class I noticed it also included an example for a HID mouse.

\$\endgroup\$
0
\$\begingroup\$

Alternatively, but mostly for completeness reasons, you could also implement the PS/2 protocol, given your consuming device (a computer) has a PS/2 port. PS/2 might be a bit more straight forward.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.