일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 큐
- deque
- ML
- 알고리즘 고득점 kit
- 모두를 위한 딥러닝
- deep learning
- 모두를 위한 머신러닝
- 프로그래머스
- Programmers
- c++
- join
- 시간초과
- 한화오션
- mysql
- TensorFlow
- CSAP
- SQL
- sung kim
- DFS
- stl
- Linear Regression
- 정렬
- Neural Network
- Machine learning
- Queue
- sort
- BOJ
- 백준
- softmax
- PIR
- Today
- Total
목록RPI (2)
hello, world!
적외선 센서를 통해 움직임이 감지되면 연결된 카메라 모듈을 통해 사진이 찍힌다. 찍힌 사진은 counter 변수에 의해 번호가 매겨져 저장된다. import RPi.GPIO as GPIO import time from time import sleep from picamera import PiCamera GPIO.setmode(GPIO.BCM) GPIO.setup(21,GPIO.IN) camera = PiCamera() counter = 1 while True: input_state = GPIO.input(21) if input_state == True: print("Motion Detected") camera.start_preview() sleep(0.2) camera.capture('/home/pi/p..
적외선 센서가 움직임을 감지했을 경우 "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) https://github.com/huunz huunz huunz has one repository available. Follow their code on GitHub. github.com