일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 정렬
- BOJ
- join
- PIR
- 시간초과
- Neural Network
- TensorFlow
- ML
- deep learning
- 모두를 위한 머신러닝
- sort
- deque
- sung kim
- CSAP
- c++
- Linear Regression
- 프로그래머스
- softmax
- Queue
- stl
- 모두를 위한 딥러닝
- mysql
- SQL
- 한화오션
- DFS
- 백준
- Machine learning
- Programmers
- 큐
- 알고리즘 고득점 kit
Archives
- Today
- Total
hello, world!
[라즈베리파이(RPi)] 적외선(PIR) 센서 연결 본문
적외선 센서가 움직임을 감지했을 경우 "Motion Detected"를 출력한다.
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(21,GPIO.IN)
while True:
input_state = GPIO.input(21)
if input_state == True:
print("Motion Detected")
else:
print("No Detection")
time.sleep(0.2)
huunz
huunz has one repository available. Follow their code on GitHub.
github.com
'Project & Study > raspberryPi' 카테고리의 다른 글
[라즈베리파이(RPi)] 센서 움직임 감지 시 촬영 (0) | 2020.08.12 |
---|
Comments