MonoBrick Mindstorms Communication Library
Public Member Functions | Properties | List of all members
MonoBrick.EV3.UltrasonicSensor Class Reference

Class for the EV3 and NXT ultrasonic sensor More...

Inheritance diagram for MonoBrick.EV3.UltrasonicSensor:
MonoBrick.EV3.Sensor MonoBrick.ISensor

Public Member Functions

 UltrasonicSensor ()
 Initializes a new instance of the MonoBrick.EV3.UltrasonicSensor class. More...
 
 UltrasonicSensor (UltrasonicMode mode)
 Initializes a new instance of the MonoBrick.EV3.UltrasonicSensor class. More...
 
override string ReadAsString ()
 Reads the sensor value as a string. More...
 
float Read ()
 Read the sensor value. Result depends on the mode More...
 
- Public Member Functions inherited from MonoBrick.EV3.Sensor
SensorType GetSensorType ()
 Gets the sensor type More...
 
virtual string GetName ()
 Gets the name of the sensor More...
 
virtual string GetSymbole ()
 Get device symbol More...
 
 Sensor ()
 Initializes a new instance of the MonoBrick.EV3.Sensor class. More...
 
 Sensor (SensorMode mode)
 Initializes a new instance of the MonoBrick.EV3.Sensor class. More...
 
void Initialize ()
 Initialize the sensor More...
 

Properties

UltrasonicMode Mode [get, set]
 Gets or sets the ultrasonic mode. More...
 
- Properties inherited from MonoBrick.EV3.Sensor
DaisyChainLayer DaisyChainLayer [get, set]
 Gets or sets the daisy chain layer. More...
 

Additional Inherited Members

- Protected Member Functions inherited from MonoBrick.EV3.Sensor
SensorMode GetSensorMode ()
 Gets the sensor mode. More...
 
void GetTypeAndMode (out SensorType type, out SensorMode mode)
 Gets the sensor type and mode. More...
 
string GetFormat ()
 Get sensor format More...
 
Int32 GetRaw ()
 Read the raw sensor value More...
 
string GetModeName ()
 Get device mode name More...
 
string GetModeName (SensorMode mode)
 Get device mode name More...
 
void GetFigures (out byte figures, out byte decimals)
 Gets figure layout. More...
 
void GetMinMax (out float min, out float max)
 Gets the min and max values that can be returned. More...
 
byte ReadyPct ()
  More...
 
Int32 ReadyRaw ()
  More...
 
float ReadySi ()
  More...
 
float GetChanges ()
 Get positive changes since last clear More...
 
float GetBumbs ()
 Get the bolean count since the last clear More...
 
void ClearChanges ()
 Clear changes and bumps More...
 
void CalcMinMax (UInt32 min, UInt32 max)
 Apply new minimum and maximum raw value for device type to be used in scaling PCT and SI More...
 
void CalcMin (UInt32 min)
 Apply new minimum raw value for device type to be used in scaling PCT and SI More...
 
void CalcMax (UInt32 max)
 Apply new maximum raw value for device type to be used in scaling PCT and SI More...
 
void CalcDefault ()
 Apply the default minimum and maximum raw value for device type to be used in scaling PCT and SI More...
 
byte SetUp (byte repeat, Int16 reapeatTime, byte[] writeData)
 Generic setup/read IIC sensors More...
 
void ClearAll ()
 Clear all devices (e.c. counters, angle, ...) More...
 
void StopAll ()
 Stop all devices (e.c. motors, ...) More...
 
byte GetRead ()
 Read a sensor value More...
 
float ReadSi ()
 Reads the si sensor value More...
 
virtual void SetMode (SensorMode mode)
 Sets the sensor mode More...
 
bool IsReady ()
 Wait for device ready (wait for valid data) More...
 
void Write (byte[] data)
 Write data to device (only UART devices) More...
 
- Protected Attributes inherited from MonoBrick.EV3.Sensor
bool isInitialized = false
 If initialized has been called More...
 
SensorMode mode = SensorMode.Mode0
 Holds the sensor mode that is used. More...
 

Detailed Description

Class for the EV3 and NXT ultrasonic sensor

Constructor & Destructor Documentation

MonoBrick.EV3.UltrasonicSensor.UltrasonicSensor ( )
inline

Initializes a new instance of the MonoBrick.EV3.UltrasonicSensor class.

MonoBrick.EV3.UltrasonicSensor.UltrasonicSensor ( UltrasonicMode  mode)
inline

Initializes a new instance of the MonoBrick.EV3.UltrasonicSensor class.

Parameters
modeMode.

Member Function Documentation

float MonoBrick.EV3.UltrasonicSensor.Read ( )
inline

Read the sensor value. Result depends on the mode

override string MonoBrick.EV3.UltrasonicSensor.ReadAsString ( )
inlinevirtual

Reads the sensor value as a string.

Returns
The value as a string

Reimplemented from MonoBrick.EV3.Sensor.

Property Documentation

UltrasonicMode MonoBrick.EV3.UltrasonicSensor.Mode
getset

Gets or sets the ultrasonic mode.

The mode.


The documentation for this class was generated from the following file: