I am trying to import live data from an external device via the serial port into blender. I have used the python-serial module with python already, but when I try to use it with blender I get the following console error:
Using Python version 2.3
Traceback (most recent call last):
File “regblender.py”, line 23, in ?
File “/usr/lib/python2.3/site-packages/serial/serialposix.py”, line 272, in read
buf = os.read(self.fd, size-len(read))
OSError: [Errno 11] Resource temporarily unavailable
Does anybody has any idea if and how the module would work with blender? Otherwise I think I have to use a temp file to do the job.
My configuration: Blender 2.41 with python2.3 running on Debian-Linux 3.1 “Sarge” with python 2.3 installed and pythonpath set properly.
It could be the diferent versions of python cause the problem, or it could be the external device needs some time to respond.
I used pyserial to connect a motion tracking device once, and implementid it to work with a HMD. I got a real headache from figuring out the device stared initializing after the serial port was opened, and some signal set to 0 (or 1 i don’t remember) and it needed time before it could be addressed.
you could try including:
or something like that, after the opening and initialization of the port.
on the other hand if it is a python version problem you may need to install the python that goes with jour Blender (or vise versa )
I hope this helps
if not give another yell and I will kook up what I did exactly with the motion tracker.
yes, you helped:
that did it!
The interesting thing is that my “native” python 2.3 installation here does not has that problem - it just opens the port and runs and runs and runs…
thanks for your help, Mark