Hi, I am a fairly new programmer trying to interface with the seek thermal using my Pi. To do this, I tried several codes from:
https://gist.github.com/reagames/5bab03 ... b72e6a1ca3
and
https://gist.github.com/hightemp/9e20e3 ... 6613744c61
However, no matter whether the code is run in python 2 or python 3(after fixing the few errors that pop up when I run the original script), I constantly get a pipe error. If I am not mistaken there's something that may stopping it from reading the USB but I am unsure of what it is. Is there a way to prevent this error? Thank you for reading!
Reagames Version error (Ran in python 2):
ALSA lib pcm_hw.c:1903:(_snd_pcm_hw_open) card is not defined
Seek_Thermal_Pygame_fbtft_2.0:156: RuntimeWarning: No channels have been set up yet - nothing to clean up! Try cleaning up at the end of your program instead!
GPIO.cleanup() # cleanup all GPIO
Seek_Thermal_Pygame_fbtft_2.0:158: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
GPIO.setup(ledPin, GPIO.OUT) # PWM pin set as output
Traceback (most recent call last):
File "Seek_Thermal_Pygame_fbtft_2.0", line 716, in <module>
App.initialize()
File "Seek_Thermal_Pygame_fbtft_2.0", line 345, in initialize
self.camerainit(dev)
File "Seek_Thermal_Pygame_fbtft_2.0", line 237, in camerainit
self.send_msg(dev,0x41, 0x54, 0, 0, msg) # 0x54 = 84 Target Platform 0x01 = Android
File "Seek_Thermal_Pygame_fbtft_2.0", line 211, in send_msg
assert (dev.ctrl_transfer(bmRequestType, bRequest, wValue, wIndex, data_or_wLength, timeout) == len(data_or_wLength))
File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 1043, in ctrl_transfer
self.__get_timeout(timeout))
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 883, in ctrl_transfer
timeout))
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 32] Pipe error
Reagames Version (Ran in python 3.7):
Traceback (most recent call last):
File "Seek_Thermal_Pygame_fbtft_2.py", line 716, in <module>
App.initialize()
File "Seek_Thermal_Pygame_fbtft_2.py", line 345, in initialize
self.camerainit(dev)
File "Seek_Thermal_Pygame_fbtft_2.py", line 237, in camerainit
self.send_msg(dev,0x41, 0x54, 0, 0, msg) # 0x54 = 84 Target Platform 0x01 = Android
File "Seek_Thermal_Pygame_fbtft_2.py", line 211, in send_msg
assert (dev.ctrl_transfer(bmRequestType, bRequest, wValue, wIndex, data_or_wLength, timeout) == len(data_or_wLength))
File "/home/pi/.local/lib/python3.7/site-packages/usb/core.py", line 1043, in ctrl_transfer
self.__get_timeout(timeout))
File "/home/pi/.local/lib/python3.7/site-packages/usb/backend/libusb1.py", line 883, in ctrl_transfer
timeout))
File "/home/pi/.local/lib/python3.7/site-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 32] Pipe error
Hightemps Version error (Ran in python 2):
Traceback (most recent call last):
File "Seek_2.0.py", line 611, in <module>
app=App(None)
File "Seek_2.0.py", line 63, in __init__
self.initialize()
File "Seek_2.0.py", line 343, in initialize
self.camerainit(dev)
File "Seek_2.0.py", line 178, in camerainit
self.send_msg(dev,0x41, 0x54, 0, 0, msg) # 0x54 = 84 Target Platform 0x01 = Android
File "Seek_2.0.py", line 97, in send_msg
assert (dev.ctrl_transfer(bmRequestType, bRequest, wValue, wIndex, data_or_wLength, timeout) == len(data_or_wLength))
File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 1043, in ctrl_transfer
self.__get_timeout(timeout))
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 883, in ctrl_transfer
timeout))
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 32] Pipe error