This method overrides ev3dev2.sensor.Sensor.__init__.
For example, 'tacho-motor'.
For example, 'sensor*' or 'motor*'. Default value: '*'.
exact device name and use it directly.
attributes. For example, address='outA', or driver_name=['lego-ev3-us', 'lego-nxt-us']. When argument value is a list, then a match against any entry of the list is enough.
Example:
d = ev3dev.Device('tacho-motor', address='outA')
s = ev3dev.Device('lego-sensor', driver_name=['lego-ev3-us', 'lego-nxt-us'])If there was no valid connected device, an error is thrown.
Equivalent to :meth:`UltrasonicSensor.distance_centimeters_continuous`.
The sensor will continue to take measurements so they are available for future reads.
Prefer using the equivalent :meth:`UltrasonicSensor.distance_centimeters` property.
The sensor will take a single measurement then stop broadcasting.
If you use this property too frequently (e.g. every 100msec), the sensor will sometimes lock up and writing to the mode attribute will return an error. A delay of 250msec between each usage seems sufficient to keep the sensor from locking up.
Equivalent to :meth:`UltrasonicSensor.distance_inches_continuous`.
The sensor will continue to take measurements so they are available for future reads.
Prefer using the equivalent :meth:`UltrasonicSensor.distance_inches` property.
The sensor will take a single measurement then stop broadcasting.
If you use this property too frequently (e.g. every 100msec), the sensor will sometimes lock up and writing to the mode attribute will return an error. A delay of 250msec between each usage seems sufficient to keep the sensor from locking up.