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 - TMP100 Kub Sensor Python Qhia: 4 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
TMP100 High-Accuracy, Low-Power, Digital Kub Sensor I2C MINI module. TMP100 yog qhov zoo tshaj rau kev ntsuas kub ntxiv. Cov cuab yeej no muab qhov tseeb ntawm ± 1 ° C yam tsis tas yuav ntsuas qhov ntsuas lossis sab nrauv tiv thaiv teeb liab. Nov yog qhov ua piv txwv nrog tus nab npawb nab npawb siv Raspberry Pi.
Kauj Ruam 1: Yam Koj Xav Tau..
1. Raspberry Pi
2. TMP100
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 TMP100 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 TMP100 tuaj yeem rub tawm los ntawm peb GitHub chaw cia khoom- Dcube Store.
Nov yog qhov txuas rau tib yam:
github.com/DcubeTechVentures/TMP100…
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.
# TSO 100
# Txoj cai no tau tsim los ua haujlwm nrog TMP100_I2CS I2C Mini Module muaj nyob hauv Dcube Store
#
ntshuam smbus
lub sij hawm ntshuam
# Tau I2C npav
npav = smbus. SMBus (1)
# TMP100 chaw nyob, 0x4F (79)
# Xaiv kev teeb tsa sau npe, 0x01 (01)
# 0x60 (96) Kev hloov pauv tas li, hom sib piv, 12-ntsis kev daws teeb meem
bus.write_byte_data (0x4F, 0x01, 0x60)
sijhawm.s pw (0.5)
# TMP100 chaw nyob, 0x4F (79)
# Nyeem cov ntaub ntawv rov qab los ntawm 0x00 (00), 2 bytes
# temp MSB, temp LSB
cov ntaub ntawv = bus.read_i2c_block_data (0x4F, 0x00, 2)
# Hloov cov ntaub ntawv mus rau 12-ntsis
temp = (data [0] * 256 + (data [1] & 0xF0)) / 16
Yog tias kub> 2047:
temp -= 4096
cTemp = temp * 0.0625
fTemp = cTemp * 1.8 + 32
# Cov ntaub ntawv tso tawm rau lub vijtsam
luam tawm "Kub hauv Celsius yog: %.2f C" %cTemp
luam tawm "Kub hauv Fahrenheit yog: %.2f F" %fTemp
Kauj Ruam 4: Cov ntawv thov:
Ntau daim ntawv thov suav nrog TMP100 lub zog qis, qhov tseeb cov ntsuas hluav taws xob suav nrog Lub Hwj Huam Saib Xyuas Kub Kub, Khoos phis tawj Ib puag ncig tiv thaiv cua sov, Kev tswj roj teeb nrog rau lub tshuab ua haujlwm.
Pom zoo:
Raspberry Pi SHT25 Vaum & Kub Sensor Python Qhia: 4 Kauj Ruam
Raspberry Pi SHT25 Vaum & Kub Sensor Python Qhia: SHT25 I2C Vaum thiab Kub Sensor ± 1.8%RH ± 0.2 ° C I2C Mini Module. SHT25 qhov tseeb qhov ntsuas qhov ntsuas cua thiab qhov kub tau dhau los ua tus qauv kev lag luam raws li daim ntawv foos thiab kev txawj ntse, muab kev ntsuas ntsuas, ntsuas qhov ntsuas pom
Raspberry Pi - HIH6130 I2C Vaum & Kub Sensor Python Qhia: 4 Kauj Ruam
Raspberry Pi - HIH6130 I2C Vaum & Kub Sensor Python Qhia: HIH6130 yog cov av noo thiab ntsuas kub nrog cov tso tawm digital. Cov ntsuas no muab qib raug ntawm ± 4% RH. Nrog kev lag luam-ua kom muaj kev ruaj ntseg mus sij hawm ntev, qhov tseeb kub-them nyiaj digital I2C, Kev lag luam ua rau muaj kev ntseeg siab, Kev siv hluav taws xob
ESP32 Raws M5Stack M5stick C Huab Cua Saib Nrog DHT11 - Saib Xyuas Qhov Kub Kub & Qhov Kub Kub ntawm M5stick-C Nrog DHT11: 6 Cov Kauj Ruam
ESP32 Raws M5Stack M5stick C Huab Cua Saib Nrog DHT11 | Saib Xyuas Qhov Kub thiab Qhov Ntsuas Kub ntawm M5stick-C Nrog DHT11: Nyob zoo cov neeg, hauv cov lus qhia no peb yuav kawm paub yuav ua li cas cuam tshuam DHT11 ntsuas kub nrog m5stick-C (pawg tswj hwm kev txhim kho los ntawm m5stack) thiab tso tawm ntawm cov zaub ntawm m5stick-C. Yog li hauv qhov kev qhia no peb yuav nyeem qhov ntsuas kub, av noo & heat kuv
Yuav Ua Li Cas Siv DHT11 Kub Sensor Nrog Arduino thiab Luam Kub Kub thiab Vaum: 5 Kauj Ruam
Yuav Ua Li Cas Siv DHT11 Kub Sensor Nrog Arduino thiab Luam Kub Kub thiab Vaum: Lub DHT11 sensor tau siv los ntsuas kub thiab av noo. Lawv yog cov khoom siv hluav taws xob nrov tshaj plaws.Qhov DHT11 cov av noo thiab ntsuas kub ua rau nws yooj yim ntxiv cov av noo thiab ntsuas kub rau koj li DIY cov phiaj xwm hluav taws xob. Nws yog rau
ESP32 NTP Kev Ntsuas Kub Ua Haujlwm Kub Kub Nrog Steinhart-Hart Kho thiab Tswb Kub: 7 Kauj Ruam (nrog Duab)
ESP32 NTP Kev Ntsuas Kub Ua Haujlwm Ntsuas Kub nrog Steinhart-Hart Kev Kho thiab Tswb Kub: Tseem tab tom taug kev kom ua tiav "qhov haujlwm yuav los tom ntej", "ESP32 NTP Kev Ntsuas Kub Kev Ntsuas Kub Ua Noj Nrog Steinhart-Hart Kev Kho thiab Tswb Kub" yog Cov Ntawv Qhia qhia yuav ua li cas kuv ntxiv NTP ntsuas kub, piezo b