new TechnicForceSensor()
- Source:
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:
Events
force
Emits when force is applied.
Type:
- object
Parameters:
Name | Type | Description |
---|---|---|
force |
number | Force, in newtons (0-10). |
- Source:
tapped
Emits when the sensor is tapped.
Type:
- object
Parameters:
Name | Type | Description |
---|---|---|
tapped |
number | How hard the sensor was tapped, from 0-3. |
- Source:
touch
Emits when the sensor is touched.
Type:
- object
Parameters:
Name | Type | Description |
---|---|---|
touch |
boolean | Touched on/off (boolean). |
- Source: