Ev3Motors

Last Updated On 2021-07-16

Version 1MinSDK 7Tutorial Video

A component that provides both high- and low-level interfaces to a LEGO MINDSTORMS EV3 robot, with functions that can control the motors.


Properties

You can set the below properties in the UI part of the builder.

  • BluetoothClient - it's a BluetoothClient value which is set to blank by default.
  • EnableSpeedRegulation - it's a boolean value which is set to true by default.
  • MotorPorts - it's a string value which is set to abc by default.
  • ReverseDirection - it's a boolean value which is set to false by default.
  • StopBeforeDisconnect - it's a boolean value which is set to true by default.
  • TachoCountChangedEventEnabled - it's a boolean value which is set to false by default.
  • WheelDiameter - it's a float value which is set to 4.32 by default.

Block Properties

You can set the below blocks properties in the blocks section of the builder.

BluetoothClient

The BluetoothClient component that should be used for communication.


EnableSpeedRegulation

Specifies whether to keep motor rotation at constant speed.


ReverseDirection

Set whether the direction of motors is reversed or not.


StopBeforeDisconnect

Whether to stop the motor before disconnecting.


TachoCountChangedEventEnabled

Whether the TachoCountChanged event should fire when the angle is changed.



Methods

You can set the below method blocks in the blocks section of the builder.

GetTachoCount

Get the current tacho count.

ResetTachoCount

Set the current tacho count to zero.

RotateInDistance

Rotate the motors in a distance.

RotateInDuration

Rotate the motors in a period of time.

RotateInTachoCounts

Rotate the motors in a number of tacho counts.

RotateIndefinitely

Start to rotate the motors.

RotateSyncInDistance

Rotate the motors at the same speed for a distance in cm.

RotateSyncInDuration

Rotate the motors at the same speed in a period of time.

RotateSyncInTachoCounts

Rotate the motors at the same speed in a number of tacho counts.

RotateSyncIndefinitely

Start to rotate the motors at the same speed.

Stop

Stop the motors of the robot.

ToggleDirection

Toggle the direction of motors.


Events

You can set the below event blocks in the blocks section of the builder.

TachoCountChanged

Called when the tacho count has changed.