node-poweredup/docs/classes.list.html
Nathan Kellenicki b66eb5befa
Some checks failed
continuous-integration/drone/tag Build is failing
continuous-integration/drone/push Build is failing
Updated docs
2020-04-04 17:27:36 -07:00

9925 lines
114 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>node-poweredup Classes</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
<link type="text/css" rel="stylesheet" href="styles/site.simplex.css">
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse" id="topNavigation">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li><a href="AbsoluteMotor.html">AbsoluteMotor</a></li><li><a href="BaseHub.html">BaseHub</a></li><li><a href="BasicMotor.html">BasicMotor</a></li><li><a href="BoostMoveHub.html">BoostMoveHub</a></li><li><a href="ColorDistanceSensor.html">ColorDistanceSensor</a></li><li><a href="ControlPlusHub.html">ControlPlusHub</a></li><li><a href="CurrentSensor.html">CurrentSensor</a></li><li><a href="Device.html">Device</a></li><li><a href="DuploTrainBase.html">DuploTrainBase</a></li><li><a href="DuploTrainBaseColorSensor.html">DuploTrainBaseColorSensor</a></li><li><a href="DuploTrainBaseMotor.html">DuploTrainBaseMotor</a></li><li><a href="DuploTrainBaseSpeaker.html">DuploTrainBaseSpeaker</a></li><li><a href="DuploTraniBaseSpeedometer.html">DuploTraniBaseSpeedometer</a></li><li><a href="Hub.html">Hub</a></li><li><a href="HubLED.html">HubLED</a></li><li><a href="Light.html">Light</a></li><li><a href="LPF2Hub.html">LPF2Hub</a></li><li><a href="MediumLinearMotor.html">MediumLinearMotor</a></li><li><a href="MotionSensor.html">MotionSensor</a></li><li><a href="MoveHub.html">MoveHub</a></li><li><a href="MoveHubMediumLinearMotor.html">MoveHubMediumLinearMotor</a></li><li><a href="MoveHubTiltSensor.html">MoveHubTiltSensor</a></li><li><a href="PiezoBuzzer.html">PiezoBuzzer</a></li><li><a href="PUPHub.html">PUPHub</a></li><li><a href="PUPRemote.html">PUPRemote</a></li><li><a href="RemoteControl.html">RemoteControl</a></li><li><a href="RemoteControlButton.html">RemoteControlButton</a></li><li><a href="SimpleMediumLinearMotor.html">SimpleMediumLinearMotor</a></li><li><a href="TachoMotor.html">TachoMotor</a></li><li><a href="TechnicColorSensor.html">TechnicColorSensor</a></li><li><a href="TechnicDistanceSensor.html">TechnicDistanceSensor</a></li><li><a href="TechnicForceSensor.html">TechnicForceSensor</a></li><li><a href="TechnicLargeAngularMotor.html">TechnicLargeAngularMotor</a></li><li><a href="TechnicLargeLinearMotor.html">TechnicLargeLinearMotor</a></li><li><a href="TechnicMediumAngularMotor.html">TechnicMediumAngularMotor</a></li><li><a href="TechnicMediumHub.html">TechnicMediumHub</a></li><li><a href="TechnicMediumHubAccelerometerSensor.html">TechnicMediumHubAccelerometerSensor</a></li><li><a href="TechnicMediumHubGyroSensor.html">TechnicMediumHubGyroSensor</a></li><li><a href="TechnicMediumHubTiltSensor.html">TechnicMediumHubTiltSensor</a></li><li><a href="TechnicXLargeLinearMotor.html">TechnicXLargeLinearMotor</a></li><li><a href="TiltSensor.html">TiltSensor</a></li><li><a href="TrainMotor.html">TrainMotor</a></li><li><a href="VoltageSensor.html">VoltageSensor</a></li><li><a href="WeDo2SmartHub.html">WeDo2SmartHub</a></li>
</ul>
</li>
<li class="dropdown">
<a href="events.list.html" class="dropdown-toggle" data-toggle="dropdown">Events<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li><a href="AbsoluteMotor.html#event:absolute">AbsoluteMotor#event:absolute</a></li><li><a href="AbsoluteMotor.html#event:rotate">AbsoluteMotor#event:rotate</a></li><li><a href="BoostMoveHub.html#event:attach">BoostMoveHub#event:attach</a></li><li><a href="BoostMoveHub.html#event:button">BoostMoveHub#event:button</a></li><li><a href="BoostMoveHub.html#event:detach">BoostMoveHub#event:detach</a></li><li><a href="BoostMoveHub.html#event:disconnect">BoostMoveHub#event:disconnect</a></li><li><a href="ColorDistanceSensor.html#event:color">ColorDistanceSensor#event:color</a></li><li><a href="ColorDistanceSensor.html#event:colorAndDistance">ColorDistanceSensor#event:colorAndDistance</a></li><li><a href="ColorDistanceSensor.html#event:distance">ColorDistanceSensor#event:distance</a></li><li><a href="ControlPlusHub.html#event:attach">ControlPlusHub#event:attach</a></li><li><a href="ControlPlusHub.html#event:button">ControlPlusHub#event:button</a></li><li><a href="ControlPlusHub.html#event:detach">ControlPlusHub#event:detach</a></li><li><a href="ControlPlusHub.html#event:disconnect">ControlPlusHub#event:disconnect</a></li><li><a href="CurrentSensor.html#event:current">CurrentSensor#event:current</a></li><li><a href="DuploTrainBase.html#event:button">DuploTrainBase#event:button</a></li><li><a href="DuploTrainBaseColorSensor.html#event:color">DuploTrainBaseColorSensor#event:color</a></li><li><a href="DuploTrainBaseColorSensor.html#event:reflect">DuploTrainBaseColorSensor#event:reflect</a></li><li><a href="DuploTrainBaseColorSensor.html#event:rgb">DuploTrainBaseColorSensor#event:rgb</a></li><li><a href="DuploTrainBaseSpeedometer.html#event:speed">DuploTrainBaseSpeedometer#event:speed</a></li><li><a href="Hub.html#event:attach">Hub#event:attach</a></li><li><a href="Hub.html#event:button">Hub#event:button</a></li><li><a href="Hub.html#event:detach">Hub#event:detach</a></li><li><a href="Hub.html#event:disconnect">Hub#event:disconnect</a></li><li><a href="LPF2Hub.html#event:button">LPF2Hub#event:button</a></li><li><a href="MediumLinearMotor.html#event:rotate">MediumLinearMotor#event:rotate</a></li><li><a href="MotionSensor.html#event:distance">MotionSensor#event:distance</a></li><li><a href="MoveHub.html#event:button">MoveHub#event:button</a></li><li><a href="MoveHubMediumLinearMotor.html#event:rotate">MoveHubMediumLinearMotor#event:rotate</a></li><li><a href="MoveHubTiltSensor.html#event:tilt">MoveHubTiltSensor#event:tilt</a></li><li><a href="PUPHub.html#event:attach">PUPHub#event:attach</a></li><li><a href="PUPHub.html#event:button">PUPHub#event:button</a></li><li><a href="PUPHub.html#event:detach">PUPHub#event:detach</a></li><li><a href="PUPHub.html#event:disconnect">PUPHub#event:disconnect</a></li><li><a href="PUPRemote.html#event:attach">PUPRemote#event:attach</a></li><li><a href="PUPRemote.html#event:button">PUPRemote#event:button</a></li><li><a href="PUPRemote.html#event:detach">PUPRemote#event:detach</a></li><li><a href="PUPRemote.html#event:disconnect">PUPRemote#event:disconnect</a></li><li><a href="RemoteControl.html#event:button">RemoteControl#event:button</a></li><li><a href="RemoteControlButton.html#event:button">RemoteControlButton#event:button</a></li><li><a href="TachoMotor.html#event:rotate">TachoMotor#event:rotate</a></li><li><a href="TechnicColorSensor.html#event:ambient">TechnicColorSensor#event:ambient</a></li><li><a href="TechnicColorSensor.html#event:color">TechnicColorSensor#event:color</a></li><li><a href="TechnicColorSensor.html#event:reflect">TechnicColorSensor#event:reflect</a></li><li><a href="TechnicDistanceSensor.html#event:distance">TechnicDistanceSensor#event:distance</a></li><li><a href="TechnicDistanceSensor.html#event:fastDistance">TechnicDistanceSensor#event:fastDistance</a></li><li><a href="TechnicForceSensor.html#event:force">TechnicForceSensor#event:force</a></li><li><a href="TechnicForceSensor.html#event:tapped">TechnicForceSensor#event:tapped</a></li><li><a href="TechnicForceSensor.html#event:touch">TechnicForceSensor#event:touch</a></li><li><a href="TechnicLargeAngularMotor.html#event:absolute">TechnicLargeAngularMotor#event:absolute</a></li><li><a href="TechnicLargeAngularMotor.html#event:rotate">TechnicLargeAngularMotor#event:rotate</a></li><li><a href="TechnicLargeLinearMotor.html#event:absolute">TechnicLargeLinearMotor#event:absolute</a></li><li><a href="TechnicLargeLinearMotor.html#event:rotate">TechnicLargeLinearMotor#event:rotate</a></li><li><a href="TechnicMediumAngularMotor.html#event:absolute">TechnicMediumAngularMotor#event:absolute</a></li><li><a href="TechnicMediumAngularMotor.html#event:rotate">TechnicMediumAngularMotor#event:rotate</a></li><li><a href="TechnicMediumHub.html#event:button">TechnicMediumHub#event:button</a></li><li><a href="TechnicMediumHubAccelerometerSensor.html#event:accel">TechnicMediumHubAccelerometerSensor#event:accel</a></li><li><a href="TechnicMediumHubGyroSensor.html#event:gyro">TechnicMediumHubGyroSensor#event:gyro</a></li><li><a href="TechnicMediumHubTiltSensor.html#event:tilt">TechnicMediumHubTiltSensor#event:tilt</a></li><li><a href="TechnicXLargeLinearMotor.html#event:absolute">TechnicXLargeLinearMotor#event:absolute</a></li><li><a href="TechnicXLargeLinearMotor.html#event:rotate">TechnicXLargeLinearMotor#event:rotate</a></li><li><a href="TiltSensor.html#event:tilt">TiltSensor#event:tilt</a></li><li><a href="VoltageSensor.html#event:voltage">VoltageSensor#event:voltage</a></li><li><a href="WeDo2SmartHub.html#event:button">WeDo2SmartHub#event:button</a></li>
</ul>
</li>
</ul>
<div class="col-sm-3 col-md-3">
<form class="navbar-form" role="search">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
<div class="input-group-btn">
<button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="container" id="toc-content">
<div class="row">
<div class="col-md-8">
<div id="main">
<h1 class="page-title">Classes</h1>
<section>
<header>
<h2>
</h2>
</header>
<article>
<div class="container-overview">
<dl class="details">
</dl>
</div>
<h3 class="subsection-title">Classes</h3>
<dl>
<dt><a href="AbsoluteMotor.html">AbsoluteMotor</a></dt>
<dd></dd>
<dt><a href="BaseHub.html">BaseHub</a></dt>
<dd></dd>
<dt><a href="BasicMotor.html">BasicMotor</a></dt>
<dd></dd>
<dt><a href="BoostMoveHub.html">BoostMoveHub</a></dt>
<dd></dd>
<dt><a href="ColorDistanceSensor.html">ColorDistanceSensor</a></dt>
<dd></dd>
<dt><a href="ControlPlusHub.html">ControlPlusHub</a></dt>
<dd></dd>
<dt><a href="CurrentSensor.html">CurrentSensor</a></dt>
<dd></dd>
<dt><a href="Device.html">Device</a></dt>
<dd></dd>
<dt><a href="DuploTrainBase.html">DuploTrainBase</a></dt>
<dd></dd>
<dt><a href="DuploTrainBaseColorSensor.html">DuploTrainBaseColorSensor</a></dt>
<dd></dd>
<dt><a href="DuploTrainBaseMotor.html">DuploTrainBaseMotor</a></dt>
<dd></dd>
<dt><a href="DuploTrainBaseSpeaker.html">DuploTrainBaseSpeaker</a></dt>
<dd></dd>
<dt><a href="DuploTraniBaseSpeedometer.html">DuploTraniBaseSpeedometer</a></dt>
<dd></dd>
<dt><a href="Hub.html">Hub</a></dt>
<dd></dd>
<dt><a href="HubLED.html">HubLED</a></dt>
<dd></dd>
<dt><a href="Light.html">Light</a></dt>
<dd></dd>
<dt><a href="LPF2Hub.html">LPF2Hub</a></dt>
<dd></dd>
<dt><a href="MediumLinearMotor.html">MediumLinearMotor</a></dt>
<dd></dd>
<dt><a href="MotionSensor.html">MotionSensor</a></dt>
<dd></dd>
<dt><a href="MoveHub.html">MoveHub</a></dt>
<dd></dd>
<dt><a href="MoveHubMediumLinearMotor.html">MoveHubMediumLinearMotor</a></dt>
<dd></dd>
<dt><a href="MoveHubTiltSensor.html">MoveHubTiltSensor</a></dt>
<dd></dd>
<dt><a href="PiezoBuzzer.html">PiezoBuzzer</a></dt>
<dd></dd>
<dt><a href="PUPHub.html">PUPHub</a></dt>
<dd></dd>
<dt><a href="PUPRemote.html">PUPRemote</a></dt>
<dd></dd>
<dt><a href="RemoteControl.html">RemoteControl</a></dt>
<dd></dd>
<dt><a href="RemoteControlButton.html">RemoteControlButton</a></dt>
<dd></dd>
<dt><a href="SimpleMediumLinearMotor.html">SimpleMediumLinearMotor</a></dt>
<dd></dd>
<dt><a href="TachoMotor.html">TachoMotor</a></dt>
<dd></dd>
<dt><a href="TechnicColorSensor.html">TechnicColorSensor</a></dt>
<dd></dd>
<dt><a href="TechnicDistanceSensor.html">TechnicDistanceSensor</a></dt>
<dd></dd>
<dt><a href="TechnicForceSensor.html">TechnicForceSensor</a></dt>
<dd></dd>
<dt><a href="TechnicLargeAngularMotor.html">TechnicLargeAngularMotor</a></dt>
<dd></dd>
<dt><a href="TechnicLargeLinearMotor.html">TechnicLargeLinearMotor</a></dt>
<dd></dd>
<dt><a href="TechnicMediumAngularMotor.html">TechnicMediumAngularMotor</a></dt>
<dd></dd>
<dt><a href="TechnicMediumHub.html">TechnicMediumHub</a></dt>
<dd></dd>
<dt><a href="TechnicMediumHubAccelerometerSensor.html">TechnicMediumHubAccelerometerSensor</a></dt>
<dd></dd>
<dt><a href="TechnicMediumHubGyroSensor.html">TechnicMediumHubGyroSensor</a></dt>
<dd></dd>
<dt><a href="TechnicMediumHubTiltSensor.html">TechnicMediumHubTiltSensor</a></dt>
<dd></dd>
<dt><a href="TechnicXLargeLinearMotor.html">TechnicXLargeLinearMotor</a></dt>
<dd></dd>
<dt><a href="TiltSensor.html">TiltSensor</a></dt>
<dd></dd>
<dt><a href="TrainMotor.html">TrainMotor</a></dt>
<dd></dd>
<dt><a href="VoltageSensor.html">VoltageSensor</a></dt>
<dd></dd>
<dt><a href="WeDo2SmartHub.html">WeDo2SmartHub</a></dt>
<dd></dd>
</dl>
<h3 class="subsection-title">Events</h3>
<dl>
<hr>
<dt>
<h4 class="name" id="event:absolute">absolute</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a the motors absolute position is changed.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>absolute</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_absolutemotor.js.html">devices/absolutemotor.js</a>,
<a href="devices_absolutemotor.js.html#sunlight-1-line-26">line 26</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:rotate">rotate</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a rotation sensor is activated.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>rotation</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="TachoMotor.html#event:rotate">TachoMotor#event:rotate</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
<a href="devices_tachomotor.js.html#sunlight-1-line-27">line 27</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:attach">attach</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a device is attached to the Hub.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>device</code></td>
<td class="type">
<span class="param-type"><a href="Device.html">Device</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="Hub.html#event:attach">Hub#event:attach</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_basehub.js.html">hubs/basehub.js</a>,
<a href="hubs_basehub.js.html#sunlight-1-line-285">line 285</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:button">button</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a button is pressed.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>button</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>state</code></td>
<td class="type">
<span class="param-type">ButtonState</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="LPF2Hub.html#event:button">LPF2Hub#event:button</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_lpf2hub.js.html">hubs/lpf2hub.js</a>,
<a href="hubs_lpf2hub.js.html#sunlight-1-line-170">line 170</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:detach">detach</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a device is detached from the Hub.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>device</code></td>
<td class="type">
<span class="param-type"><a href="Device.html">Device</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="Hub.html#event:detach">Hub#event:detach</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_basehub.js.html">hubs/basehub.js</a>,
<a href="hubs_basehub.js.html#sunlight-1-line-302">line 302</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:disconnect">disconnect</h4>
</dt>
<dd>
<div class="description">
<p>Emits when the hub is disconnected.</p>
</div>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="Hub.html#event:disconnect">Hub#event:disconnect</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_basehub.js.html">hubs/basehub.js</a>,
<a href="hubs_basehub.js.html#sunlight-1-line-65">line 65</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:color">color</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a color sensor is activated.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>color</code></td>
<td class="type">
<span class="param-type">Color</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_colordistancesensor.js.html">devices/colordistancesensor.js</a>,
<a href="devices_colordistancesensor.js.html#sunlight-1-line-26">line 26</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:colorAndDistance">colorAndDistance</h4>
</dt>
<dd>
<div class="description">
<p>A combined color and distance event, emits when the sensor is activated.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>color</code></td>
<td class="type">
<span class="param-type">Color</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>distance</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Distance, in millimeters.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_colordistancesensor.js.html">devices/colordistancesensor.js</a>,
<a href="devices_colordistancesensor.js.html#sunlight-1-line-60">line 60</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:distance">distance</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a distance sensor is activated.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>distance</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Distance, in millimeters.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_colordistancesensor.js.html">devices/colordistancesensor.js</a>,
<a href="devices_colordistancesensor.js.html#sunlight-1-line-41">line 41</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:attach">attach</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a device is attached to the Hub.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>device</code></td>
<td class="type">
<span class="param-type"><a href="Device.html">Device</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="Hub.html#event:attach">Hub#event:attach</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_basehub.js.html">hubs/basehub.js</a>,
<a href="hubs_basehub.js.html#sunlight-1-line-285">line 285</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:button">button</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a button is pressed.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>button</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>state</code></td>
<td class="type">
<span class="param-type">ButtonState</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="LPF2Hub.html#event:button">LPF2Hub#event:button</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_lpf2hub.js.html">hubs/lpf2hub.js</a>,
<a href="hubs_lpf2hub.js.html#sunlight-1-line-170">line 170</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:detach">detach</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a device is detached from the Hub.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>device</code></td>
<td class="type">
<span class="param-type"><a href="Device.html">Device</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="Hub.html#event:detach">Hub#event:detach</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_basehub.js.html">hubs/basehub.js</a>,
<a href="hubs_basehub.js.html#sunlight-1-line-302">line 302</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:disconnect">disconnect</h4>
</dt>
<dd>
<div class="description">
<p>Emits when the hub is disconnected.</p>
</div>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="Hub.html#event:disconnect">Hub#event:disconnect</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_basehub.js.html">hubs/basehub.js</a>,
<a href="hubs_basehub.js.html#sunlight-1-line-65">line 65</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:current">current</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a current change is detected.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>current</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_currentsensor.js.html">devices/currentsensor.js</a>,
<a href="devices_currentsensor.js.html#sunlight-1-line-38">line 38</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:button">button</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a button is pressed.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>button</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>state</code></td>
<td class="type">
<span class="param-type">ButtonState</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="LPF2Hub.html#event:button">LPF2Hub#event:button</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_lpf2hub.js.html">hubs/lpf2hub.js</a>,
<a href="hubs_lpf2hub.js.html#sunlight-1-line-170">line 170</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:color">color</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a color sensor is activated.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>color</code></td>
<td class="type">
<span class="param-type">Color</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_duplotrainbasecolorsensor.js.html">devices/duplotrainbasecolorsensor.js</a>,
<a href="devices_duplotrainbasecolorsensor.js.html#sunlight-1-line-26">line 26</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:reflect">reflect</h4>
</dt>
<dd>
<div class="description">
<p>Emits when the light reflectivity changes.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>reflect</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Percentage, from 0 to 100.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_duplotrainbasecolorsensor.js.html">devices/duplotrainbasecolorsensor.js</a>,
<a href="devices_duplotrainbasecolorsensor.js.html#sunlight-1-line-37">line 37</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:rgb">rgb</h4>
</dt>
<dd>
<div class="description">
<p>Emits when the light reflectivity changes.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>red</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>green</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>blue</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_duplotrainbasecolorsensor.js.html">devices/duplotrainbasecolorsensor.js</a>,
<a href="devices_duplotrainbasecolorsensor.js.html#sunlight-1-line-49">line 49</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:speed">speed</h4>
</dt>
<dd>
<div class="description">
<p>Emits on a speed change.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>speed</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_duplotrainbasespeedometer.js.html">devices/duplotrainbasespeedometer.js</a>,
<a href="devices_duplotrainbasespeedometer.js.html#sunlight-1-line-25">line 25</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:attach">attach</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a device is attached to the Hub.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>device</code></td>
<td class="type">
<span class="param-type"><a href="Device.html">Device</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_basehub.js.html">hubs/basehub.js</a>,
<a href="hubs_basehub.js.html#sunlight-1-line-285">line 285</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:button">button</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a button is pressed.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>button</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>state</code></td>
<td class="type">
<span class="param-type">ButtonState</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="LPF2Hub.html#event:button">LPF2Hub#event:button</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_lpf2hub.js.html">hubs/lpf2hub.js</a>,
<a href="hubs_lpf2hub.js.html#sunlight-1-line-170">line 170</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:detach">detach</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a device is detached from the Hub.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>device</code></td>
<td class="type">
<span class="param-type"><a href="Device.html">Device</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_basehub.js.html">hubs/basehub.js</a>,
<a href="hubs_basehub.js.html#sunlight-1-line-302">line 302</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:disconnect">disconnect</h4>
</dt>
<dd>
<div class="description">
<p>Emits when the hub is disconnected.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_basehub.js.html">hubs/basehub.js</a>,
<a href="hubs_basehub.js.html#sunlight-1-line-65">line 65</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:button">button</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a button is pressed.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>button</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>state</code></td>
<td class="type">
<span class="param-type">ButtonState</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_lpf2hub.js.html">hubs/lpf2hub.js</a>,
<a href="hubs_lpf2hub.js.html#sunlight-1-line-170">line 170</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:rotate">rotate</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a rotation sensor is activated.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>rotation</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="TachoMotor.html#event:rotate">TachoMotor#event:rotate</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
<a href="devices_tachomotor.js.html#sunlight-1-line-27">line 27</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:distance">distance</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a distance sensor is activated.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>distance</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Distance, in millimeters.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_motionsensor.js.html">devices/motionsensor.js</a>,
<a href="devices_motionsensor.js.html#sunlight-1-line-29">line 29</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:button">button</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a button is pressed.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>button</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>state</code></td>
<td class="type">
<span class="param-type">ButtonState</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="LPF2Hub.html#event:button">LPF2Hub#event:button</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_lpf2hub.js.html">hubs/lpf2hub.js</a>,
<a href="hubs_lpf2hub.js.html#sunlight-1-line-170">line 170</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:rotate">rotate</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a rotation sensor is activated.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>rotation</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="TachoMotor.html#event:rotate">TachoMotor#event:rotate</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
<a href="devices_tachomotor.js.html#sunlight-1-line-27">line 27</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:tilt">tilt</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a tilt sensor is activated.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_movehubtiltsensor.js.html">devices/movehubtiltsensor.js</a>,
<a href="devices_movehubtiltsensor.js.html#sunlight-1-line-24">line 24</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:attach">attach</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a device is attached to the Hub.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>device</code></td>
<td class="type">
<span class="param-type"><a href="Device.html">Device</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="Hub.html#event:attach">Hub#event:attach</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_basehub.js.html">hubs/basehub.js</a>,
<a href="hubs_basehub.js.html#sunlight-1-line-285">line 285</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:button">button</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a button is pressed.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>button</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>state</code></td>
<td class="type">
<span class="param-type">ButtonState</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="LPF2Hub.html#event:button">LPF2Hub#event:button</a>
</li>
</ul>
</dd>
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="Hub.html#event:button">Hub#event:button</a>
</li></ul></dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_lpf2hub.js.html">hubs/lpf2hub.js</a>,
<a href="hubs_lpf2hub.js.html#sunlight-1-line-170">line 170</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:detach">detach</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a device is detached from the Hub.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>device</code></td>
<td class="type">
<span class="param-type"><a href="Device.html">Device</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="Hub.html#event:detach">Hub#event:detach</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_basehub.js.html">hubs/basehub.js</a>,
<a href="hubs_basehub.js.html#sunlight-1-line-302">line 302</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:disconnect">disconnect</h4>
</dt>
<dd>
<div class="description">
<p>Emits when the hub is disconnected.</p>
</div>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="Hub.html#event:disconnect">Hub#event:disconnect</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_basehub.js.html">hubs/basehub.js</a>,
<a href="hubs_basehub.js.html#sunlight-1-line-65">line 65</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:attach">attach</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a device is attached to the Hub.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>device</code></td>
<td class="type">
<span class="param-type"><a href="Device.html">Device</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="Hub.html#event:attach">Hub#event:attach</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_basehub.js.html">hubs/basehub.js</a>,
<a href="hubs_basehub.js.html#sunlight-1-line-285">line 285</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:button">button</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a button is pressed.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>button</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>state</code></td>
<td class="type">
<span class="param-type">ButtonState</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="LPF2Hub.html#event:button">LPF2Hub#event:button</a>
</li>
</ul>
</dd>
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="Hub.html#event:button">Hub#event:button</a>
</li></ul></dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_lpf2hub.js.html">hubs/lpf2hub.js</a>,
<a href="hubs_lpf2hub.js.html#sunlight-1-line-170">line 170</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:detach">detach</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a device is detached from the Hub.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>device</code></td>
<td class="type">
<span class="param-type"><a href="Device.html">Device</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="Hub.html#event:detach">Hub#event:detach</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_basehub.js.html">hubs/basehub.js</a>,
<a href="hubs_basehub.js.html#sunlight-1-line-302">line 302</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:disconnect">disconnect</h4>
</dt>
<dd>
<div class="description">
<p>Emits when the hub is disconnected.</p>
</div>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="Hub.html#event:disconnect">Hub#event:disconnect</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_basehub.js.html">hubs/basehub.js</a>,
<a href="hubs_basehub.js.html#sunlight-1-line-65">line 65</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:button">button</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a button is pressed.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>button</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>state</code></td>
<td class="type">
<span class="param-type">ButtonState</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="LPF2Hub.html#event:button">LPF2Hub#event:button</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_lpf2hub.js.html">hubs/lpf2hub.js</a>,
<a href="hubs_lpf2hub.js.html#sunlight-1-line-170">line 170</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:button">button</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a button on the remote is pressed or released.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>event</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_remotecontrolbutton.js.html">devices/remotecontrolbutton.js</a>,
<a href="devices_remotecontrolbutton.js.html#sunlight-1-line-24">line 24</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:rotate">rotate</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a rotation sensor is activated.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>rotation</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
<a href="devices_tachomotor.js.html#sunlight-1-line-27">line 27</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:ambient">ambient</h4>
</dt>
<dd>
<div class="description">
<p>Emits when the ambient light changes.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>ambient</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Percentage, from 0 to 100.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_techniccolorsensor.js.html">devices/techniccolorsensor.js</a>,
<a href="devices_techniccolorsensor.js.html#sunlight-1-line-47">line 47</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:color">color</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a color sensor is activated.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>color</code></td>
<td class="type">
<span class="param-type">Color</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_techniccolorsensor.js.html">devices/techniccolorsensor.js</a>,
<a href="devices_techniccolorsensor.js.html#sunlight-1-line-26">line 26</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:reflect">reflect</h4>
</dt>
<dd>
<div class="description">
<p>Emits when the light reflectivity changes.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>reflect</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Percentage, from 0 to 100.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_techniccolorsensor.js.html">devices/techniccolorsensor.js</a>,
<a href="devices_techniccolorsensor.js.html#sunlight-1-line-37">line 37</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:distance">distance</h4>
</dt>
<dd>
<div class="description">
<p>Emits when the detected distance changes (Slow sampling covers 40mm to 2500mm).</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>distance</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Distance, from 40 to 2500mm</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_technicdistancesensor.js.html">devices/technicdistancesensor.js</a>,
<a href="devices_technicdistancesensor.js.html#sunlight-1-line-25">line 25</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:fastDistance">fastDistance</h4>
</dt>
<dd>
<div class="description">
<p>Emits when the detected distance changes (Fast sampling covers 50mm to 320mm).</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>fastDistance</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Distance, from 50 to 320mm</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_technicdistancesensor.js.html">devices/technicdistancesensor.js</a>,
<a href="devices_technicdistancesensor.js.html#sunlight-1-line-35">line 35</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:force">force</h4>
</dt>
<dd>
<div class="description">
<p>Emits when force is applied.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>force</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Force, in newtons (0-10).</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_technicforcesensor.js.html">devices/technicforcesensor.js</a>,
<a href="devices_technicforcesensor.js.html#sunlight-1-line-25">line 25</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:tapped">tapped</h4>
</dt>
<dd>
<div class="description">
<p>Emits when the sensor is tapped.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>tapped</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>How hard the sensor was tapped, from 0-3.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_technicforcesensor.js.html">devices/technicforcesensor.js</a>,
<a href="devices_technicforcesensor.js.html#sunlight-1-line-45">line 45</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:touch">touch</h4>
</dt>
<dd>
<div class="description">
<p>Emits when the sensor is touched.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>touch</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>Touched on/off (boolean).</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_technicforcesensor.js.html">devices/technicforcesensor.js</a>,
<a href="devices_technicforcesensor.js.html#sunlight-1-line-35">line 35</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:absolute">absolute</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a the motors absolute position is changed.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>absolute</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="AbsoluteMotor.html#event:absolute">AbsoluteMotor#event:absolute</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_absolutemotor.js.html">devices/absolutemotor.js</a>,
<a href="devices_absolutemotor.js.html#sunlight-1-line-26">line 26</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:rotate">rotate</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a rotation sensor is activated.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>rotation</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="TachoMotor.html#event:rotate">TachoMotor#event:rotate</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
<a href="devices_tachomotor.js.html#sunlight-1-line-27">line 27</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:absolute">absolute</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a the motors absolute position is changed.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>absolute</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="AbsoluteMotor.html#event:absolute">AbsoluteMotor#event:absolute</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_absolutemotor.js.html">devices/absolutemotor.js</a>,
<a href="devices_absolutemotor.js.html#sunlight-1-line-26">line 26</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:rotate">rotate</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a rotation sensor is activated.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>rotation</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="TachoMotor.html#event:rotate">TachoMotor#event:rotate</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
<a href="devices_tachomotor.js.html#sunlight-1-line-27">line 27</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:absolute">absolute</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a the motors absolute position is changed.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>absolute</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="AbsoluteMotor.html#event:absolute">AbsoluteMotor#event:absolute</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_absolutemotor.js.html">devices/absolutemotor.js</a>,
<a href="devices_absolutemotor.js.html#sunlight-1-line-26">line 26</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:rotate">rotate</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a rotation sensor is activated.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>rotation</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="TachoMotor.html#event:rotate">TachoMotor#event:rotate</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
<a href="devices_tachomotor.js.html#sunlight-1-line-27">line 27</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:button">button</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a button is pressed.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>button</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>state</code></td>
<td class="type">
<span class="param-type">ButtonState</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="LPF2Hub.html#event:button">LPF2Hub#event:button</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_lpf2hub.js.html">hubs/lpf2hub.js</a>,
<a href="hubs_lpf2hub.js.html#sunlight-1-line-170">line 170</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:accel">accel</h4>
</dt>
<dd>
<div class="description">
<p>Emits when accelerometer detects movement. Measured in mG.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>z</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_technicmediumhubaccelerometersensor.js.html">devices/technicmediumhubaccelerometersensor.js</a>,
<a href="devices_technicmediumhubaccelerometersensor.js.html#sunlight-1-line-24">line 24</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:gyro">gyro</h4>
</dt>
<dd>
<div class="description">
<p>Emits when gyroscope detects movement. Measured in DPS - degrees per second.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>z</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_technicmediumhubgyrosensor.js.html">devices/technicmediumhubgyrosensor.js</a>,
<a href="devices_technicmediumhubgyrosensor.js.html#sunlight-1-line-24">line 24</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:tilt">tilt</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a tilt sensor is activated.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>z</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_technicmediumhubtiltsensor.js.html">devices/technicmediumhubtiltsensor.js</a>,
<a href="devices_technicmediumhubtiltsensor.js.html#sunlight-1-line-24">line 24</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:absolute">absolute</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a the motors absolute position is changed.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>absolute</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="AbsoluteMotor.html#event:absolute">AbsoluteMotor#event:absolute</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_absolutemotor.js.html">devices/absolutemotor.js</a>,
<a href="devices_absolutemotor.js.html#sunlight-1-line-26">line 26</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:rotate">rotate</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a rotation sensor is activated.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>rotation</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="TachoMotor.html#event:rotate">TachoMotor#event:rotate</a>
</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
<a href="devices_tachomotor.js.html#sunlight-1-line-27">line 27</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:tilt">tilt</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a tilt sensor is activated.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_tiltsensor.js.html">devices/tiltsensor.js</a>,
<a href="devices_tiltsensor.js.html#sunlight-1-line-26">line 26</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:voltage">voltage</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a voltage change is detected.</p>
</div>
<h5>Type:
<span class="param-type">object</span>
</h5>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>voltage</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="devices_voltagesensor.js.html">devices/voltagesensor.js</a>,
<a href="devices_voltagesensor.js.html#sunlight-1-line-38">line 38</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="event:button">button</h4>
</dt>
<dd>
<div class="description">
<p>Emits when a button is pressed.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>button</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>state</code></td>
<td class="type">
<span class="param-type">ButtonState</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="hubs_wedo2smarthub.js.html">hubs/wedo2smarthub.js</a>,
<a href="hubs_wedo2smarthub.js.html#sunlight-1-line-169">line 169</a>
</li>
</ul>
</dd>
</dl>
</dd>
</dl>
</article>
</section>
</div>
</div>
<div class="clearfix"></div>
<div class="col-md-3">
<div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
</div>
</div>
</div>
<div class="modal fade" id="searchResults">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">Search results</h4>
</div>
<div class="modal-body"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div>
<footer>
<span class="copyright">
node-poweredup by Nathan Kellenicki licensed under the MIT license.
</span>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sat Apr 4th 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
</footer>
<script src="scripts/docstrap.lib.js"></script>
<script src="scripts/toc.js"></script>
<script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
<script>
$( function () {
$( "[id*='$']" ).each( function () {
var $this = $( this );
$this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
} );
$( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
var $this = $( this );
var example = $this.find( "code" );
exampleText = example.html();
var lang = /{@lang (.*?)}/.exec( exampleText );
if ( lang && lang[1] ) {
exampleText = exampleText.replace( lang[0], "" );
example.html( exampleText );
lang = lang[1];
} else {
var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
lang = langClassMatch ? langClassMatch[1] : "javascript";
}
if ( lang ) {
$this
.addClass( "sunlight-highlight-" + lang )
.addClass( "linenums" )
.html( example.html() );
}
} );
Sunlight.highlightAll( {
lineNumbers : true,
showMenu : true,
enableDoclinks : true
} );
$.catchAnchorLinks( {
navbarOffset: 10
} );
$( "#toc" ).toc( {
anchorName : function ( i, heading, prefix ) {
return $( heading ).attr( "id" ) || ( prefix + i );
},
selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
showAndHide : false,
smoothScrolling: true
} );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
$( '.dropdown-toggle' ).dropdown();
$( "table" ).each( function () {
var $this = $( this );
$this.addClass('table');
} );
} );
</script>
<!--Navigation and Symbol Display-->
<!--Google Analytics-->
<script type="text/javascript">
$(document).ready(function() {
SearcherDisplay.init();
});
</script>
</body>
</html>