The AO pin is rarely used in simple digital applications. It provides a voltage between 0V and VCC proportional to the magnetic field strength, useful for linear position sensing or magnetic field strength measurement.
Detecting the onset of rainfall to close windows or retract awnings. Water Level Monitoring: Basic detection of liquid levels in small containers. Quick Start: Arduino Connection To use the YL-105 with an Arduino, connect VCC to , GND to GND, and A0 to an analog pin (e.g., ). You can use the analogRead() function to get a value between (saturated) and (completely dry). code snippet yl-105 datasheet
| Feature | YL-105 (Analog + Digital) | KY-003 (Magnetic Switch) | US1881 (Latching) | |---------|----------------------------|---------------------------|-------------------| | Output Type | Digital + Analog | Digital only | Digital (latching) | | Sensitivity Adjustment | Yes (potentiometer) | No | No | | Detectable Field Polarity | South pole only | South pole only | Both poles (latches) | | Best for | Adjustable proximity, RPM | Simple ON/OFF | Rotary encoders, door locks | The AO pin is rarely used in simple digital applications