Connecting a USB device inside BLENDER

Hi!
I’m new here so glad to be here in this awesome forum! :slight_smile:

I’m trying to get a device connected by USB (an indoor rower : http://www.concept2.co.uk/indoor-rowers/model-d ), and uses the data sent live inside BLENDER.

With a custom script which uses pyUSB ( http://sourceforge.net/apps/trac/pyusb/ ), I’ve managed to link my device to the PC and read the input.

I’m trying now to do the same thing inside Blender :cool:
How can I use pyUSB inside Blender?

I’ve tried to copy all the module inside the “scripts” folder, and apparently they are found correctly by blender.
The error which appears is :

File “C:\Program Files\Blender Foundation\Blender\2.67\scripts\modules\usb\core.py”, line 846, in find

File “C:\Program Files\Blender Foundation\Blender\2.67\scripts\modules\usb\core.py”, line 846 in find
raise ValueError(‘no backend available’)
ValueError: No backend available

The rest of the traceback? And tbh, it would be eaiser with a serial interface or Linux (gotta love everything being a file with io support). HID is always messy.

Without the entire error message it is difficult to tell what the problem is.

General suggestions would be:

  • Does the pyUSB support the same version of Python that Blender is using?
  • Does pyUSB require any .DLLs or libraries that are not in the correct path?

WOW! I was editing my first post (I am the original poster) and everything got deleted!!!

so here’s the problem:
I’m trying to connect by USB an indoor rower, to have it recognized inside Blender.
I’m using a custom module, named “pyUSB”. I’ve tried to copy/paste this module inside the script folder of Blender.

Now, here’s the traceback:

File “C:\Program Files\Blender Foundation\Blender\2.67\scripts\modules\usb\core.py”, line 846, in find
raise ValueError(‘No backend available’)
ValueError: No backend available

To answer kastoria:
-pyUSB can work with Python >= 2.4 –> see here : http://sourceforge.net/apps/trac/pyusb/
-I don’t know exactly. I know that “libusb-win32” is needed (I’ve installed it inside Windows).

Klopp without going and looking directly at how it goes, I know for a fact that blender’s integrated python environment may or may not look at what else you have going on in the system, so, you may need to make sure that blender’s python knows where to look for it.

With numpy, scipy and matplotlib and others installed locally on my windows machine,


import sys

sys.path.append("F:\\python33\\Lib\\site-packages\\")
import numpy


On the backend this may be useful http://stackoverflow.com/questions/13773132/pyusb-on-windows-no-backend-available