Extends
Members
(readonly) connected
Properties:
Name | Type | Description |
---|---|---|
connected |
boolean |
Check if the device is still attached. |
- Inherited From:
- Source:
(readonly) hub
Properties:
Name | Type | Description |
---|---|---|
hub |
Hub |
The Hub the device is attached to. |
- Inherited From:
- Source:
(readonly) isVirtualPort
Properties:
Name | Type | Description |
---|---|---|
isVirtualPort |
boolean |
Is this device attached to a virtual port (ie. a combined device) |
- Inherited From:
- Source:
(readonly) mode
Properties:
Name | Type | Description |
---|---|---|
mode |
number |
The mode the device is currently in |
- Inherited From:
- Source:
(readonly) portName
Properties:
Name | Type | Description |
---|---|---|
portName |
string |
The port the device is attached to. |
- Inherited From:
- Source:
(readonly) type
Properties:
Name | Type | Description |
---|---|---|
type |
number |
The type of the device |
- Inherited From:
- Source:
Methods
setBrightness(firstSegment, secondSegment, thirdSegment) → {Promise.<CommandFeedback>}
Set the brightness (or turn on/off) of the lights around the sensor.
Parameters:
Name | Type | Description |
---|---|---|
firstSegment |
number |
First light segment. 0-100 brightness. |
secondSegment |
number |
Second light segment. 0-100 brightness. |
thirdSegment |
number |
Third light segment. 0-100 brightness. |
- Source:
Events
ambient :object
Emits when the ambient light changes.
Parameters:
Name | Type | Description |
---|---|---|
ambient |
number |
Percentage, from 0 to 100. |
- Source:
color :object
Emits when a color sensor is activated.
Parameters:
Name | Type | Description |
---|---|---|
color |
Color |
- Source:
hsvAmbient :object
Emits when a color sensor is activated. Measured with light off.
Parameters:
Name | Type | Description |
---|---|---|
hue |
number | |
saturation |
number | |
value |
number | |
intensity |
number |
- Source:
hsvIntensity :object
Emits when a color sensor is activated. Measured with light on.
Parameters:
Name | Type | Description |
---|---|---|
hue |
number | |
saturation |
number | |
value |
number |
- Source:
reflect :object
Emits when the light reflectivity changes.
Parameters:
Name | Type | Description |
---|---|---|
reflect |
number |
Percentage, from 0 to 100. |
- Source:
rgbIntensity :object
Emits when a color sensor is activated. Measured with light on.
Parameters:
Name | Type | Description |
---|---|---|
red |
number | |
green |
number | |
blue |
number | |
intensity |
number |
- Source: