Cov txheej txheem:

Temp Sensor DS18B20 (Raspberry Pi): 4 Cov Kauj Ruam (nrog Duab)
Temp Sensor DS18B20 (Raspberry Pi): 4 Cov Kauj Ruam (nrog Duab)

Video: Temp Sensor DS18B20 (Raspberry Pi): 4 Cov Kauj Ruam (nrog Duab)

Video: Temp Sensor DS18B20 (Raspberry Pi): 4 Cov Kauj Ruam (nrog Duab)
Video: Raspberry Pi DS18B20 Temperature Sensor Tutorial 2024, Hlis ntuj nqeg
Anonim
Temp Sensor DS18B20 (Raspberry Pi)
Temp Sensor DS18B20 (Raspberry Pi)

Kev qhia yooj yim ntawm yuav teeb tsa DS18b20 qhov ntsuas kub nrog raspberry pi.

Kauj Ruam 1: Qhov Chaw

Qhov
Qhov

Yam Yuav Tsum Tau:

RPI 3 -

4 Amp Power Adapter -

16GB micro SD -

120 pcs jumper cable:

ds18b20 sensor -

Kauj ruam 2: Teeb

Teeb
Teeb

1. Kho config.txt

sudo nano /boot /config.txt

ntxiv "dtoverlay = w1-gpio" rau hauv qab ntawm cov ntawv

sudo rov pib dua

2. Ntaus cov lus txib hauv qab no

sudo modprobe w1-gpiosudo modprobe w1-therm

cd/sys/npav/w1/khoom siv/

ls ua

3. hloov cov npe rau sensor piv txwv

cd 28-00000xxxxxxx *tus lej xov tooj yog qhov tshwj xeeb

4. xyuas seb lub sensor puas ua haujlwm

miv w1_slave

koj yuav tsum pom cov zis zoo ib yam li qhov no

hauv paus@raspberrypi:/sys/bus/w1_slave/28-00000495db35# miv w1_slavea3 01 4b 46 7f ff 0d 10 ce: crc = ce YES

a3 01 4b 46 7f ff 0d 10 ce t = 26187

Kauj ruam 3: Code

Code
Code

Rub tawm thiab khiav cov ntawv sej:

Kauj Ruam 4: Cov Lus Qhia Ntxiv

Image
Image

Lub Vev Xaib:

www.piddlerintheroot.com/temp-sensor-ds18b2…

Pom zoo: