Raspberry Pi의 Node-RED로 간단 IoT 입문
2037 단어 RaspberryPiDashBoardIoTnode-red
Raspberry Pi의 Node-RED로 간단 IoT
Raspberry Pi에 Node-RED를 설치하여 IoT를 쉽게 경험할 수 있습니다.

대시보드로 만든 화면에서 LED의 밝기를 제어해 봅니다.
1. 제어 회로 만들기
브레드보드를 사용하여 LED와 저항을 Raspberry Pi의 핀에 연결합니다. LED의 애노드측에 적당한 저항을 사이에 두고 GPIO2, 캐소드측을 GND에 접속합니다.

Raspberry Pi의 핀 커넥터는 USB 등의 커넥터를 아래로 하여 핀 번호를 봅니다.

2. 대시보드 설정
Raspberry Pi 노드에서 rpi gpio out을 선택하고 배치하고 두 번 클릭하여 속성을 설정합니다.

슬라이더의 값으로 LED의 밝기를 바꾸고 싶기 때문에 Raspberry Pi의 GPIO에서 pwm 출력을 이용합니다.
프로퍼티의 설정으로 출력을 pwm으로 해, 해설에 쓰여져 있는 추천의 핀(GPIO2)을 선택해 완성입니다.

플로우 에디터로 돌아가, slider의 왼쪽의 ○로부터, pwm:3라고 표시된 노드의 오른쪽의 ○에 와이어를 연결해 완성입니다.

3. 동작 체크
디브로이하여 페이지를 표시하면 슬라이더를 움직이면 LED의 밝기가 바뀝니다.

4. 응용편
슬라이더로 제어가 잘 되면 버튼의 ON/OFF로 LED가 ON/OFF되도록 플로우를 추가해 봅시다.
Reference
이 문제에 관하여(Raspberry Pi의 Node-RED로 간단 IoT 입문), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/atsuya_morito/items/03b364fc6a2cce9aac5c텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)