Mundarija:

Harorat sensori DS18B20 (Raspberry Pi): 4 qadam (rasmlar bilan)
Harorat sensori DS18B20 (Raspberry Pi): 4 qadam (rasmlar bilan)

Video: Harorat sensori DS18B20 (Raspberry Pi): 4 qadam (rasmlar bilan)

Video: Harorat sensori DS18B20 (Raspberry Pi): 4 qadam (rasmlar bilan)
Video: How to Make a Temperature Gauge with Arduino and DS18B20 Sensor ๐Ÿคฏ๐Ÿ˜ 2024, Noyabr
Anonim
Harorat sensori DS18B20 (Raspberry Pi)
Harorat sensori DS18B20 (Raspberry Pi)

Malinali pi bilan DS18b20 harorat sensori o'rnatish bo'yicha asosiy qo'llanma.

1 -qadam: qismlar

Qismlar
Qismlar

Kerakli qismlar:

RPI 3 -

4 Amp quvvat adapteri -

16 Gb micro SD -

120 dona o'tish kabeli:

ds18b20 sensori -

2 -qadam: sozlash

Sozlash
Sozlash

1. config.txt faylini tahrirlang

sudo nano /boot/config.txt

faylning pastki qismiga "dtoverlay = w1-gpio" qo'shing

sudo qayta yuklash

2. Quyidagi buyruqlarni kiriting

sudo modprobe w1-gpiosudo modprobe w1-therm

cd/sys/bus/w1/devices/

ls

3. katalogni sensor misoliga o'zgartiring

cd 28-00000xxxxxxx *seriya raqami-bu unikal belgilar

4. Sensorning ishlashini tekshiring

mushuk w1_slave

shunga o'xshash chiqishni ko'rishingiz kerak

root@raspberrypi:/sys/bus/w1_slave/28-00000495db35# cat w1_slavea3 01 4b 46 7f ff 0d 10 ce: crc = ce Ha

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

3 -qadam: kod

Kod
Kod

Python skriptini yuklab oling va ishga tushiring:

4 -qadam: Qo'shimcha ma'lumotlar

Image
Image

Rasmiy veb -sayt:

www.piddlerintheroot.com/temp-sensor-ds18b2โ€ฆ

Tavsiya: