
Published: 27.08.2018
Copyright by Joy-IT
5
Temperature Sensor
In order for the Raspberry Pi to be able to communicate with the One
-
Wire Bus, with which the DS18B20
sensor transmits its measurement data digitally, it must first be activated. The file "
/boot/config.txt
" must
be edited. To do this, open a terminal window and enter the following command to open the file:
Now add the following line to the opened file at the end:
Save the file with the key combination
CTRL+O
and exit it with the combination
CTRL+X
.
Now restart your Raspberry Pi with the following command so that the changes you have made take
effect:
You can download the code example for Raspberry Pis
here
or copy and paste the following sections.
4. CODE EXAMPLE RASPBERRY PI
sudo nano /boot/config.txt
dtoverlay=w1
-
gpio,gpiopin=4
sudo reboot
Содержание KY-001
Страница 1: ...3 Temperature Sensor KY 001...