Skip to content

Commit e3e3c9f

Browse files
author
Hansen0314
committed
add:mlx90641 describe at readme.md
1 parent ce5e7b6 commit e3e3c9f

File tree

2 files changed

+19
-24
lines changed

2 files changed

+19
-24
lines changed

README.md

+18-22
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,51 @@
1-
# seeed MLX90640
1+
# seeed MLX9064x
22

3-
The MLX90640 is a fully calibrated 32x24 pixels IR array in an industry standard 4-lead TO39 package with digital interface The MLX90640 contains 768 FIR pixels. An ambient sensor is integrated to measure the ambient temperature of the chip and supply sensor to measure the VDD. The outputs of all sensors IR, Ta and VDD are stored in internal RAM and are accessible through I2C.
3+
The MLX9064x is a fully calibrated 32x24(12 x 16) pixels IR array in an industry standard 4-lead TO39 package with digital interface The MLX90640 contains 768 FIR pixels and The MLX90641 contains 192 FIR pixels. An ambient sensor is integrated to measure the ambient temperature of the chip and supply sensor to measure the VDD. The outputs of all sensors IR, Ta and VDD are stored in internal RAM and are accessible through I2C.
44

55
# Dependencies
66

77
This driver depends on:
8+
89
- [***grove.py***](https://github.com/Seeed-Studio/grove.py)
910

1011
This is easy to install with the following command.
11-
```
12-
13-
curl -sL https://github.com/Seeed-Studio/grove.py/raw/master/install.sh | sudo bash -s -
1412

15-
```
13+
```
14+
pip3 install Seeed-grove.py
15+
```
1616

1717
## Installing from PyPI
1818

1919
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:
2020

2121
```
22-
23-
pip3 install seeed-python-mlx90640
24-
22+
pip3 install seeed-python-mlx9064x
2523
```
2624

2725
To install system-wide (this may be required in some cases):
2826

2927
```
30-
31-
sudo pip3 install seeed-python-mlx90640
32-
28+
sudo pip3 install seeed-python-mlx9064x
3329
```
3430

3531
if you want to update the driver locally from PyPI. you can use:
3632

3733
```
38-
pip3 install --upgrade seeed-python-mlx90640
34+
pip3 install --upgrade seeed-python-mlx9064x
3935
```
4036

4137
## Usage Notes
4238

4339
First, Check the corresponding i2c number of the board:
4440

4541
```
46-
47-
(.env) pi@raspberrypi:~ $ ls /dev/i2c*
42+
pi@raspberrypi:~ $ ls /dev/i2c*
4843
/dev/i2c-1
49-
5044
```
5145

52-
Check if the i2c device works properly, 0x33 is the MLX90640 i2c address.
53-
```
46+
Check if the i2c device works properly, 0x33 is the MLX9064x i2c address.
5447

48+
```
5549
pi@raspberrypi:~/Seeed_Python_SGP30 $ i2cdetect -y -r 1
5650
0 1 2 3 4 5 6 7 8 9 a b c d e f
5751
00: -- -- -- -- -- -- -- -- -- -- -- -- --
@@ -62,17 +56,17 @@ pi@raspberrypi:~/Seeed_Python_SGP30 $ i2cdetect -y -r 1
6256
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
6357
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
6458
70: -- -- -- -- -- -- -- --
65-
6659
```
6760

6861
## initialize the sersor object:
6962

7063
Initialize the sersor object and config the sersor refresh rate.
7164

7265
```python
73-
import seeed_mlx90640
74-
mlx = seeed_mlx90640.grove_mxl90640()
75-
mlx.refresh_rate = seeed_mlx90640.RefreshRate.REFRESH_8_HZ # The fastest for raspberry 4
66+
import seeed_mlx9064x
67+
mlx = seeed_mlx9064x.grove_mxl90640()
68+
#mlx = seeed_mlx9064x.grove_mxl90641()
69+
mlx.refresh_rate = seeed_mlx9064x.RefreshRate.REFRESH_8_HZ # The fastest for raspberry 4
7670
# REFRESH_0_5_HZ = 0b000 # 0.5Hz
7771
# REFRESH_1_HZ = 0b001 # 1Hz
7872
# REFRESH_2_HZ = 0b010 # 2Hz
@@ -89,7 +83,9 @@ To read from the sensor:
8983

9084
```python
9185
try:
86+
9287
frame = [0]*768
88+
#frame = [0]*192
9389
mlx.getFrame(frame)
9490
except ValueError:
9591
continue

seeed_mlx9064x.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,7 @@ def _GetFrameData(self):
838838
reciver.append(statusRegister[0] & 0x0001)
839839
del reciver[0]
840840
return reciver
841+
841842
def _GetTa(self, frameData):
842843
vdd = self._GetVdd(frameData)
843844
ptat = frameData[224]
@@ -1178,7 +1179,6 @@ def _ExtractOffsetParameters(self):
11781179
tempOffset = eeData[640 + Index] - 2048
11791180
self.offset[1][Index] = tempOffset * scaleOffset + offsetRef
11801181

1181-
11821182
def _ExtractKtaPixelParameters(self): # pylint: disable=too-many-locals
11831183
# extract KtaPixel
11841184
ktaTemp = [0] * 192
@@ -1245,7 +1245,6 @@ def _ExtractDeviatingPixels(self):
12451245
self.brokenPixels[brokenPixCnt] = pixCnt
12461246
brokenPixCnt += 1
12471247
pixCnt += 1
1248-
12491248
if brokenPixCnt > 2:
12501249
raise RuntimeError("More than 3 broken pixels")
12511250
print("Found %d broken pixels" % (brokenPixCnt))

0 commit comments

Comments
 (0)