Vibration Sensor Module(SW-18010P): 두 판 사이의 차이
(Created page with "{{#seo:|title=아두위키 : 아두이노 진동 센서 모듈(SW-18010P) 가이드|title_mode=append|keywords=아두이노, 정보과학, 메이커학습, 수행평가, 진동 센서 모듈(SW-18010P), 아두이노 작품, 캡스톤작품, 아두이노 예제코드|description=아두이노로 진동 센서 모듈(SW-18010P)을 제어하는 방법(기본정보, 회로, 예제 코드)을 소개합니다. 정보과학과 메이커수업에 활용가능합니다.}} File:...") |
잔글편집 요약 없음 |
||
| 1번째 줄: | 1번째 줄: | ||
{{#seo:|title= | {{#seo:|title=ArduWiki : Arduino Vibration Sensor Module (SW-18010P) Guide|title_mode=append|keywords=Arduino, Computer Science, Maker Learning, Performance Assessment, Vibration Sensor Module (SW-18010P), Arduino Project, Capstone Project, Arduino Example Code|description=Introduces how to control a vibration sensor module (SW-18010P) using Arduino (basic info, wiring, example code). Useful for computer science and maker classes.}} | ||
[[ | [[파일:진동센서대표이미지.jpg|가운데|class=coders100]] | ||
The SW-18010P is a vibration sensor module that can detect shocks and vibrations. It outputs digitally and does not provide an analog output. | The SW-18010P is a vibration sensor module that can detect shocks and vibrations. It outputs digitally and does not provide an analog output. | ||
2025년 3월 27일 (목) 15:31 기준 최신판

The SW-18010P is a vibration sensor module that can detect shocks and vibrations. It outputs digitally and does not provide an analog output.
Specifications
- Operating Voltage [V]: 3.3 ~ 5
- Output: Digital (No analog)
Example Required Hardware
- Arduino board
- Vibration Sensor Module
- Jumper cables
- LED
Connection
| LED | Vibration Sensor | Arduino | |||
| VCC | 5V | ||||
| - | GND | GND | |||
| + | D7 | ||||
| DO | D8 | ||||

Example Code
The code turns on an LED when a vibration is detected.
int led = 7;
int sensor = 8;
void setup() {
pinMode(led, OUTPUT);
pinMode(sensor, INPUT);
digitalWrite(led, LOW);
}
void loop() {
int a = digitalRead(sensor);
if(a == LOW) digitalWrite(led, HIGH);
else digitalWrite(led, LOW);
}
Execution Result
