Wheel IDE

Online demo »

Component/EV3Sensor

Namespace
components.ev3Sensor

Constants

The button component module.
Source: lib/modules/components/ev3Sensor.whl, line: 8
MODULE_COMPONENT_EV3_SENSOR130

Module calls for the ev3 sensor component functions.
Source: lib/modules/components/ev3Sensor.whl, line: 11
EV3_SENSOR_COMPONENT_SET_TYPE0
EV3_SENSOR_COMPONENT_SET_PORT1
EV3_SENSOR_COMPONENT_SET_VALUE2

Properties

These properties can be edited with the property editor in the IDE.

NameTypeDescription
namestringThe component name.
xnumberThe left position of the component inside the parent component.
ynumberThe top position of the component inside the parent component.
zIndexnumberThe depth of the component related to other components in the parent.
portlistA list of selectable ports, options are: 1, 2, 3 or 4.
devicelistA 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:
NameTypeDescription
windowHandlenumberThe handle of the window.
componentHandlenumberThe handle of the component.
typenumberThe 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:
NameTypeDescription
windowHandlenumberThe handle of the window.
componentHandlenumberThe handle of the component.
portnumberThe device port.

setValue
Source: lib/modules/components/ev3Sensor.whl, line: 42

Set the value.

proc setValue(number windowHandle, number componentHandle, number value)
Parameters:
NameTypeDescription
windowHandlenumberThe handle of the window.
componentHandlenumberThe handle of the component.
valuenumberThe value.