Component/EV3Sensor
Namespace
components.ev3Sensor
Constants
The button component module.
Source: lib/modules/components/ev3Sensor.whl, line: 8
| MODULE_COMPONENT_EV3_SENSOR | 130 |
Module calls for the ev3 sensor component functions.
Source: lib/modules/components/ev3Sensor.whl, line: 11
EV3_SENSOR_COMPONENT_SET_TYPE | 0 |
EV3_SENSOR_COMPONENT_SET_PORT | 1 |
EV3_SENSOR_COMPONENT_SET_VALUE | 2 |
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: 1, 2, 3 or 4. |
device | list | A list of sensor types, options are: Touch sensor, Sound sensor, Color sensor, Ultrasonic sensor, Gyro sensor, or Infrared sensor. |
Procedures
setType
Source: lib/modules/components/ev3Sensor.whl, line: 24
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/ev3Sensor.whl, line: 33
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. |
setValue
Source: lib/modules/components/ev3Sensor.whl, line: 42
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. |