spacemouse and arduino

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
Thorsten
Posts: 6
Joined: Fri Jan 30, 2015 1:15 pm

spacemouse and arduino

Post by Thorsten » Tue Feb 03, 2015 12:57 pm

Hi again,
I already posted this question in the german forum.
The goal is to control a quadrocopter via a spacemouse. Hardware is an arduino mega 2560 with a USB shield 2.0.
I found a library here , but it's not very helpful. This library is only a clone of the Hid Joystick library, reading 5 Byte and send it to serial.
I found that the Spacemouse sends a Byte with the mode# followed by singned int with Tx, Ty and Tz or Rx, Ry, Rz
Mode 3 is followed by 6 Bytes containing the Buttonnumber.
First question, is this correct?
Another question is, is there a doc about other commands, like turn in the Led, Device identifyer.
Do i have to handle the dominant mode by Software, or is there a Command.

regards Thorsten

jwick
Moderator
Moderator
Posts: 2803
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: spacemouse and arduino

Post by jwick » Wed Feb 04, 2015 6:02 am

That description of the data packets is correct for older devices. The newest devices deliver both the translation and rotation packets in a single long translation packet.

Yes, you do have to do the filtering in your software.

The LED packet is described elsewhere in the forum. See this post.

Post Reply