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 3 years have passed since last update.

RaspberryPi と GoogleCloudPlatform で家電をコントロール Vol.1

Last updated at Posted at 2020-04-26

はじめに

赤外線リモコンを通じて、GoogleCloudPlatformから家電をコントロールした方法を紹介します。

目的

市販のスマート家電リモコンを使っていたのですが、時間でのトリガーはできるのですが温度のトリガーはありませんでした。
夏の夜にタイマーをかけて寝ると、朝方に暑くて起きてしまうことが多かったので、温度のトリガーでエアコンを制御したいと思ったのがきっかけです。

基本構成

  • ハードウェア部分
    raspberryPi Zero に以下の回路を構成していきます。

    • 学習リモコン部
      • 赤外線受信回路
      • 赤外線発信回路
    • 温度・湿度測定回路 (BME280)
  • ソフトウェア部分
    スマートスピーカーからの操作と、GoogleCloudPlatformへの温度等の測定結果送信と命令を受信してのリモコン動作部で構成します。

    • スマートスピーカーからの操作 (IFTTT + slack + hubot)
    • 赤外線発信回路 (CloudFunctions + CloudSql)

fig1.png

ハードウェアの作成

学習リモコン部分(赤外線の受信・発信回路)は、格安スマートリモコンの作り方を参考に作成しました。
これに温度・湿度を測るためのセンサーを追加していきます。
使用したセンサーは BME280 です。配線等については、Raspberry Pi 2で温湿度・気圧センサのBME280をPythonから使う を参考に作成しました。

RaspberryPiの初期状態ではI2Cが無効になっているため、有効化後に接続します。

作成した回路は以下のようになりました。
スクリーンショット 2020-04-25 16.53.25.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?