LoginSignup
6
2

More than 5 years have passed since last update.

RaspberryPiで温度を計測する

Posted at

目的

RaspberryPiを使ってUSB温度計から温度を計測する。

環境

ラズパイ:Raspberry Pi 3 モデル B
OS:raspbian8
USB温度計:TEMPer(PCsensor社)

手順

こちらのgitにある通り設定を進めます。
libusb-0.1.4-devは見つからないので、以下のコマンドを実行。

sudo apt-get install build-essential libusb-1.0-0 libusb-dev

あとは指示通りに、実行。

git clone git://github.com/bitplane/temper.git
cd temper/
make
sudo make install

無事にインストールができました。temperコマンドを実行してみます。

pi@raspberrypi:~/temper $ sudo temper
20-May-2017 13:48,30.782524

無事に取得できました。root権限で実行していますが、READMEを見る感じなんとかなりそうです。

今後

30度と出ましたが、体感の気温的には20度くらいです。直に指しているので、USBケーブルで伸ばしてあげるのがいいのかもしれません。

6
2
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
6
2