MonoBrick EV3 Firmware
Public Member Functions | List of all members
MonoBrickFirmware.Movement.Motor Class Reference

Class for EV3 motor More...

Inheritance diagram for MonoBrickFirmware.Movement.Motor:
MonoBrickFirmware.Movement.MotorBase

Public Member Functions

 Motor (MotorPort port)
 Initializes a new instance of the MonoBrickFirmware.IO.Motor class. More...
 
void SetSpeed (sbyte speed)
 Move the motor More...
 
WaitHandle SpeedProfile (sbyte speed, UInt32 rampUpSteps, UInt32 constantSpeedSteps, UInt32 rampDownSteps, bool brake)
 Create a speed profile where ramp up and down is specified in steps More...
 
WaitHandle SpeedProfileTime (sbyte speed, UInt32 rampUpTimeMs, UInt32 constantSpeedTimeMs, UInt32 rampDownTimeMs, bool brake)
 Create a speed profile where ramp up and down is specified in time More...
 
WaitHandle PowerProfile (sbyte power, UInt32 rampUpSteps, UInt32 constantSpeedSteps, UInt32 rampDownSteps, bool brake)
 Create a power profile where ramp up and down is specified in steps More...
 
WaitHandle PowerProfileTime (byte power, UInt32 rampUpTimeMs, UInt32 constantSpeedTimeMs, UInt32 rampDownTimeMs, bool brake)
 Create a power profile where ramp up and down is specified in time More...
 
void ResetTacho ()
 Resets the tacho More...
 
Int32 GetTachoCount ()
 Gets the tacho count. More...
 
sbyte GetSpeed ()
 Gets the speed of the motor More...
 
- Public Member Functions inherited from MonoBrickFirmware.Movement.MotorBase
bool IsRunning ()
 Determines whether the motor(s) are running. More...
 
virtual void Brake ()
 Brake the motor (is still on but does not move) More...
 
virtual void Off ()
 Turn the motor off More...
 
virtual void SetPower (sbyte power)
 Sets the power of the motor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from MonoBrickFirmware.Movement.MotorBase
void CancelPolling ()
 
WaitHandle WaitForMotorsToStop ()
 
WaitHandle WaitForMotorsToStartAndStop ()
 
- Properties inherited from MonoBrickFirmware.Movement.MotorBase
List< MotorPortPortList [get, set]
 Gets or sets the motor port this is set by the bitfield. Do not set this use the bitfield property instead More...
 
OutputBitfield BitField [get, set]
 Gets or sets the bit field. More...
 

Detailed Description

Class for EV3 motor

Constructor & Destructor Documentation

MonoBrickFirmware.Movement.Motor.Motor ( MotorPort  port)
inline

Initializes a new instance of the MonoBrickFirmware.IO.Motor class.

Parameters
portPort.

Member Function Documentation

sbyte MonoBrickFirmware.Movement.Motor.GetSpeed ( )
inline

Gets the speed of the motor

Returns
The speed.
Int32 MonoBrickFirmware.Movement.Motor.GetTachoCount ( )
inline

Gets the tacho count.

Returns
The tacho count
WaitHandle MonoBrickFirmware.Movement.Motor.PowerProfile ( sbyte  power,
UInt32  rampUpSteps,
UInt32  constantSpeedSteps,
UInt32  rampDownSteps,
bool  brake 
)
inline

Create a power profile where ramp up and down is specified in steps

Parameters
powerMaximum power of the motor.
rampUpStepsRamp up steps.
constantSpeedStepsConstant speed steps.
rampDownStepsRamp down steps.
brakeIf set to true the motor will brake when movement is done.
WaitHandle MonoBrickFirmware.Movement.Motor.PowerProfileTime ( byte  power,
UInt32  rampUpTimeMs,
UInt32  constantSpeedTimeMs,
UInt32  rampDownTimeMs,
bool  brake 
)
inline

Create a power profile where ramp up and down is specified in time

Parameters
powerMaximum power of the motor.
rampUpTimeMsRamp up time ms.
constantSpeedTimeMsConstant speed time ms.
rampDownTimeMsRamp down time ms.
brakeIf set to true the motor will brake when movement is done.
void MonoBrickFirmware.Movement.Motor.ResetTacho ( )
inline

Resets the tacho

void MonoBrickFirmware.Movement.Motor.SetSpeed ( sbyte  speed)
inline

Move the motor

Parameters
speedSpeed of the motor -100 to 100
WaitHandle MonoBrickFirmware.Movement.Motor.SpeedProfile ( sbyte  speed,
UInt32  rampUpSteps,
UInt32  constantSpeedSteps,
UInt32  rampDownSteps,
bool  brake 
)
inline

Create a speed profile where ramp up and down is specified in steps

Parameters
speedMaximum speed of the motor.
rampUpStepsRamp up steps.
constantSpeedStepsConstant speed steps.
rampDownStepsRamp down steps.
brakeIf set to true the motor will brake when movement is done.
WaitHandle MonoBrickFirmware.Movement.Motor.SpeedProfileTime ( sbyte  speed,
UInt32  rampUpTimeMs,
UInt32  constantSpeedTimeMs,
UInt32  rampDownTimeMs,
bool  brake 
)
inline

Create a speed profile where ramp up and down is specified in time

Parameters
speedMaximum speed of the motor.
rampUpTimeMsRamp up time ms.
constantSpeedTimeMsConstant speed time ms.
rampDownTimeMsRamp down time ms.
brakeIf set to true the motor will brake when movement is done.

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