Raspberry Pi
Moderator: Moderators
Re: Raspberry Pi
Change the dev.read to read 13 bytes.
Then you will get one long packet with the T and R vector together.
This only works with a USB connection. Not the wireless dongle.
I've only tested this on a RPi3.
Then you will get one long packet with the T and R vector together.
This only works with a USB connection. Not the wireless dongle.
I've only tested this on a RPi3.
Re: Raspberry Pi
Thank you! its working now! Do you have any documents so I can see how the byte-package looks like?
Re: Raspberry Pi
Each USB device tells exactly what it sends and how it sends it in its device descriptor. I print that at the beginning.
It's also useful to uncomment that
# print data
line. To see the various packets that are coming from the device.
On Windows, the software installs with an XML file (Base.xml) that describes the button packets, but it's easier just to press the button to see what comes out.
All the devices, currently have exactly the same 6DOF data.
There isn't much documentation available beyond that.
It's also useful to uncomment that
# print data
line. To see the various packets that are coming from the device.
On Windows, the software installs with an XML file (Base.xml) that describes the button packets, but it's easier just to press the button to see what comes out.
All the devices, currently have exactly the same 6DOF data.
There isn't much documentation available beyond that.
Re: Raspberry Pi
Hello its me again the application is working now. Im really thankfull for the support! I have one question left. Does the Spacemouse enterprise have the same data exchange protocol (the 13 byte package)?
Re: Raspberry Pi
Yes, the SpaceMouse Enterprise has the same axis data format.
The buttons may be different.
Let us know what interesting things you are doing with the 3D mouse and an RPi.
The buttons may be different.
Let us know what interesting things you are doing with the 3D mouse and an RPi.
Re: Raspberry Pi
Hey John,
I've made a quick teach-in device for industrial robots from the 3d mouse. You can private message me if you want any further info .
I've made a quick teach-in device for industrial robots from the 3d mouse. You can private message me if you want any further info .
Re: Raspberry Pi
Hello, total noob here. I am trying to use the SN to control a 6 axis surgical table. Doing this through a Pi3B. Do I need to have the normal driver for the SN installed? If so which OS driver should be installed on the Pi?
So far I run into an error where it can't find "usb.core"
Thanks for any help!
So far I run into an error where it can't find "usb.core"
Thanks for any help!
Re: Raspberry Pi
Does the normal SN driver need to be installed on the Pi for this to work? If so which OS driver should be used?
Re: Raspberry Pi
There is no driver for the RPi. Interesting idea though. I can see all sorts of possibilities.
The only solution ATM is to directly read the device.
You will need to link in the required libraries.
The only solution ATM is to directly read the device.
You will need to link in the required libraries.
Re: Raspberry Pi
Thank you for the response.
So I am trying to use code you wrote, SpaceNavigatorLEDs.py. When running I get the error "ImportError: No module named usb.core"
What specific libraries do I need to link? Again, total noob here, so thanks for the help. I designed and produced the table, now just trying to come up with a nicer way to operate it than with a bunch of toggle switches.
So I am trying to use code you wrote, SpaceNavigatorLEDs.py. When running I get the error "ImportError: No module named usb.core"
What specific libraries do I need to link? Again, total noob here, so thanks for the help. I designed and produced the table, now just trying to come up with a nicer way to operate it than with a bunch of toggle switches.
Re: Raspberry Pi
You may need to unstall pyusb.
Something like:
apt-get install python libusb-1.0-0
pip install pyusb
Something like:
apt-get install python libusb-1.0-0
pip install pyusb
Re: Raspberry Pi
Thanks! The program now looks to run without errors. Is there a way that I can easily see whether the pi is reading the data packets sent by the SN? I don't get any readings from the GPIO pins when moving the SN around.
Re: Raspberry Pi
Print them to the console?
Re: Raspberry Pi
Thank you for the help. I've got it working now. It's a little tricky to control the table as it senses even the slightest pressure in any direction. Is there an easy way to make it less sensitive, almost like when being used with CAD where you can set it to only operate one axis at a time? I'm thinking perhaps some how extending a dead zone into the lower values. Again, not a programmer, so not quite sure how this would work.
Re: Raspberry Pi
As soon as I posted, I figured out that I can easily change the "if val <0" and "elif val >0" to have a dead zone. Currently running it between -20 and 20 which has made the control much more manageable.BSkog wrote: ↑Tue Jun 22, 2021 11:57 am Thank you for the help. I've got it working now. It's a little tricky to control the table as it senses even the slightest pressure in any direction. Is there an easy way to make it less sensitive, almost like when being used with CAD where you can set it to only operate one axis at a time? I'm thinking perhaps some how extending a dead zone into the lower values. Again, not a programmer, so not quite sure how this would work.