Component/PUDevice
        Namespace
        components.puDevice
            
            Constants
            
                
                
The button component module.
                Source: lib/modules/components/poweredUpDevice.whl, line: 8
                
                     | MODULE_COMPONENT_PU_DEVICE | 128 | 
                
            
            
                
                
Module calls for button component functions.
                Source: lib/modules/components/poweredUpDevice.whl, line: 11
                
                    | PU_DEVICE_COMPONENT_SET_TYPE | 0 | 
                    | PU_DEVICE_COMPONENT_SET_PORT | 1 | 
                    | PU_DEVICE_COMPONENT_SET_SPEED | 2 | 
                    | PU_DEVICE_COMPONENT_SET_VALUE | 3 | 
                    | PU_DEVICE_COMPONENT_SET_READY | 4 | 
                    | PU_DEVICE_COMPONENT_SET_COLOR_MODE | 5 | 
                
            
            
            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: Basic motor, Train motor, Led lights, Tacho motor, Move hub motor, Ctrl+ L motor, Ctrl+ XL motor or Distance sensor. | 
        | colorMode | boolean | If this option is selected and the input type is Distance sensor then the value will be displayed as a color instead of a text. | 
            
            
            Procedures
            
            setType
            Source: lib/modules/components/poweredUpDevice.whl, line: 28
            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/poweredUpDevice.whl, line: 37
            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/poweredUpDevice.whl, line: 46
            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/poweredUpDevice.whl, line: 55
            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/poweredUpDevice.whl, line: 64
            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. | 
            
            
            
            setColorMode
            Source: lib/modules/components/poweredUpDevice.whl, line: 73
            Set color mode, show the value as a color.
            proc setColorMode(number windowHandle, number componentHandle, number colorMode)
            Parameters:
            
                | Name | Type | Description | 
                | windowHandle | number | The handle of the window. | 
                | componentHandle | number | The handle of the component. | 
                | colorMode | number | The color display mode TRUE or FALSE. |