-
Notifications
You must be signed in to change notification settings - Fork 227
2Y0A21 SENSOR
Jaume Olivé Petrus edited this page Sep 17, 2017
·
13 revisions
GP2Y0A21YK0F is a distance measuring sensor unit, composed of an integrated combination of PSD (position sensitive detector), IRED (infrared emitting diode) and signal processing circuit.
The variety of the reflectivity of the object, the environmental temperature and the operating duration are not influenced easily to the distance detection because of adopting the triangulation method.
This device outputs the voltage corresponding to the detection distance. So this sensor can also be used as a proximity sensor.
Features:
- Distance measuring range : 10 to 80 cm
- Consumption current : Typ. 30 mA
- Supply voltage : 4.5 to 5.5 V
Infrared sensor.
What | Comments | |
---|---|---|
Identifier | 2Y0A21 | |
Interface | ADC | |
Provides | distance | centimeters |
Properties | none | |
Datasheet |
-- Attach sensor using an external ADC (ADS1115) / channel 0
s = sensor.attach("2Y0A21", adc.ADS1115, 0)
while true do
print("distance: "..s:read("distance").." cm")
tmr.delayms(500)
end