Component/EV3Motor
Namespace
components.ev3Motor
Constants
The button component module.
Source: lib/modules/components/ev3Motor.whl, line: 8
| MODULE_COMPONENT_EV3_MOTOR | 129 |
Module calls for the ev3 motor component functions.
Source: lib/modules/components/ev3Motor.whl, line: 11
EV3_MOTOR_COMPONENT_SET_TYPE | 0 |
EV3_MOTOR_COMPONENT_SET_PORT | 1 |
EV3_MOTOR_COMPONENT_SET_SPEED | 2 |
EV3_MOTOR_COMPONENT_SET_VALUE | 3 |
EV3_MOTOR_COMPONENT_SET_READY | 4 |
Ready color indicator for the motor.
Source: lib/modules/components/ev3Motor.whl, line: 18
EV3_MOTOR_READY_NONE | 0 |
EV3_MOTOR_READY_RED | 1 |
EV3_MOTOR_READY_YELLOW | 2 |
EV3_MOTOR_READY_GREEN | 3 |
Properties
These properties can be edited with the property editor in the IDE.
Name | Type | Description |
name | string | The component name. |
x | number | The left position of the component inside the parent component. |
y | number | The top position of the component inside the parent component. |
zIndex | number | The depth of the component related to other components in the parent. |
port | list | A list of selectable ports, options are: A, B, C or D. |
device | list | A list of motor types, options are: Medium motor or Large motor. |
Procedures
setType
Source: lib/modules/components/ev3Motor.whl, line: 32
Set the type of device.
proc setType(number windowHandle, number componentHandle, number type)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the window. |
componentHandle | number | The handle of the component. |
type | number | The device type. |
setPort
Source: lib/modules/components/ev3Motor.whl, line: 41
Set the port of the device.
proc setPort(number windowHandle, number componentHandle, number port)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the window. |
componentHandle | number | The handle of the component. |
port | number | The device port. |
setSpeed
Source: lib/modules/components/ev3Motor.whl, line: 50
Set the speed bar value.
proc setSpeed(number windowHandle, number componentHandle, number speed)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the window. |
componentHandle | number | The handle of the component. |
speed | number | The speed value in the range of -100..100. |
setValue
Source: lib/modules/components/ev3Motor.whl, line: 59
Set the value.
proc setValue(number windowHandle, number componentHandle, number value)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the window. |
componentHandle | number | The handle of the component. |
value | number | The value. |
setReady
Source: lib/modules/components/ev3Motor.whl, line: 68
Set the ready state.
proc setReady(number windowHandle, number componentHandle, number ready)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the window. |
componentHandle | number | The handle of the component. |
ready | number | The ready state. |