아두이노 > tkkrlab - Arduino 37 sensors - KY-017 Mercury open optical module

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

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


BASIC4MCU | 아두이노 | 아두이노 | tkkrlab - Arduino 37 sensors - KY-017 Mercury open optical module

페이지 정보

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

본문

 

Arduino KY-017 Mercury open optical module

Arduino KY-017 Mercury open optical module

Part of Dealextream 37 sensors in a 1 kit

 


Mercury switch module and a digital interface, built-in 13 LED build a simple circuit to produce tilt warning lamp 13 comes with digital interfaces of the LED, the mercury tilt switch sensor interface to access digital 3, when the tilt switch sensor senses a key signal, LED lights, otherwise off.

Schematic

  • Arduino GND --> Pin - of module
  • Arduino 5+ --> Pin middel of module
  • Arduino 3 --> pin S of module

Example code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//KY017 Mercury open optical module
int Led = 13 ;// define LED Interface
int buttonpin = 3// define the mercury tilt switch sensor interface
int val ;// define numeric variables val
void setup ()
{
  pinMode (Led, OUTPUT) ;// define LED as output interface
  pinMode (buttonpin, INPUT) ;// define the mercury tilt switch sensor output interface
}
void loop ()
{
  val = digitalRead (buttonpin) ;// read the values assigned to the digital interface 3 val
  if (val == HIGH) // When the mercury tilt switch sensor detects a signal, LED flashes
  {
    digitalWrite (Led, HIGH);
  }
  else
  {
    digitalWrite (Led, LOW);
  }
}
cs

https://tkkrlab.nl/wiki/Arduino_KY-017_Mercury_open_optical_module 

댓글 0

조회수 2,632

등록된 댓글이 없습니다.

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

아두이노 목록
제목 작성자 작성일 조회
92 아두이노 tkkrlab - Arduino 37 sensors - KY-022 Infrared sensor receiv… 키트 17-09-13 3030
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 3029
88 아두이노 tkkrlab - Arduino 37 sensors - KY-018 Photo resistor module 키트 17-09-13 2662
현재글 아두이노 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
81 아두이노 tkkrlab - Arduino 37 sensors - KY-010 Optical broken module 키트 17-09-13 2676
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
모바일버전으로보기