Skip to content

Commit 1374273

Browse files
committed
new Seeed_Python_MLX90640
1 parent 1bbd76b commit 1374273

File tree

5 files changed

+452
-1
lines changed

5 files changed

+452
-1
lines changed

README.md

+74-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,74 @@
1-
# Seeed_Python_MLX90640
1+
# seeed MLX90640
2+
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.
4+
5+
# Dependencies
6+
7+
This driver depends on:
8+
- [***grove.py***](https://github.com/Seeed-Studio/grove.py)
9+
10+
This is easy to install with the following command.
11+
```
12+
curl -sL https://github.com/Seeed-Studio/grove.py/raw/master/install.sh | sudo bash -s -
13+
```
14+
## Installing from PyPI
15+
16+
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:
17+
18+
```
19+
pip3 install seeed-python-mlx90640
20+
```
21+
22+
To install system-wide (this may be required in some cases):
23+
24+
```
25+
sudo pip3 install seeed-python-mlx90640
26+
```
27+
28+
## Usage Notes
29+
30+
First, Check the corresponding i2c number of the board:
31+
```
32+
(.env) pi@raspberrypi:~ $ ls /dev/i2c*
33+
/dev/i2c-1
34+
```
35+
36+
Check if the i2c device works properly, 0x33 is the MLX90640 i2c address.
37+
```
38+
39+
pi@raspberrypi:~/Seeed_Python_SGP30 $ i2cdetect -y -r 1
40+
0 1 2 3 4 5 6 7 8 9 a b c d e f
41+
00: -- -- -- -- -- -- -- -- -- -- -- -- --
42+
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
43+
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
44+
30: -- -- -- 33 -- -- -- -- -- -- -- -- -- -- -- --
45+
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
46+
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
47+
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
48+
70: -- -- -- -- -- -- -- --
49+
50+
```
51+
52+
Next, initialize the sersor object:
53+
54+
```python
55+
import seeed_mlx90640
56+
sensor = seeed_mlx90640.grove_mxl90640()
57+
```
58+
59+
## Reading from the Sensor
60+
61+
To read from the sensor:
62+
63+
```python
64+
Pixel = [0]*801
65+
for i in range(0,801):
66+
Pixel[i] = sensor.getCompensatedPixData(i//32,i%32)
67+
del Pixel[0:33]
68+
print(len(Pixel)) #24x32 pixel
69+
print(Pixel)
70+
```
71+
72+
## Contributing
73+
74+
If you have any good suggestions or comments, you can send issues or PR us.

examples/BasicReadings.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import seeed_mlx90640
2+
import time
3+
def main():
4+
sensor = seeed_mlx90640.grove_mxl90640()
5+
while True:
6+
time.sleep(1)
7+
Pixel = [0]*801
8+
for i in range(0,801):
9+
Pixel[i] = sensor.getCompensatedPixData(i//32,i%32)
10+
del Pixel[0:33]
11+
print(len(Pixel))
12+
print(Pixel)
13+
14+
if __name__ == '__main__':
15+
main()

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mlx90640

0 commit comments

Comments
 (0)