# Class: PUPRemote

## PUPRemote

#### new PUPRemote()

  The PUPRemote is emitted if the discovered device is a Powered UP Remote.

  Source:
    - pupremote.js, line 15

### Extends

- LPF2Hub
- Hub

### Members

#### <readonly> batteryLevel

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `batteryLevel` | number | Battery level of the hub (Percentage between 0-100)

  Inherited From:
    - Hub#batteryLevel
  Overrides:
    - Hub#batteryLevel
  Source:
    - hub.js, line 85

#### <readonly> current

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `current` | number | Current usage of the hub (Milliamps)

  Inherited From:
    - Hub#current
  Overrides:
    - Hub#current
  Source:
    - hub.js, line 106

#### <readonly> firmwareVersion

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `firmwareVersion` | string | Firmware version of the hub

  Inherited From:
    - Hub#firmwareVersion
  Overrides:
    - Hub#firmwareVersion
  Source:
    - hub.js, line 57

#### <readonly> hardwareVersion

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `firmwareVersion` | string | Hardware version of the hub

  Inherited From:
    - Hub#hardwareVersion
  Overrides:
    - Hub#hardwareVersion
  Source:
    - hub.js, line 64

#### <readonly> name

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `name` | string | Name of the hub

  Inherited From:
    - Hub#name
  Overrides:
    - Hub#name
  Source:
    - hub.js, line 50

#### <readonly> primaryMACAddress

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `primaryMACAddress` | string | Primary MAC address of the hub

  Inherited From:
    - Hub#primaryMACAddress
  Overrides:
    - Hub#primaryMACAddress
  Source:
    - hub.js, line 71

#### <readonly> rssi

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `rssi` | number | Signal strength of the hub

  Inherited From:
    - Hub#rssi
  Overrides:
    - Hub#rssi
  Source:
    - hub.js, line 92

#### <readonly> uuid

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `uuid` | string | UUID of the hub

  Inherited From:
    - Hub#uuid
  Overrides:
    - Hub#uuid
  Source:
    - hub.js, line 78

#### <readonly> voltage

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `voltage` | number | Voltage of the hub (Volts)

  Inherited From:
    - Hub#voltage
  Overrides:
    - Hub#voltage
  Source:
    - hub.js, line 99

### Methods

#### connect()

  Connect to the Hub.

  Inherited From:
    - Hub#connect
  Overrides:
    - Hub#connect
  Source:
    - hub.js, line 109

  ##### Returns:

  Resolved upon successful connect.

  Type
    Promise

#### disconnect()

  Disconnect the Hub.

  Inherited From:
    - Hub#disconnect
  Overrides:
    - Hub#disconnect
  Source:
    - hub.js, line 127

  ##### Returns:

  Resolved upon successful disconnect.

  Type
    Promise

#### getHubType()

  Get the hub type.

  Inherited From:
    - Hub#getHubType
  Overrides:
    - Hub#getHubType
  Source:
    - hub.js, line 191

  ##### Returns:

  Type
    HubType

#### getPortDeviceType(port)

  Get the device type for a given port.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `port` | string |

  Inherited From:
    - Hub#getPortDeviceType
  Overrides:
    - Hub#getPortDeviceType
  Source:
    - hub.js, line 199

  ##### Returns:

  Type
    DeviceType

#### setLEDColor(color)

  Set the color of the LED on the Hub via a color value.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `color` | Color |

  Inherited From:
    - LPF2Hub#setLEDColor
  Source:
    - lpf2hub.js, line 98

  ##### Returns:

  Resolved upon successful issuance of command.

  Type
    Promise

#### setLEDRGB(red, green, blue)

  Set the color of the LED on the Hub via RGB values.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `red` | number |
  `green` | number |
  `blue` | number |

  Inherited From:
    - LPF2Hub#setLEDRGB
  Source:
    - lpf2hub.js, line 116

  ##### Returns:

  Resolved upon successful issuance of command.

  Type
    Promise

#### setName(name)

  Set the name of the Hub.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `name` | string | New name of the hub (14 characters or less, ASCII only).

  Inherited From:
    - LPF2Hub#setName
  Source:
    - lpf2hub.js, line 78

  ##### Returns:

  Resolved upon successful issuance of command.

  Type
    Promise

#### shutdown()

  Shutdown the Hub.

  Inherited From:
    - LPF2Hub#shutdown
  Source:
    - lpf2hub.js, line 66

  ##### Returns:

  Resolved upon successful disconnect.

  Type
    Promise

#### sleep(delay)

  Sleep a given amount of time.

  This is a helper method to make it easier to add delays into a chain of commands.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `delay` | number | How long to sleep (in milliseconds).

  Inherited From:
    - Hub#sleep
  Overrides:
    - Hub#sleep
  Source:
    - hub.js, line 167

  ##### Returns:

  Resolved after the delay is finished.

  Type
    Promise

#### subscribe(port [, mode])

  Subscribe to sensor notifications on a given port.

  ##### Parameters:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `port` | string |  |
  `mode` | number | <optional> | The sensor mode to activate. If no mode is provided, the default for that sensor will be chosen.

  Inherited From:
    - Hub#subscribe
  Overrides:
    - Hub#subscribe
  Source:
    - hub.js, line 135

  ##### Returns:

  Resolved upon successful issuance of command.

  Type
    Promise

#### unsubscribe(port)

  Unsubscribe to sensor notifications on a given port.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `port` | string |

  Inherited From:
    - Hub#unsubscribe
  Overrides:
    - Hub#unsubscribe
  Source:
    - hub.js, line 153

  ##### Returns:

  Resolved upon successful issuance of command.

  Type
    Promise

#### wait(commands)

  Wait until a given list of concurrently running commands are complete.

  This is a helper method to make it easier to wait for concurrent commands to complete.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `commands` | Array.<Promise.<any>> | Array of executing commands.

  Inherited From:
    - Hub#wait
  Overrides:
    - Hub#wait
  Source:
    - hub.js, line 180

  ##### Returns:

  Resolved after the commands are finished.

  Type
    Promise

### Events

#### accel

  Emits when accelerometer detects movement. Measured in mG.

  ##### Parameters:

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

  Inherited From:
    - LPF2Hub#event:accel
  Source:
    - lpf2hub.js, line 507

#### attach

  Emits when a motor or sensor is attached to the Hub.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `port` | string |
  `type` | DeviceType |

  Inherited From:
    - Hub#event:attach
  Overrides:
    - Hub#event:attach
  Source:
    - hub.js, line 237

#### button

  Emits when a button is pressed.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `button` | string |
  `state` | ButtonState |

  Inherited From:
    - LPF2Hub#event:button
  Source:
    - lpf2hub.js, line 216

#### color

  Emits when a color sensor is activated.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `port` | string |
  `color` | Color |

  Inherited From:
    - LPF2Hub#event:color
  Source:
    - lpf2hub.js, line 408

#### colorAndDistance

  A combined color and distance event, emits when the sensor is activated.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `port` | string |
  `color` | Color |
  `distance` | number | Distance, in millimeters.

  Inherited From:
    - LPF2Hub#event:colorAndDistance
  Source:
    - lpf2hub.js, line 424

#### detach

  Emits when an attached motor or sensor is detached from the Hub.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `port` | string |

  Inherited From:
    - Hub#event:detach
  Overrides:
    - Hub#event:detach
  Source:
    - hub.js, line 248

#### disconnect

  Emits when the hub is disconnected.

  Inherited From:
    - Hub#event:disconnect
  Overrides:
    - Hub#event:disconnect
  Source:
    - hub.js, line 39

#### distance

  Emits when a distance sensor is activated.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `port` | string |
  `distance` | number | Distance, in millimeters.

  Inherited From:
    - LPF2Hub#event:distance
  Source:
    - lpf2hub.js, line 398

#### gyro

  Emits when gyroscope detects movement. Measured in DPS - degrees per second.

  ##### Parameters:

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

  Inherited From:
    - LPF2Hub#event:gyro
  Source:
    - lpf2hub.js, line 492

#### rotate

  Emits when a rotation sensor is activated.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `port` | string |
  `rotation` | number |

  Inherited From:
    - LPF2Hub#event:rotate
  Source:
    - lpf2hub.js, line 454

#### speed

  Emits on a speed change.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `port` | string |
  `speed` | number |

  Inherited From:
    - LPF2Hub#event:speed
  Source:
    - lpf2hub.js, line 554

#### temp

  Emits when a change is detected on a temperature sensor. Measured in degrees centigrade.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `port` | string | For Control+ Hubs, port will be "CPU" as the sensor reports CPU temperature.
  `temp` | number |

  Inherited From:
    - LPF2Hub#event:temp
  Source:
    - lpf2hub.js, line 378

#### tilt

  Emits when a tilt sensor is activated.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `port` | string | If the event is fired from the Move Hub or Control+ Hub's in-built tilt sensor, the special port "TILT" is used.
  `x` | number |
  `y` | number |
  `z` | number | (Only available when using a Control+ Hub)

  Inherited From:
    - LPF2Hub#event:tilt
  Source:
    - lpf2hub.js, line 441

#### Search results