gp2y0a21-range-meter

evgenykochetkov/sharp-irm/gp2y0a21-range-meter

Reads Sharp infrared range meter GP2Y0A21YK0F (the one with 10…80 cm range)
gp2y0a21-range-meter
@/gp2y0a21-range-meter
Reads Sharp infrared range meter GP2Y0A21YK0F (the one with 10…80 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
gp2y0a21-range-meter
Dm
DONE
ERR
PORT
AVcc
UPD
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.1, 0.8] 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.