Package nxt :: Module sensor :: Class UltrasonicSensor

Class UltrasonicSensor

source code

object --+        
         |        
    Sensor --+    
             |    
 DigitalSensor --+
                 |
                UltrasonicSensor

Object for ultrasonic sensors

Nested Classes
  __metaclass__
Metaclass which adds accessor methods for US I2C addresses
Instance Methods
 
__init__(self, brick, port)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
get_sample(self)
Function to get data from ultrasonic sensors
source code
 
get_actual_scale_divisor(self) source code
 
get_actual_scale_factor(self) source code
 
get_actual_zero(self) source code
 
get_command_state(self) source code
 
get_continuous_measurement_interval(self) source code
 
get_factory_scale_divisor(self) source code
 
get_factory_scale_factor(self) source code
 
get_factory_zero(self) source code
 
get_measurement_byte_0(self) source code
 
get_measurement_byte_1(self) source code
 
get_measurement_byte_2(self) source code
 
get_measurement_byte_3(self) source code
 
get_measurement_byte_4(self) source code
 
get_measurement_byte_5(self) source code
 
get_measurement_byte_6(self) source code
 
get_measurement_byte_7(self) source code
 
get_measurement_units(self) source code
 
get_product_id(self) source code
 
get_sensor_type(self) source code
 
get_version(self) source code
 
i2c_command(self, address, value) (Inherited from nxt.sensor.DigitalSensor) source code
 
i2c_query(self, address, n_bytes) (Inherited from nxt.sensor.DigitalSensor) source code
 
set_actual_scale_divisor(self, value) source code
 
set_actual_scale_factor(self, value) source code
 
set_actual_zero(self, value) source code
 
set_command_state(self, value) source code
 
set_continuous_measurement_interval(self, value) source code
 
set_input_mode(self) (Inherited from nxt.sensor.Sensor) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  I2C_DEV = 2 (Inherited from nxt.sensor.DigitalSensor)
Properties

Inherited from object: __class__

Method Details

__init__(self, brick, port)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

get_factory_scale_divisor(self)

source code 
Overrides: DigitalSensor.get_factory_scale_divisor

get_factory_scale_factor(self)

source code 
Overrides: DigitalSensor.get_factory_scale_factor

get_factory_zero(self)

source code 
Overrides: DigitalSensor.get_factory_zero

get_measurement_units(self)

source code 
Overrides: DigitalSensor.get_measurement_units

get_product_id(self)

source code 
Overrides: DigitalSensor.get_product_id

get_sensor_type(self)

source code 
Overrides: DigitalSensor.get_sensor_type

get_version(self)

source code 
Overrides: DigitalSensor.get_version