아두이노 > tkkrlab - Arduino 37 sensors - KY-010 Optical broken module

TODAY1,142 TOTAL2,933,428
사이트 이용안내
Login▼/회원가입
최신글보기 질문게시판 기술자료 동영상강좌

아두이노 센서 ATMEGA128 PWM LED 초음파 AVR 블루투스 LCD UART 모터 적외선


BASIC4MCU | 아두이노 | 아두이노 | tkkrlab - Arduino 37 sensors - KY-010 Optical broken module

페이지 정보

작성자 키트 작성일2017-09-13 14:22 조회2,676회 댓글0건

본문

 

Arduino KY-010 Optical broken module

Arduino KY-010 Optical broken module Sku 135035 2

Buy on Dealextream

 

KEYES ARDUINO photo interrupter module

Photo interupter module use the buildin arduino led. If the sensor is broken the LED is turned on.

Device senses a signal, LED lights, otherwise off.

Schematic

If you view from the top like on the photo

  • Left = Ground
  • Middle = +5V
  • Right = Signal

Connect the module to the arduino as follows:

  • Arduino pin GND to module GND
  • Arduino digital pin 3 to module Signal
  • Arduino pin 5V to module 5V

Example Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Example code for KY-010
// photo interrupter module
 
int Led = 13 ;// define LED Interface
int buttonpin = 3// define the photo interrupter sensor interface
int val ;// define numeric variables val
void setup ()
{
  pinMode (Led, OUTPUT) ;// define LED as output interface
  pinMode (buttonpin, INPUT) ;// define the photo interrupter sensor output interface   
}
void loop ()
{
  val = digitalRead (buttonpin) ;// digital interface will be assigned a value of 3 to read val
  if (val == HIGH) // When the light sensor detects a signal is interrupted, LED flashes
  {
    digitalWrite (Led, HIGH);
  }
  else
  {
    digitalWrite (Led, LOW);
  }
}
cs

https://tkkrlab.nl/wiki/Arduino_KY-010_Optical_broken_module 

댓글 0

조회수 2,676

등록된 댓글이 없습니다.

아두이노HOME > 아두이노 > 전체 목록

아두이노 목록
제목 작성자 작성일 조회
92 아두이노 tkkrlab - Arduino 37 sensors - KY-022 Infrared sensor receiv… 키트 17-09-13 3031
91 아두이노 tkkrlab - Arduino 37 sensors - KY-021 Mini magnetic reed mod… 키트 17-09-13 2884
90 아두이노 tkkrlab - Arduino 37 sensors - KY-020 Tilt switch module 키트 17-09-13 2973
89 아두이노 tkkrlab - Arduino 37 sensors - KY-019 5V relay module 키트 17-09-13 3030
88 아두이노 tkkrlab - Arduino 37 sensors - KY-018 Photo resistor module 키트 17-09-13 2663
87 아두이노 tkkrlab - Arduino 37 sensors - KY-017 Mercury open optical m… 키트 17-09-13 2633
86 아두이노 tkkrlab - Arduino 37 sensors - KY-016 3-color LED module 키트 17-09-13 2921
85 아두이노 tkkrlab - Arduino 37 sensors - KY-015 Temperature and humidi… 키트 17-09-13 2532
84 아두이노 tkkrlab - Arduino 37 sensors - KY-013 Temperature sensor mod… 키트 17-09-13 2894
83 아두이노 tkkrlab - Arduino 37 sensors - KY-012 Active buzzer module 키트 17-09-13 2947
82 아두이노 tkkrlab - Arduino 37 sensors - KY-011 2-color LED module 키트 17-09-13 2702
현재글 아두이노 tkkrlab - Arduino 37 sensors - KY-010 Optical broken module 키트 17-09-13 2677
80 아두이노 tkkrlab - Arduino 37 sensors - KY-009 3-color full-color LED… 키트 17-09-13 2653
79 아두이노 tkkrlab - Arduino 37 sensors - KY-008 Laser sensor module 키트 17-09-13 2966
78 아두이노 tkkrlab - Arduino 37 sensors - KY-006 Small passive buzzer m… 키트 17-09-13 2873
게시물 검색

2022년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2021년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2020년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2019년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2018년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
Privacy Policy
MCU BASIC ⓒ 2020
모바일버전으로보기