Class: Mario

Mario()

new Mario()

Mario is emitted if the discovered device is a LEGO Super Mario brick.

Source:

Extends

Members

(readonly) batteryLevel

Properties:
Name Type Description
batteryLevel number

Battery level of the hub (Percentage between 0-100)

Overrides:
Source:

(readonly) connected

Properties:
Name Type Description
connected string

Connected status

Overrides:
Source:

(readonly) connecting

Properties:
Name Type Description
connecting string

Connecting status

Overrides:
Source:

(readonly) firmwareVersion

Properties:
Name Type Description
firmwareVersion string

Firmware version of the hub

Overrides:
Source:

(readonly) hardwareVersion

Properties:
Name Type Description
hardwareVersion string

Hardware version of the hub

Overrides:
Source:

(readonly) name

Properties:
Name Type Description
name string

Name of the hub

Overrides:
Source:

(readonly) ports

Properties:
Name Type Description
ports Array.<string>

Array of port names

Overrides:
Source:

(readonly) primaryMACAddress

Properties:
Name Type Description
primaryMACAddress string

Primary MAC address of the hub

Overrides:
Source:

(readonly) rssi

Properties:
Name Type Description
rssi number

Signal strength of the hub

Overrides:
Source:

(readonly) type

Properties:
Name Type Description
type string

Hub type

Overrides:
Source:

(readonly) uuid

Properties:
Name Type Description
uuid string

UUID of the hub

Overrides:
Source:

Methods

createVirtualPort(firstPortName, secondPortName) → {Promise}

Combines two ports with into a single virtual port.

Note: The devices attached to the ports must be of the same device type.

Parameters:
Name Type Description
firstPortName string

First port name

secondPortName string

Second port name

Inherited From:
Source:
Returns:

Resolved upon successful issuance of command.

Type
Promise

setName(name) → {Promise}

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:
Source:
Returns:

Resolved upon successful issuance of command.

Type
Promise

shutdown() → {Promise}

Shutdown the Hub.

Inherited From:
Source:
Returns:

Resolved upon successful disconnect.

Type
Promise

Events

button

Emits when a button is pressed.

Parameters:
Name Type Description
button string
state ButtonState
Inherited From:
Source: