Raindrops Sensor Module: 두 판 사이의 차이
(Created page with "{{#seo:|title=아두위키 : 아두이노 빗물 감지 센서 가이드|title_mode=append|keywords=아두이노, 정보과학, 메이커학습, 수행평가, 빗물 감지 센서, 아두이노 작품, 캡스톤작품, 아두이노 예제코드|description=아두이노로 빗물 감지 센서를 제어하는 방법(기본정보, 회로, 예제 코드)을 소개합니다. 정보과학과 메이커수업에 활용가능합니다.}} File:빗물감지센서대표이미지....") |
(차이 없음)
|
2024년 3월 24일 (일) 18:15 판

The sensor utilizes the decrease in resistance as the area in contact with water increases, similar to the principle of a water level sensor (DM446).
Specifications
- Operating Voltage [V]: 3.3 ~ 5
- Output: Digital, Analog
- Sensitivity adjustment possible with a variable resistor
Example Hardware
- Arduino board
- Jumper cables
- Rainwater detection sensor
Connections
When connecting the sensor part to the module part, there is no polarity, so you can connect them arbitrarily.

| Arduino | Raindrops Sensor | Module |
| 5V | VCC | |
| GND | GND | |
| D7 | DO | |
| A0 | AO | |
| connect | connect | |
| connect | connect |

Example Code
Example code that outputs digital and analog values of the rainwater detection sensor to the serial monitor.
#define DO 7
#define AO A0
void setup(){
pinMode(DO, INPUT);
Serial.begin(9600);
Serial.println("Start");
}
void loop(){
Serial.print("AO : ");
Serial.print("\t");
Serial.print(analogRead(AO));
Serial.print("\t");
Serial.print("DO : ");
Serial.println(digitalRead(DO));
delay(100);
}
Execution Result
- When no water is detected by the sensor

- When water is detected by the sensor
