Hi there,
I have purchased the thermal 55 degree MLX90640 based thermal imaging camera, and previously a grovepi
I decided to connect them up and try out the example code.
[code]
# MLX90640 connected via i2c port on Grove Pi
import grovepi
import seeed_mlx90640
import time
mlx = seeed_mlx90640.grove_mxl90640()
mlx.refresh_rate = seeed_mlx90640.RefreshRate.REFRESH_2_HZ
frame = [0] * 768
while True:
start = time.time()
try:
mlx.getFrame(frame)
except ValueError:
continue
print(frame)
end = time.time()
print(“The time: %f”%(end - start))
[/code]
when I try and run this I get a compile error;
</s><i>
</i>Traceback (most recent call last):
File "/home/pi/dev/get_thermal_frame.py", line 8, in <module>
mlx = seeed_mlx90640.grove_mxl90640()
File "/home/pi/.local/lib/python3.5/site-packages/seeed_mlx90640.py", line 58, in __init__
self.refresh_rate = RefreshRate.REFRESH_0_5_HZ
File "/home/pi/.local/lib/python3.5/site-packages/seeed_mlx90640.py", line 83, in refresh_rate
self._I2CReadWords(0x800D, controlRegister)
File "/home/pi/.local/lib/python3.5/site-packages/seeed_mlx90640.py", line 699, in _I2CReadWords
write = self.bus.msg.write(self.addr,[addr>>8,addr&0xFF])
File "/home/pi/.local/lib/python3.5/site-packages/grove/i2c.py", line 51, in __getattr__
return getattr(self.instance, name)
AttributeError: 'SMBus' object has no attribute 'msg'
<e>