LEARN.PARALLAX.COM
Published on LEARN.PARALLAX.COM (https://learn.parallax.com)
Home > Ping))) Distance

Ping))) Distance

BlocklyProp reference PING))) Distance block

Compatible with Propeller Activity Board WX, Propeller FLiP module, and Other board types. Not available for Badge or Scribbler Robot board types.  Use this block with the following distance sensors from Parallax:

  • PING))) Ultrasonic Distance Sensor (#28015)
  • LaserPING 2m Rangefinder (#28041)

New to these sensors? Click here to see an example schematic and quick Blockly program to help you get started.


Ping))) distance

The Ping))) distance block returns the distance to an object detected by the sensor, between 1 inch (3 cm) and 124 inches (315 cm) away.

  • distance in drop-down: select whether you want the returned value to be in inches or centimeters
  • PIN dropdown:  select the Propeller I/O pin connected to the sensor. Options will vary by board type.

The PIN menu on this block can be set to “other.”  When “other” is chosen, the drop-down menu disappears, and it is replaced with an input.  You can then use any block that provides a numeric value such as a number value, get variable, or constant value block:

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024


Source URL:https://learn.parallax.com/reference/propeller-blocklyprop-block-reference/ping-distance/
Links