LoginSignup
0
0

More than 1 year has passed since last update.

Node-REDでLED ON/OFF制御

Last updated at Posted at 2022-03-24

#目的
スマートフォンで、簡単にLEDのON/OFF制御を行いIoTにふれる。

#目次

  1. 電子部品リスト
  2. Raspberry Piの配線図
  3. Raspberry Pi Node-RED
  4. 動作映像

#1.電子部品リスト

名称 備考
Raspberry Pi 第4世代
LED 青色・赤色・緑色
抵抗 150Ω 3個
ジャンパワイヤ オスーメス 3本

#2.Raspberry Piの配線図
配線図は以下の通りになっています。

ラズベリーパイGPIO.jpg

回路図.jpg

LEDの足には極性は、長い方をアノード()、短い方をカソード()
Raspberry PiとLEDの回路図

Raspberry Pi LED
6 GND
11 青色
13 赤色
15 緑色

#3.Raspberry Pi Node-RED
※Raspberry PiにNode-REDをインストールしてある状態で説明していきます。
Node-REDの画面
Node-red.jpg

Node-REDの画面、左下からSwitchとrpi-gpio out

スクリーンショット 2022-03-16 233531.jpg

Switchとrpi-gpio outをそれぞれ接続を行います。
フロート.jpg

Node-redでLED ON/OFF制御画面
スマートフォンなどでRaspberry PiのIPアドレスにアクセスを行うと以下の画面が表示されます。
S__29360130.jpg

#4.動作映像
IMAGE ALT TEXT HERE

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