gp2y0a02-range-meter

evgenykochetkov/sharp-irm/gp2y0a02-range-meter

Reads Sharp infrared range meter GP2Y0A02YK0F (the one with 20…150 cm range)
gp2y0a02-range-meter
@/gp2y0a02-range-meter
Reads Sharp infrared range meter GP2Y0A02YK0F (the one with 20…150 cm range)
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
PORT
AVcc
UPD
Dm
DONE
ERR
ERRpulse
Fires if reading failed. For example, in the case of the wrong port number
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 evgenykochetkov/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.