SpaceMouse Module Serial (3DX-700039)

Questions and answers about 3Dconnexion devices on UNIX and Linux.

Moderator: Moderators

Post Reply
alitaleb
Posts: 3
Joined: Wed Jul 20, 2016 4:56 am

SpaceMouse Module Serial (3DX-700039)

Post by alitaleb » Wed Jul 20, 2016 5:08 am

Hello!

My question is specifically related to the SpaceMouse Module Serial ( Datasheet: http://www.3dconnexion.de/fileadmin/use ... erial_.pdf)

Problem: I am trying to connect it to a Raspberry Pi or Arduino and receive data from this sensor. Essentially, this type of sensor communicates serially thus it is not as simple as other sensors; where you simple plug it in the GPIO pins.

Work done on it so far: I tried implementing the following codes since I found a similar sensor online that communicates via UART ( Serial communication)

For an Arduino:
http://www.co2meters.com/Documentation/ ... o-uart.pdf

or something like this using the Raspberry Pi (Python):

#Python app to run a K-30 Sensor
import serial
import time
ser=serial.Serial("/dev/ttyAMA0")
print"Serial Connected!"
ser.flushInput()
time.sleep(1)

while True:
ser.write("\xAD\xAE\xAC\XAF")
time.sleep(.01)
resp=ser.read(4)
high=ord(resp[3])
low=ord(resp[4])
co2=(high*256)+low
print""
print""
print"Co2="+str(co2)
time.sleep(1)


Any sort of help would be appreciated, thanks in advance!

Post Reply