0
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.

ラズパイを触ってみた(DHT11編)

Posted at

エアコンによる乾燥 vs 加湿機 ファイッ!!!!!!!!!!!!

乾燥が辛い。
ただでさえ喉が弱いのに...さらにやられてまう...
ところで今って湿度どれくらいあるんやろう?
加湿器ってどれくらい効果でとんやろ?
ということで、測ってみた!

いろんなwebページをみながらやってみたがなかなかうまくいかなかった。

参考にしたページ
https://yuki-no-yabo.com/measure-temp-usingdht11/

動かなかった理由

一言で言うとpinの読み間違え
BCMの方をみないといけなかったのに

wiring Piの方を見ていた

参考にさせていただいたページはこちら
https://iot.keicode.com/raspberry-pi/pinout.php

GPIO の番号は BCM ピン番号で割り当てられており、通常プログラミング時には BCM 番号を使います。

ということらしい。

配線イメージ

使ったDHT11。スターターキットに入っていたもの
DHT11

IMG_3380 (1).jpg

使用したコード
https://github.com/szazo/DHT11_Python.git
上記ではpin=14で設定されているのでGPIOを14に接続

DHT11側 ラズパイ側
GND 6
DATA 8 (GPIO 14)
VCC 1 (3.3v)

ジャンプワイヤはオスオスとオスメスを両方使ってみたかったから使ってみた
IMG_3381 (1).jpg

で、無事にデータを取れました。(記念写真)
image.png

ちょっと触ってみただけだけど...ラズパイって...楽しい!!!

0
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
0
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?