gp2y0a02-range-meter

xod-dev/sharp-irm/gp2y0a02-range-meter

Reads Sharp infrared range meter GP2Y0A02YK0F (the one with 20…150 cm range). Possible errors: — Invalid port
gp2y0a02-range-meter
@/gp2y0a02-range-meter
Reads Sharp infrared range meter GP2Y0A02YK0F (the one with 20…150 cm range). Possible errors: — Invalid port
PORTport
Board port number the sensor is connected to.
AVccnumber
Analog voltage reference, i.e., the voltage level corresponding to the 1.0 value of an analog read. Usually 5 or 3.3 volts matching the board power voltage
UPDpulse
Triggers an update, that is, rereads values
gp2y0a02-range-meter
PORTPORTAVccAVccUPDUPDDmDmDONEDONE
DONEpulse
Fires when the reading completes successfully
Dmnumber
Measured distance in meters. Trustworthy only for distances in [0.3, 1.5] meters range. Returns wrong values if an object is too close to the sensor.
To use the node in your project you should have the xod-dev/sharp-irm library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.