Cov txheej txheem:
- Kauj Ruam 1: Yam Koj Xav Tau..
- Kauj Ruam 2: Kev Sib Txuas:
- Kauj ruam 3: Code:
- Kauj Ruam 4: Cov ntawv thov:
Video: Raspberry Pi - TMP007 Infrared Thermopile Sensor Python Qhia: 4 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
TMP007 yog lub ntsuas hluav taws xob infrared thermopile uas ntsuas qhov ntsuas kub ntawm ib yam khoom yam tsis muaj kev sib cuag nrog nws. Lub zog hluav taws xob hluav taws xob tso tawm los ntawm cov khoom hauv thaj chaw sensor tau nqus los ntawm cov thermopile ua ke hauv lub ntsuas. Qhov ntsuas hluav taws xob thermopile yog digitized thiab pub raws li kev nkag mus rau lub cav ua lej. Lub tshuab ua lej suav nrog no suav qhov ntsuas kub. Nov yog nws qhov kev ua haujlwm pom nrog Raspberry Pi siv tus lej nab npawb.
Kauj Ruam 1: Yam Koj Xav Tau..
1. Raspberry Pi
2. TSM007
3. I²C Cable
4. I²C Shield rau Raspberry Pi
5. Ethernet Cable
Kauj Ruam 2: Kev Sib Txuas:
Siv I2C daim thaiv rau raspberry pi thiab maj mam thawb nws hla gpio pins ntawm raspberry pi.
Tom qab ntawd txuas ib qho kawg ntawm I2C cable rau TMP007 sensor thiab lwm qhov kawg rau I2C daim ntaub thaiv.
Kuj txuas Ethernet cable rau pi lossis koj tuaj yeem siv WiFi module.
Kev sib txuas tau qhia hauv daim duab saum toj no.
Kauj ruam 3: Code:
Tus nab npawb nab npawb rau TMP007 tuaj yeem rub tawm los ntawm peb GitHub chaw cia khoom- DCUBE Store Community.
Nov yog qhov txuas.
Peb tau siv SMBus lub tsev qiv ntawv rau sej code, cov kauj ruam rau nruab SMBus ntawm raspberry pi tau piav qhia ntawm no:
pypi.python.org/pypi/smbus-cffi/0.5.1
Koj tseem tuaj yeem luam cov cai los ntawm no, nws tau muab raws li hauv qab no:
# Faib nrog daim ntawv tso cai yuav dawb.
# Siv nws txhua txoj hauv kev uas koj xav tau, muaj txiaj ntsig lossis pub dawb, muab nws haum rau hauv daim ntawv tso cai ntawm nws cov haujlwm sib txuam.
# TSWJ 007
# Txoj cai no yog tsim los ua haujlwm nrog TMP007_I2CS I2C Mini Module muaj nyob hauv DCUBE Store.
ntshuam smbus
lub sij hawm ntshuam
# Tau I2C npav
npav = smbus. SMBus (1)
# TMP007 chaw nyob, 0x40 (64)
# Xaiv kev teeb tsa sau npe, 0x02 (02)
# 0x1540 (5440) Nrhav Kev Hloov Pauv Hloov pauv, Hom sib piv
data = [0x1540] bus.write_i2c_block_data (0x40, 0x02, cov ntaub ntawv)
sijhawm.s pw (0.5)
# TMP007 chaw nyob, 0x40 (64)
# Nyeem cov ntaub ntawv rov qab los ntawm 0x03 (03), 2 bytes
# cTemp MSB, cTemp LSB
cov ntaub ntawv = bus.read_i2c_block_data (0x40, 0x03, 2)
# Hloov cov ntaub ntawv mus rau 14-ntsis
cTemp = ((cov ntaub ntawv [0] * 256 + (cov ntaub ntawv [1] & 0xFC)) / 4)
Yog tias cTemp> 8191:
TSI -16384
cTemp = cTemp * 0.03125
fTemp = cTemp * 1.8 + 32
# Cov ntaub ntawv tso tawm rau lub vijtsam
luam "Cov Khoom Kub hauv Celsius: %.2f C" %cTemp
luam tawm "Lub Hom Phiaj Kub hauv Fahrenheit: %.2f F" %fTemp
Kauj Ruam 4: Cov ntawv thov:
TMP007 pom nws daim ntawv thov hauv cov kab ke uas yuav tsum tsis ntsuas qhov ntsuas kub. Lawv tau ua haujlwm hauv lub khoos phis tawj thiab ntsiav tshuaj, roj teeb thiab lwm yam. Nws qhov kev ua tau zoo dua hauv kev ntsuas qhov ntsuas kub yam tsis tau ntsib nrog cov khoom tiag muab nws ib qho ntxiv rau nws cov ntawv thov ntau yam.
Pom zoo:
Raspberry Pi - TMD26721 Infrared Digital Proximity Detector Java Qhia: 4 Kauj Ruam
Raspberry Pi-TMD26721 Infrared Digital Proximity Detector Java Tutorial: TMD26721 yog lub tshuab ntsuas hluav taws xob infrared digital uas nyob ze uas muab qhov ua tiav kev txheeb ze sib xws thiab digital interface logic hauv ib qho 8-pin nto mount module.Qhov kev txheeb ze sib xws suav nrog txhim kho teeb liab-rau-suab nrov thiab qhov tseeb Ib pro
Raspberry Pi - TMD26721 Infrared Digital Proximity Detector Python Qhia: 4 Kauj Ruam
Raspberry Pi-TMD26721 Infrared Digital Proximity Detector Python Tutorial: TMD26721 yog lub tshuab hluav taws xob infrared digital sib thooj uas muab qhov ua tiav kev txheeb ze sib xws thiab digital interface logic hauv ib qho 8-pin nto mount module. qhov tseeb Ib tus prox
Kuv Me Me Whoop: Daim Ntawv Qhia Whoop + Cov Lus Qhia thiab Cov Lus Qhia: 8 Kauj Ruam
Kuv Me Me Whoop: Daim Ntawv Qhia Whoop + Cov Lus Qhia thiab Cov Lus Qhia: Kev Ceeb Toom: Tam sim no koj tab tom nkag mus rau kuv thawj qhov kev qhia, thiab koj yuav ntsib ntau yam kev ruam thiab tsis muaj phiaj xwm thiab/lossis txuj ci. Paub txog qhov no yog kuv tus kheej Tiny Whoop teeb tsa uas kuv siv txhua hnub, yog li kuv xav tias kuv yuav qhia nws. Nws yog phooj ywg mus ncig (tsis muaj
Yuav Ua Li Cas Ua Tus Qhia Qhia thiab Qhia: 8 Kauj Ruam
Yuav Ua Li Cas Nthuav Qhia Qhia thiab Qhia: Nov yog phau ntawv qhia rau kev ua Qhia Qhia thiab Qhia. Nws yog qhov tseem ceeb tshaj plaws ntawm cov xwm txheej muaj nyob rau Hnub Friday, Peb Hlis 9, 2007, tab sis kuj tseem yog qhov tshwm sim yav dhau los ntawm qhov xwm txheej no, Squid Labs Lub Teeb Pom Kev Zoo. Lub hom phiaj ntawm Kev Qhia thiab Xov Tooj
Infrared Av/khoom Sensor rau Neeg Hlau Kev Taw Qhia: 3 Kauj Ruam
Infrared Av/khoom Sensor rau Neeg Hlau Kev Taw Qhia: Kuv siv lub ntsuas no ntawm 2 ntawm kuv tus neeg hlau. cov ntawd tau ua haujlwm saum lub rooj, yog li cov neeg hlau yuav tsum tau tshuaj xyuas thaum lawv tuaj txog ntawm ntug, kom nres, thiab tig rov qab