: dev = ultrasonic (ar, triggerpin)
: dev = ultrasonic (ar, triggerpin, echopin)
: dev = ultrasonic (ar, triggerpin, echopin, propname, propvalue)

Create an ultrasonic object to communicate to a connected ultrasonic device

Inputs

ar - connected arduino object

triggerpin - trigger pin for attached device.

echopin - trigger pin for attached device.

propname, propvalue - property name/value pair for values to pass to devices.

Currently known properties:

outputformat

string designating number format for output (’double’)

Outputs

dev - created ultrasonic object

Properties

The ultrasonic object has the following public properties:

parent

The parent (arduino) for this device

pins

pins used by this object

triggerpin

trigger used for created object

echopin

Echo pin set for object

outputformat

Output format for the created object

See also: arduino, readDistance, readEchoTime.

Package: arduino