Thermopile Shield¶
Thermopile Shield memberi OpenMV Cam sebuah array sensor termal 16x4 melalui I2C untuk pencitraan termal resolusi rendah dan pengukuran suhu per piksel.
Untuk datasheet lengkap, foto, dan pemesanan, lihat halaman produk Thermopile Shield.
Sorotan¶
Array sensor termal 16x4, bidang pandang 60 derajat x 16 derajat
Suhu objek dari -50 C hingga 300 C
Pinout¶
Referensi pin¶
Pin |
Fungsi |
|---|---|
P4 |
I²C SCL — clock ke array thermopile |
P5 |
I²C SDA — data ke array thermopile |
Rel 3,3V |
Memberi daya pada thermopile |
Rel GND |
Ground bersama |
Penggunaan¶
Ambil peta panas dari array thermopile on-board melalui modul fir
import fir
import image
import time
fir.init()
clock = time.clock()
while True:
clock.tick()
try:
img = fir.snapshot(x_scale=10, y_scale=10,
color_palette=image.PALETTE_IRONBOW,
hint=image.BICUBIC,
copy_to_fb=True)
except OSError:
continue
print(clock.fps())
Baca suhu mentah per piksel sebagai ndarray 16×4 dari float celsius. fir.read_ir() juga mengembalikan suhu ambien dan nilai min/maks yang terlihat dalam bingkai:
import fir
import time
from ulab import numpy as np
fir.init()
w = fir.width()
h = fir.height()
while True:
try:
ta, ir, to_min, to_max = fir.read_ir()
except OSError:
continue
grid = np.array(ir).reshape((h, w))
print("Ambient: %.1f C, range: %.1f to %.1f C, mean: %.1f C"
% (ta, to_min, to_max, np.mean(grid)))
time.sleep(1)