<divclass="textblock"><p>This <aclass="el"href="class_bluetooth_service.html">BluetoothService</a> class implements support for all the official PS3 Controllers: Dualshock 3, Navigation or a Motion controller via Bluetooth.</p>
<p>Information about the protocol can be found at the wiki: <ahref="https://github.com/felis/USB_Host_Shield_2.0/wiki/PS3-Information">https://github.com/felis/USB_Host_Shield_2.0/wiki/PS3-Information</a>. </p>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8h_source.html#l00066">66</a> of file <aclass="el"href="_p_s3_b_t_8h_source.html">PS3BT.h</a>.</p>
</div><h2class="groupheader">Constructor & Destructor Documentation</h2>
<p>Constructor for the <aclass="el"href="class_p_s3_b_t.html">PS3BT</a> class. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">pBtd</td><td>Pointer to <aclass="el"href="class_b_t_d.html">BTD</a> class instance. </td></tr>
<tr><tdclass="paramname">btadr5,btadr4,btadr3,btadr2,btadr1,btadr0</td><td>Pass your dongles Bluetooth address into the constructor, This will set <aclass="el"href="class_b_t_d.html#a1f8e9171a310e50f2c4a3c19066efe5a">BTD::my_bdaddr</a>, so you don't have to plug in the dongle before pairing with your controller. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00035">35</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00247">247</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00240">240</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>The value in SI units. </dd></dl>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00130">130</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Used to get the analog value from button presses. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">a</td><td>The <aclass="el"href="controller_enums_8h.html#a03bfec859eac87be20f8952c1eb89de0">Button</a> to read. The supported buttons are: <aclass="el"href="controller_enums_8h.html#a03bfec859eac87be20f8952c1eb89de0aba595d8bca8bc5e67c37c0a9d89becfa">UP</a>, <aclass="el"href="controller_enums_8h.html#a03bfec859eac87be20f8952c1eb89de0aec8379af7490bb9eaaf579cf17876f38">RIGHT</a>, <aclass="el"href="controller_enums_8h.html#a03bfec859eac87be20f8952c1eb89de0a9b0b4a95b99523966e0e34ffdadac9da">DOWN</a>, <aclass="el"href="controller_enums_8h.html#a03bfec859eac87be20f8952c1eb89de0adb45120aafd37a973140edee24708065">LEFT</a>, <aclass="el"href="controller_enums_8h.html#a03bfec859eac87be20f8952c1eb89de0ae5bc7ee7d6dda5340a28f91834f10543">L1</a>, <aclass="el"href="controller_enums_8h.html#a03bfec859eac87be20f8952c1eb89de0a0adffb24dae0c41be5b803f4d444f066">L2</a>, <aclass="el"href="controller_enums_8h.html#a03bfec859eac87be20f8952c1eb89de0af8d87ff07efe24755164f550526f4dac">R1</a>, <aclass="el"href="controller_enums_8h.html#a03bfec859eac87be20f8952c1eb89de0a629d7b403cea5f826352f3aefb9a6d6a">R2</a>, <aclass="el"href="controller_enums_8h.html#a03bfec859eac87be20f8952c1eb89de0a2fd33892864d1c342d3bead2f2d9ad56">TRIANGLE</a>, <aclass="el"href="controller_enums_8h.html#a03bfec859eac87be20f8952c1eb89de0aa79c827759ea48f0735386c4b1188911">CIRCLE</a>, <aclass="el"href="controller_enums_8h.html#a03bfec859eac87be20f8952c1eb89de0ad699bdf1731bd839b56c299536ba1d9d">CROSS</a>, <aclass="el"href="controller_enums_8h.html#a03bfec859eac87be20f8952c1eb89de0a4233fbf0cafb86abcee94b38d769fc59">SQUARE</a>, and <aclass="el"href="controller_enums_8h.html#a03bfec859eac87be20f8952c1eb89de0a21f40778b7db9343a6ca75ec2c41ccce">T</a>. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>Analog value in the range of 0-255. </dd></dl>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00072">72</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<tr><tdclass="paramname">a</td><td><aclass="el"href="controller_enums_8h.html#aaaabdefc068fd57ec2bef2b62ea4ba92a383cb8895dd296b7f69ce845ed16b0ca">LeftHatX</a>, <aclass="el"href="controller_enums_8h.html#aaaabdefc068fd57ec2bef2b62ea4ba92af3f3925efa9762c4e9e71ac7da7a94a3">LeftHatY</a>, <aclass="el"href="controller_enums_8h.html#aaaabdefc068fd57ec2bef2b62ea4ba92aaeb027a0ae5bbc6ba25e1c78a6486c7b">RightHatX</a>, and <aclass="el"href="controller_enums_8h.html#aaaabdefc068fd57ec2bef2b62ea4ba92a7f1fb2db5381286691f4dec179ed5d5a">RightHatY</a>. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>Return the analog value in the range of 0-255. </dd></dl>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00077">77</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Use this to get <aclass="el"href="_p_s3_enums_8h.html#a0200d2d1b3a7930d0be6c50e7c8ae7d1ae3a34b760fa4a6854f28852e91d8bb47">Pitch</a> and <aclass="el"href="_p_s3_enums_8h.html#a0200d2d1b3a7930d0be6c50e7c8ae7d1a9d80e5f030503ccac779c6491826a173">Roll</a> calculated using the accelerometer. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">a</td><td>Either <aclass="el"href="_p_s3_enums_8h.html#a0200d2d1b3a7930d0be6c50e7c8ae7d1ae3a34b760fa4a6854f28852e91d8bb47">Pitch</a> or <aclass="el"href="_p_s3_enums_8h.html#a0200d2d1b3a7930d0be6c50e7c8ae7d1a9d80e5f030503ccac779c6491826a173">Roll</a>. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>Return the angle in the range of 0-360. </dd></dl>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00100">100</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p><aclass="el"href="class_p_s3_b_t.html#a9b8726849cf6fbaf4e98a9652cb53b61">getButtonPress(Button b)</a> will return true as long as the button is held down While <aclass="el"href="class_p_s3_b_t.html#a92c617e1d00860dc560af7cfe20938d9">getButtonClick(Button b)</a> will only return it once So you instance if you need to increase a variable once you would use <aclass="el"href="class_p_s3_b_t.html#a92c617e1d00860dc560af7cfe20938d9">getButtonClick(Button b)</a>, but if you need to drive a robot forward you would use <aclass="el"href="class_p_s3_b_t.html#a9b8726849cf6fbaf4e98a9652cb53b61">getButtonPress(Button b)</a>. </p>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00066">66</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p><aclass="el"href="class_p_s3_b_t.html#a9b8726849cf6fbaf4e98a9652cb53b61">getButtonPress(Button b)</a> will return true as long as the button is held down While <aclass="el"href="class_p_s3_b_t.html#a92c617e1d00860dc560af7cfe20938d9">getButtonClick(Button b)</a> will only return it once So you instance if you need to increase a variable once you would use <aclass="el"href="class_p_s3_b_t.html#a92c617e1d00860dc560af7cfe20938d9">getButtonClick(Button b)</a>, but if you need to drive a robot forward you would use <aclass="el"href="class_p_s3_b_t.html#a9b8726849cf6fbaf4e98a9652cb53b61">getButtonPress(Button b)</a>. </p>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00063">63</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Used to read the sensors inside the Dualshock 3 and Move controller. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">a</td><td>The Dualshock 3 has a 3-axis accelerometer and a 1-axis gyro inside. The Move controller has a 3-axis accelerometer, a 3-axis gyro, a 3-axis magnetometer and a temperature sensor inside. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>Return the raw sensor value. </dd></dl>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00082">82</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Get the <aclass="el"href="_p_s3_enums_8h.html#a67a0db04d321a74b7e7fcfd3f1a3f70b">Status</a> from the controller. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">c</td><td>The <aclass="el"href="_p_s3_enums_8h.html#a67a0db04d321a74b7e7fcfd3f1a3f70b">Status</a> you want to read. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>True if correct and false if not. </dd></dl>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00171">171</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Read all the available <aclass="el"href="_p_s3_enums_8h.html#a67a0db04d321a74b7e7fcfd3f1a3f70b">Status</a> from the controller. </p>
<dlclass="section return"><dt>Returns</dt><dd>One large string with all the information. </dd></dl>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00178">178</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Read the temperature from the Move controller. </p>
<dlclass="section return"><dt>Returns</dt><dd>The temperature in degrees celsius. </dd></dl>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00158">158</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00637">637</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00645">645</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Set the rumble value inside the Move controller. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">rumble</td><td>The desired value in the range from 64-255. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00648">648</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00227">227</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00506">506</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Used to set all LEDs and <aclass="el"href="_p_s3_enums_8h.html#aff4be38428d075a117a5bb7f6209a231">Rumble</a> off. </p>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00571">571</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Turn the specific <aclass="el"href="controller_enums_8h.html#aadcb6002d2b42fdfe01490f730ab00a6">LED</a> off. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">a</td><td>The <aclass="el"href="controller_enums_8h.html#aadcb6002d2b42fdfe01490f730ab00a6">LED</a> to turn off. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00606">606</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Turn the specific <aclass="el"href="controller_enums_8h.html#aadcb6002d2b42fdfe01490f730ab00a6">LED</a> on. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">a</td><td>The <aclass="el"href="controller_enums_8h.html#aadcb6002d2b42fdfe01490f730ab00a6">LED</a> to turn on. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00610">610</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Toggle the specific <aclass="el"href="controller_enums_8h.html#aadcb6002d2b42fdfe01490f730ab00a6">LED</a>. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">a</td><td>The <aclass="el"href="controller_enums_8h.html#aadcb6002d2b42fdfe01490f730ab00a6">LED</a> to toggle. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00614">614</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Turn off <aclass="el"href="_p_s3_enums_8h.html#aff4be38428d075a117a5bb7f6209a231">Rumble</a>. </p>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00577">577</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>
<p>Turn on <aclass="el"href="_p_s3_enums_8h.html#aff4be38428d075a117a5bb7f6209a231">Rumble</a>. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">mode</td><td>Either <aclass="el"href="_p_s3_enums_8h.html#aff4be38428d075a117a5bb7f6209a231a5819f165165589a8e65b07bf46c7382b">RumbleHigh</a> or <aclass="el"href="_p_s3_enums_8h.html#aff4be38428d075a117a5bb7f6209a231a080b52389e532b79b9e48f43ae6086ac">RumbleLow</a>. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <aclass="el"href="_p_s3_b_t_8cpp_source.html#l00585">585</a> of file <aclass="el"href="_p_s3_b_t_8cpp_source.html">PS3BT.cpp</a>.</p>