# TechnicMediumHubTiltSensor

#### new TechnicMediumHubTiltSensor()

Source:
  - devices/technicmediumhubtiltsensor.js, line 25

### Extends

- Device

### Members

#### (readonly) connected

##### Properties:

Name | Type | Description
--- | --- | ---
`connected` | boolean | Check if the device is still attached.

Inherited From:
  - Device#connected
Source:
  - devices/device.js, line 76

#### (readonly) hub

##### Properties:

Name | Type | Description
--- | --- | ---
`hub` | Hub | The Hub the device is attached to.

Inherited From:
  - Device#hub
Source:
  - devices/device.js, line 83

#### (readonly) isVirtualPort

##### Properties:

Name | Type | Description
--- | --- | ---
`isVirtualPort` | boolean | Is this device attached to a virtual port (ie. a combined device)

Inherited From:
  - Device#isVirtualPort
Source:
  - devices/device.js, line 120

#### (readonly) mode

##### Properties:

Name | Type | Description
--- | --- | ---
`mode` | number | The mode the device is currently in

Inherited From:
  - Device#mode
Source:
  - devices/device.js, line 110

#### (readonly) portName

##### Properties:

Name | Type | Description
--- | --- | ---
`portName` | string | The port the device is attached to.

Inherited From:
  - Device#portName
Source:
  - devices/device.js, line 93

#### (readonly) type

##### Properties:

Name | Type | Description
--- | --- | ---
`type` | number | The type of the device

Inherited From:
  - Device#type
Source:
  - devices/device.js, line 100

### Methods

#### setImpactCount(impact) → {Promise}

Set the impact count value.

##### Parameters:

Name | Type | Description
--- | --- | ---
`impact` | count | count between 0 and 2^32

Source:
  - devices/technicmediumhubtiltsensor.js, line 77

#### setImpactHoldoff(value) → {Promise}

Set the impact holdoff time.

##### Parameters:

Name | Type | Description
--- | --- | ---
`value` | holdoff | between 1 and 127

Source:
  - devices/technicmediumhubtiltsensor.js, line 105

#### setImpactThreshold(value) → {Promise}

Set the impact threshold.

##### Parameters:

Name | Type | Description
--- | --- | ---
`value` | threshold | between 1 and 127

Source:
  - devices/technicmediumhubtiltsensor.js, line 92

### Events

#### impactCount :object

Emits when proper acceleration is above threshold (e.g. on impact when being thrown to the ground).

##### Parameters:

Name | Type | Description
--- | --- | ---
`number` | number | of impact events.

Source:
  - devices/technicmediumhubtiltsensor.js, line 67

#### tilt :object

Emits when a tilt sensor is activated.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | number |
`y` | number |
`z` | number |

Source:
  - devices/technicmediumhubtiltsensor.js, line 39