1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

rasberry piで水温測定

Last updated at Posted at 2018-12-22

配線

防水の温度計をラズパイへそれぞれ以下のように配線

  • 白ケーブル → GPIO4 (Pin09)
  • 黒ケーブル → Gnd (Pin07)
  • 赤ケーブル → 5V (Pin02)

認識

$ sudo apt-get update $ sudo apt-get upgrade $ echo "dtoverlay=w1-gpio-pullup,gpiopin=4" | sudo tee -a /boot/config.txt $ sudo reboot

カーネルモジュール

$ sudo modprobe w1-gpio $ sudo modprobe w1-therm $ sudo shutdown -r now

結果取得

$ cd /sys/bus/w1/devices $ ls 28-01146560e2ff w1_bus_master1 $ cd 28-01146560e2ff $ grep t= w1_slave | awk -F"t=" '{print $2}'

P8230551.JPG

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?