Deploy felis/USB_Host_Shield_2.0 to github.com/felis/USB_Host_Shield_2.0.git:gh-pages

This commit is contained in:
Deployment Bot (from Travis CI) 2019-05-28 15:28:07 +00:00
parent 2cc394788d
commit 69dd89b6fe
2 changed files with 131 additions and 128 deletions

View file

@ -278,193 +278,195 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160;<span class="stringliteral">Also check out this excellent Wiki by Frank Zhao about the PS4 controller: &lt;http://eleccelerator.com/wiki/index.php?title=DualShock_4&gt; and this Linux driver: &lt;https://github.com/chrippa/ds4drv&gt;.</span></div> <div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160;<span class="stringliteral">Also check out this excellent Wiki by Frank Zhao about the PS4 controller: &lt;http://eleccelerator.com/wiki/index.php?title=DualShock_4&gt; and this Linux driver: &lt;https://github.com/chrippa/ds4drv&gt;.</span></div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160;<span class="stringliteral">### PS3 Library</span></div> <div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160;<span class="stringliteral">Several guides on how to use the PS4 library has been written by Dr. James E. Barger and are available at the following link: &lt;https://sites.google.com/view/vbatc-engineeringtechnology2/control-system-tutorials/ps4-tutorials&gt;.</span></div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160;<span class="stringliteral">These libraries consist of the [PS3BT](PS3BT.cpp) and [PS3USB](PS3USB.cpp). These libraries allows you to use a Dualshock 3, Navigation or a Motion controller with the USB Host Shield both via Bluetooth and USB.</span></div> <div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160;<span class="stringliteral">### PS3 Library</span></div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160;<span class="stringliteral">In order to use your Playstation controller via Bluetooth you have to set the Bluetooth address of the dongle internally to your PS3 Controller. This can be achieved by first plugging in the Bluetooth dongle and wait a few seconds. Now plug in the controller via USB and wait until the LEDs start to flash. The library has now written the Bluetooth address of the dongle to the PS3 controller.</span></div> <div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160;<span class="stringliteral">These libraries consist of the [PS3BT](PS3BT.cpp) and [PS3USB](PS3USB.cpp). These libraries allows you to use a Dualshock 3, Navigation or a Motion controller with the USB Host Shield both via Bluetooth and USB.</span></div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160;<span class="stringliteral">Finally simply plug in the Bluetooth dongle again and press PS on the PS3 controller. After a few seconds it should be connected to the dongle and ready to use.</span></div> <div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160;<span class="stringliteral">In order to use your Playstation controller via Bluetooth you have to set the Bluetooth address of the dongle internally to your PS3 Controller. This can be achieved by first plugging in the Bluetooth dongle and wait a few seconds. Now plug in the controller via USB and wait until the LEDs start to flash. The library has now written the Bluetooth address of the dongle to the PS3 controller.</span></div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;<span class="stringliteral">__Note:__ You will have to plug in the Bluetooth dongle before connecting the controller, as the library needs to read the address of the dongle. Alternatively you could set it in code like so: [PS3BT.ino#L20](examples/Bluetooth/PS3BT/PS3BT.ino#L20).</span></div> <div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;<span class="stringliteral">Finally simply plug in the Bluetooth dongle again and press PS on the PS3 controller. After a few seconds it should be connected to the dongle and ready to use.</span></div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;<span class="stringliteral">For more information about the PS3 protocol see the official wiki: &lt;https://github.com/felis/USB_Host_Shield_2.0/wiki/PS3-Information&gt;.</span></div> <div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;<span class="stringliteral">__Note:__ You will have to plug in the Bluetooth dongle before connecting the controller, as the library needs to read the address of the dongle. Alternatively you could set it in code like so: [PS3BT.ino#L20](examples/Bluetooth/PS3BT/PS3BT.ino#L20).</span></div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160;<span class="stringliteral">Also take a look at the blog posts:</span></div> <div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160;<span class="stringliteral">For more information about the PS3 protocol see the official wiki: &lt;https://github.com/felis/USB_Host_Shield_2.0/wiki/PS3-Information&gt;.</span></div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160;<span class="stringliteral">* &lt;http://blog.tkjelectronics.dk/2012/01/ps3-controller-bt-library-for-arduino/&gt;</span></div> <div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160;<span class="stringliteral">Also take a look at the blog posts:</span></div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160;<span class="stringliteral">* &lt;http://www.circuitsathome.com/mcu/sony-ps3-controller-support-added-to-usb-host-library&gt;</span></div> <div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160;<span class="stringliteral">* &lt;http://www.circuitsathome.com/mcu/arduino/interfacing-ps3-controllers-via-usb&gt;</span></div> <div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160;<span class="stringliteral">* &lt;http://blog.tkjelectronics.dk/2012/01/ps3-controller-bt-library-for-arduino/&gt;</span></div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160;<span class="stringliteral">* &lt;http://www.circuitsathome.com/mcu/sony-ps3-controller-support-added-to-usb-host-library&gt;</span></div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160;<span class="stringliteral">A special thanks go to the following people:</span></div> <div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160;<span class="stringliteral">* &lt;http://www.circuitsathome.com/mcu/arduino/interfacing-ps3-controllers-via-usb&gt;</span></div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160;<span class="stringliteral">1. _Richard Ibbotson_ who made this excellent guide: &lt;http://www.circuitsathome.com/mcu/ps3-and-wiimote-game-controllers-on-the-arduino-host-shield-part&gt;</span></div> <div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160;<span class="stringliteral">A special thanks go to the following people:</span></div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160;<span class="stringliteral">2. _Tomoyuki Tanaka_ for releasing his code for the Arduino USB Host shield connected to the wiimote: &lt;http://www.circuitsathome.com/mcu/rc-car-controlled-by-wii-remote-on-arduino&gt;</span></div> <div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160;<span class="stringliteral">1. _Richard Ibbotson_ who made this excellent guide: &lt;http://www.circuitsathome.com/mcu/ps3-and-wiimote-game-controllers-on-the-arduino-host-shield-part&gt;</span></div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160;<span class="stringliteral">Also a big thanks all the people behind these sites about the Motion controller:</span></div> <div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160;<span class="stringliteral">2. _Tomoyuki Tanaka_ for releasing his code for the Arduino USB Host shield connected to the wiimote: &lt;http://www.circuitsathome.com/mcu/rc-car-controlled-by-wii-remote-on-arduino&gt;</span></div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160;<span class="stringliteral">* &lt;http://thp.io/2010/psmove/&gt;</span></div> <div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160;<span class="stringliteral">Also a big thanks all the people behind these sites about the Motion controller:</span></div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160;<span class="stringliteral">* &lt;http://www.copenhagengamecollective.org/unimove/&gt;</span></div> <div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160;<span class="stringliteral">* &lt;https://github.com/thp/psmoveapi&gt;</span></div> <div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160;<span class="stringliteral">* &lt;http://thp.io/2010/psmove/&gt;</span></div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160;<span class="stringliteral">* &lt;http://code.google.com/p/moveonpc/&gt;</span></div> <div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160;<span class="stringliteral">* &lt;http://www.copenhagengamecollective.org/unimove/&gt;</span></div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160;<span class="stringliteral">* &lt;https://github.com/thp/psmoveapi&gt;</span></div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160;<span class="stringliteral">### Xbox Libraries</span></div> <div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160;<span class="stringliteral">* &lt;http://code.google.com/p/moveonpc/&gt;</span></div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160;<span class="stringliteral">The library supports both the original Xbox controller via USB and the Xbox 360 controller both via USB and wirelessly.</span></div> <div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160;<span class="stringliteral">### Xbox Libraries</span></div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160;<span class="stringliteral">#### Xbox library</span></div> <div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160;<span class="stringliteral">The library supports both the original Xbox controller via USB and the Xbox 360 controller both via USB and wirelessly.</span></div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160;<span class="stringliteral">The [XBOXOLD](XBOXOLD.cpp) class implements support for the original Xbox controller via USB.</span></div> <div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160;<span class="stringliteral">#### Xbox library</span></div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160;<span class="stringliteral">All the information are from the following sites:</span></div> <div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160;<span class="stringliteral">The [XBOXOLD](XBOXOLD.cpp) class implements support for the original Xbox controller via USB.</span></div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160;<span class="stringliteral">* &lt;https://github.com/torvalds/linux/blob/master/Documentation/input/xpad.txt&gt;</span></div> <div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160;<span class="stringliteral">All the information are from the following sites:</span></div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160;<span class="stringliteral">* &lt;https://github.com/torvalds/linux/blob/master/drivers/input/joystick/xpad.c&gt;</span></div> <div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160;<span class="stringliteral">* &lt;http://euc.jp/periphs/xbox-controller.ja.html&gt;</span></div> <div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160;<span class="stringliteral">* &lt;https://github.com/torvalds/linux/blob/master/Documentation/input/xpad.txt&gt;</span></div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160;<span class="stringliteral">* &lt;https://github.com/Grumbel/xboxdrv/blob/master/PROTOCOL#L15&gt;</span></div> <div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160;<span class="stringliteral">* &lt;https://github.com/torvalds/linux/blob/master/drivers/input/joystick/xpad.c&gt;</span></div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160;<span class="stringliteral">* &lt;http://euc.jp/periphs/xbox-controller.ja.html&gt;</span></div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160;<span class="stringliteral">#### Xbox 360 Library</span></div> <div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160;<span class="stringliteral">* &lt;https://github.com/Grumbel/xboxdrv/blob/master/PROTOCOL#L15&gt;</span></div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160;<span class="stringliteral">The library support one Xbox 360 via USB or up to four Xbox 360 controllers wirelessly by using a [Xbox 360 wireless receiver](http://blog.tkjelectronics.dk/wp-content/uploads/xbox360-wireless-receiver.jpg).</span></div> <div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160;<span class="stringliteral">#### Xbox 360 Library</span></div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160;<span class="stringliteral">To use it via USB use the [XBOXUSB](XBOXUSB.cpp) library or to use it wirelessly use the [XBOXRECV](XBOXRECV.cpp) library.</span></div> <div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160;<span class="stringliteral">The library support one Xbox 360 via USB or up to four Xbox 360 controllers wirelessly by using a [Xbox 360 wireless receiver](http://blog.tkjelectronics.dk/wp-content/uploads/xbox360-wireless-receiver.jpg).</span></div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160;<span class="stringliteral">__Note that a Wireless controller can NOT be used via USB!__</span></div> <div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160;<span class="stringliteral">To use it via USB use the [XBOXUSB](XBOXUSB.cpp) library or to use it wirelessly use the [XBOXRECV](XBOXRECV.cpp) library.</span></div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160;<span class="stringliteral">Examples code can be found in the [examples directory](examples/Xbox).</span></div> <div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160;<span class="stringliteral">__Note that a Wireless controller can NOT be used via USB!__</span></div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160;<span class="stringliteral">Also see the following blog posts:</span></div> <div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160;<span class="stringliteral">Examples code can be found in the [examples directory](examples/Xbox).</span></div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160;<span class="stringliteral">* &lt;http://www.circuitsathome.com/mcu/xbox360-controller-support-added-to-usb-host-shield-2-0-library&gt;</span></div> <div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160;<span class="stringliteral">Also see the following blog posts:</span></div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160;<span class="stringliteral">* &lt;http://blog.tkjelectronics.dk/2012/07/xbox-360-controller-support-added-to-the-usb-host-library/&gt;</span></div> <div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160;<span class="stringliteral">* &lt;http://blog.tkjelectronics.dk/2012/12/xbox-360-receiver-added-to-the-usb-host-library/&gt;</span></div> <div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160;<span class="stringliteral">* &lt;http://www.circuitsathome.com/mcu/xbox360-controller-support-added-to-usb-host-shield-2-0-library&gt;</span></div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160;<span class="stringliteral">* &lt;http://blog.tkjelectronics.dk/2012/07/xbox-360-controller-support-added-to-the-usb-host-library/&gt;</span></div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160;<span class="stringliteral">All the information regarding the Xbox 360 controller protocol are form these sites:</span></div> <div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160;<span class="stringliteral">* &lt;http://blog.tkjelectronics.dk/2012/12/xbox-360-receiver-added-to-the-usb-host-library/&gt;</span></div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160;<span class="stringliteral">* &lt;http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/UsbInfo&gt;</span></div> <div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160;<span class="stringliteral">All the information regarding the Xbox 360 controller protocol are form these sites:</span></div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160;<span class="stringliteral">* &lt;http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/WirelessUsbInfo&gt;</span></div> <div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160;<span class="stringliteral">* &lt;https://github.com/Grumbel/xboxdrv/blob/master/PROTOCOL&gt;</span></div> <div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160;<span class="stringliteral">* &lt;http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/UsbInfo&gt;</span></div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160;<span class="stringliteral">* &lt;http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/WirelessUsbInfo&gt;</span></div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160;<span class="stringliteral">#### Xbox ONE Library</span></div> <div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160;<span class="stringliteral">* &lt;https://github.com/Grumbel/xboxdrv/blob/master/PROTOCOL&gt;</span></div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160;<span class="stringliteral">An Xbox ONE controller is supported via USB in the [XBOXONE](XBOXONE.cpp) class. It is heavily based on the 360 library above. In addition to cross referencing the above, information on the protocol was found at:</span></div> <div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160;<span class="stringliteral">#### Xbox ONE Library</span></div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160;<span class="stringliteral">* &lt;https://github.com/quantus/xbox-one-controller-protocol&gt;</span></div> <div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160;<span class="stringliteral">An Xbox ONE controller is supported via USB in the [XBOXONE](XBOXONE.cpp) class. It is heavily based on the 360 library above. In addition to cross referencing the above, information on the protocol was found at:</span></div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160;<span class="stringliteral">* &lt;https://github.com/torvalds/linux/blob/master/drivers/input/joystick/xpad.c&gt;</span></div> <div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160;<span class="stringliteral">* &lt;https://github.com/kylelemons/xbox/blob/master/xbox.go&gt;</span></div> <div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160;<span class="stringliteral">* &lt;https://github.com/quantus/xbox-one-controller-protocol&gt;</span></div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160;<span class="stringliteral">* &lt;https://github.com/torvalds/linux/blob/master/drivers/input/joystick/xpad.c&gt;</span></div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160;<span class="stringliteral">### [Wii library](Wii.cpp)</span></div> <div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160;<span class="stringliteral">* &lt;https://github.com/kylelemons/xbox/blob/master/xbox.go&gt;</span></div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160;<span class="stringliteral">The [Wii](Wii.cpp) library support the Wiimote, but also the Nunchuch and Motion Plus extensions via Bluetooth. The Wii U Pro Controller and Wii Balance Board are also supported via Bluetooth.</span></div> <div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160;<span class="stringliteral">### [Wii library](Wii.cpp)</span></div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160;<span class="stringliteral">First you have to pair with the controller, this is done automatically by the library if you create the instance like so:</span></div> <div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160;<span class="stringliteral">The [Wii](Wii.cpp) library support the Wiimote, but also the Nunchuch and Motion Plus extensions via Bluetooth. The Wii U Pro Controller and Wii Balance Board are also supported via Bluetooth.</span></div>
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160;<span class="stringliteral">```C++</span></div> <div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160;<span class="stringliteral">First you have to pair with the controller, this is done automatically by the library if you create the instance like so:</span></div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160;<span class="stringliteral">WII Wii(&amp;Btd, PAIR);</span></div> <div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160;<span class="stringliteral">```</span></div> <div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160;<span class="stringliteral">```C++</span></div>
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160;<span class="stringliteral">WII Wii(&amp;Btd, PAIR);</span></div>
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160;<span class="stringliteral">And then press 1 &amp; 2 at once on the Wiimote or the SYNC buttons if you are using a Wii U Pro Controller or a Wii Balance Board.</span></div> <div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160;<span class="stringliteral">```</span></div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160;<span class="stringliteral">After that you can simply create the instance like so:</span></div> <div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160;<span class="stringliteral">And then press 1 &amp; 2 at once on the Wiimote or the SYNC buttons if you are using a Wii U Pro Controller or a Wii Balance Board.</span></div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160;<span class="stringliteral">```C++</span></div> <div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160;<span class="stringliteral">After that you can simply create the instance like so:</span></div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160;<span class="stringliteral">WII Wii(&amp;Btd);</span></div> <div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160;<span class="stringliteral">```</span></div> <div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160;<span class="stringliteral">```C++</span></div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160;<span class="stringliteral">WII Wii(&amp;Btd);</span></div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160;<span class="stringliteral">Then just press any button on the Wiimote and it will then connect to the dongle.</span></div> <div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160;<span class="stringliteral">```</span></div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160;<span class="stringliteral">Take a look at the example for more information: [Wii.ino](examples/Bluetooth/Wii/Wii.ino).</span></div> <div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160;<span class="stringliteral">Then just press any button on the Wiimote and it will then connect to the dongle.</span></div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160;<span class="stringliteral">Also take a look at the blog post:</span></div> <div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160;<span class="stringliteral">Take a look at the example for more information: [Wii.ino](examples/Bluetooth/Wii/Wii.ino).</span></div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160;<span class="stringliteral">* &lt;http://blog.tkjelectronics.dk/2012/08/wiimote-added-to-usb-host-library/&gt;</span></div> <div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160;<span class="stringliteral">Also take a look at the blog post:</span></div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160;<span class="stringliteral">The Wii IR camera can also be used, but you will have to activate the code for it manually as it is quite large. Simply set ```ENABLE_WII_IR_CAMERA``` to 1 in [settings.h](settings.h).</span></div> <div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160;<span class="stringliteral">* &lt;http://blog.tkjelectronics.dk/2012/08/wiimote-added-to-usb-host-library/&gt;</span></div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160;<span class="stringliteral">The [WiiIRCamera.ino](examples/Bluetooth/WiiIRCamera/WiiIRCamera.ino) example shows how it can be used.</span></div> <div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160;<span class="stringliteral">The Wii IR camera can also be used, but you will have to activate the code for it manually as it is quite large. Simply set ```ENABLE_WII_IR_CAMERA``` to 1 in [settings.h](settings.h).</span></div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160;<span class="stringliteral">All the information about the Wii controllers are from these sites:</span></div> <div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160;<span class="stringliteral">The [WiiIRCamera.ino](examples/Bluetooth/WiiIRCamera/WiiIRCamera.ino) example shows how it can be used.</span></div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160;<span class="stringliteral">* &lt;http://wiibrew.org/wiki/Wiimote&gt;</span></div> <div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160;<span class="stringliteral">All the information about the Wii controllers are from these sites:</span></div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160;<span class="stringliteral">* &lt;http://wiibrew.org/wiki/Wiimote/Extension_Controllers&gt;</span></div> <div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160;<span class="stringliteral">* &lt;http://wiibrew.org/wiki/Wiimote/Extension_Controllers/Nunchuck&gt;</span></div> <div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160;<span class="stringliteral">* &lt;http://wiibrew.org/wiki/Wiimote&gt;</span></div>
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160;<span class="stringliteral">* &lt;http://wiibrew.org/wiki/Wiimote/Extension_Controllers/Wii_Motion_Plus&gt;</span></div> <div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160;<span class="stringliteral">* &lt;http://wiibrew.org/wiki/Wiimote/Extension_Controllers&gt;</span></div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160;<span class="stringliteral">* &lt;http://wiibrew.org/wiki/Wii_Balance_Board&gt;</span></div> <div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160;<span class="stringliteral">* &lt;http://wiibrew.org/wiki/Wiimote/Extension_Controllers/Nunchuck&gt;</span></div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160;<span class="stringliteral">* The old library created by _Tomoyuki Tanaka_: &lt;https://github.com/moyuchin/WiiRemote_on_Arduino&gt; also helped a lot.</span></div> <div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160;<span class="stringliteral">* &lt;http://wiibrew.org/wiki/Wiimote/Extension_Controllers/Wii_Motion_Plus&gt;</span></div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160;<span class="stringliteral">* &lt;http://wiibrew.org/wiki/Wii_Balance_Board&gt;</span></div>
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160;<span class="stringliteral">### [PS Buzz Library](PSBuzz.cpp)</span></div> <div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160;<span class="stringliteral">* The old library created by _Tomoyuki Tanaka_: &lt;https://github.com/moyuchin/WiiRemote_on_Arduino&gt; also helped a lot.</span></div>
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160;<span class="stringliteral">This library implements support for the Playstation Buzz controllers via USB.</span></div> <div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160;<span class="stringliteral">### [PS Buzz Library](PSBuzz.cpp)</span></div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160;<span class="stringliteral">It is essentially just a wrapper around the [HIDUniversal](hiduniversal.cpp) which takes care of the initializing and reading of the controllers. The [PSBuzz](PSBuzz.cpp) class simply inherits this and parses the data, so it is easy for users to read the buttons and turn the big red button on the controllers on and off.</span></div> <div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160;<span class="stringliteral">This library implements support for the Playstation Buzz controllers via USB.</span></div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160;<span class="stringliteral">The example [PSBuzz.ino](examples/PSBuzz/PSBuzz.ino) shows how one can do this with just a few lines of code.</span></div> <div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160;<span class="stringliteral">It is essentially just a wrapper around the [HIDUniversal](hiduniversal.cpp) which takes care of the initializing and reading of the controllers. The [PSBuzz](PSBuzz.cpp) class simply inherits this and parses the data, so it is easy for users to read the buttons and turn the big red button on the controllers on and off.</span></div>
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160;<span class="stringliteral">More information about the controller can be found at the following sites:</span></div> <div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160;<span class="stringliteral">The example [PSBuzz.ino](examples/PSBuzz/PSBuzz.ino) shows how one can do this with just a few lines of code.</span></div>
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160;<span class="stringliteral">* http://www.developerfusion.com/article/84338/making-usb-c-friendly/</span></div> <div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160;<span class="stringliteral">More information about the controller can be found at the following sites:</span></div>
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160;<span class="stringliteral">* https://github.com/torvalds/linux/blob/master/drivers/hid/hid-sony.c</span></div> <div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160;<span class="stringliteral">* http://www.developerfusion.com/article/84338/making-usb-c-friendly/</span></div>
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160;<span class="stringliteral">### HID Libraries</span></div> <div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160;<span class="stringliteral">* https://github.com/torvalds/linux/blob/master/drivers/hid/hid-sony.c</span></div>
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160;<span class="stringliteral">HID devices are also supported by the library. However these require you to write your own driver. A few example are provided in the [examples/HID](examples/HID) directory. Including an example for the [SteelSeries SRW-S1 Steering Wheel](examples/HID/SRWS1/SRWS1.ino).</span></div> <div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160;<span class="stringliteral">### HID Libraries</span></div>
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160;<span class="stringliteral">### [MIDI Library](usbh_midi.cpp)</span></div> <div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160;<span class="stringliteral">HID devices are also supported by the library. However these require you to write your own driver. A few example are provided in the [examples/HID](examples/HID) directory. Including an example for the [SteelSeries SRW-S1 Steering Wheel](examples/HID/SRWS1/SRWS1.ino).</span></div>
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160;<span class="stringliteral">The library support MIDI devices.</span></div> <div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160;<span class="stringliteral">### [MIDI Library](usbh_midi.cpp)</span></div>
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160;<span class="stringliteral">You can convert USB MIDI keyboard to legacy serial MIDI.</span></div> <div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160;<span class="stringliteral">The library support MIDI devices.</span></div>
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160;<span class="stringliteral">* [USB_MIDI_converter.ino](examples/USBH_MIDI/USB_MIDI_converter/USB_MIDI_converter.ino)</span></div> <div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160;<span class="stringliteral">You can convert USB MIDI keyboard to legacy serial MIDI.</span></div>
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160;<span class="stringliteral">* [USB_MIDI_converter_multi.ino](examples/USBH_MIDI/USB_MIDI_converter_multi/USB_MIDI_converter_multi.ino)</span></div> <div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160;<span class="stringliteral">* [USB_MIDI_converter.ino](examples/USBH_MIDI/USB_MIDI_converter/USB_MIDI_converter.ino)</span></div>
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160;<span class="stringliteral">For information see the following page: &lt;http://yuuichiakagawa.github.io/USBH_MIDI/&gt;.</span></div> <div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160;<span class="stringliteral">* [USB_MIDI_converter_multi.ino](examples/USBH_MIDI/USB_MIDI_converter_multi/USB_MIDI_converter_multi.ino)</span></div>
<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160;<span class="stringliteral"># Interface modifications</span></div> <div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160;<span class="stringliteral">For information see the following page: &lt;http://yuuichiakagawa.github.io/USBH_MIDI/&gt;.</span></div>
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160;<span class="stringliteral">The shield is using SPI for communicating with the MAX3421E USB host controller. It uses the SCK, MISO and MOSI pins via the ICSP on your board.</span></div> <div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160;<span class="stringliteral"># Interface modifications</span></div>
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00338"></a><span class="lineno"> 338</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160;<span class="stringliteral">Note this means that it uses pin 13, 12, 11 on an Arduino Uno, so these pins can not be used for anything else than SPI communication!</span></div> <div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160;<span class="stringliteral">The shield is using SPI for communicating with the MAX3421E USB host controller. It uses the SCK, MISO and MOSI pins via the ICSP on your board.</span></div>
<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00340"></a><span class="lineno"> 340</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>&#160;<span class="stringliteral">Furthermore it uses one pin as SS and one INT pin. These are by default located on pin 10 and 9 respectively. They can easily be reconfigured in case you need to use them for something else by cutting the jumper on the shield and then solder a wire from the pad to the new pin.</span></div> <div class="line"><a name="l00341"></a><span class="lineno"> 341</span>&#160;<span class="stringliteral">Note this means that it uses pin 13, 12, 11 on an Arduino Uno, so these pins can not be used for anything else than SPI communication!</span></div>
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00342"></a><span class="lineno"> 342</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160;<span class="stringliteral">After that you need modify the following entry in [UsbCore.h](UsbCore.h):</span></div> <div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160;<span class="stringliteral">Furthermore it uses one pin as SS and one INT pin. These are by default located on pin 10 and 9 respectively. They can easily be reconfigured in case you need to use them for something else by cutting the jumper on the shield and then solder a wire from the pad to the new pin.</span></div>
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00344"></a><span class="lineno"> 344</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160;<span class="stringliteral">```C++</span></div> <div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160;<span class="stringliteral">After that you need modify the following entry in [UsbCore.h](UsbCore.h):</span></div>
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>&#160;<span class="stringliteral">typedef MAX3421e&lt;P10, P9&gt; MAX3421E;</span></div> <div class="line"><a name="l00346"></a><span class="lineno"> 346</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00347"></a><span class="lineno"> 347</span>&#160;<span class="stringliteral">```</span></div> <div class="line"><a name="l00347"></a><span class="lineno"> 347</span>&#160;<span class="stringliteral">```C++</span></div>
<div class="line"><a name="l00348"></a><span class="lineno"> 348</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00348"></a><span class="lineno"> 348</span>&#160;<span class="stringliteral">typedef MAX3421e&lt;P10, P9&gt; MAX3421E;</span></div>
<div class="line"><a name="l00349"></a><span class="lineno"> 349</span>&#160;<span class="stringliteral">For instance if you have rerouted SS to pin 7 it should read:</span></div> <div class="line"><a name="l00349"></a><span class="lineno"> 349</span>&#160;<span class="stringliteral">```</span></div>
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00350"></a><span class="lineno"> 350</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>&#160;<span class="stringliteral">```C++</span></div> <div class="line"><a name="l00351"></a><span class="lineno"> 351</span>&#160;<span class="stringliteral">For instance if you have rerouted SS to pin 7 it should read:</span></div>
<div class="line"><a name="l00352"></a><span class="lineno"> 352</span>&#160;<span class="stringliteral">typedef MAX3421e&lt;P7, P9&gt; MAX3421E;</span></div> <div class="line"><a name="l00352"></a><span class="lineno"> 352</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>&#160;<span class="stringliteral">```</span></div> <div class="line"><a name="l00353"></a><span class="lineno"> 353</span>&#160;<span class="stringliteral">```C++</span></div>
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00354"></a><span class="lineno"> 354</span>&#160;<span class="stringliteral">typedef MAX3421e&lt;P7, P9&gt; MAX3421E;</span></div>
<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>&#160;<span class="stringliteral">See the &quot;Interface modifications&quot; section in the [hardware manual](https://www.circuitsathome.com/usb-host-shield-hardware-manual) for more information.</span></div> <div class="line"><a name="l00355"></a><span class="lineno"> 355</span>&#160;<span class="stringliteral">```</span></div>
<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00356"></a><span class="lineno"> 356</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>&#160;<span class="stringliteral"># FAQ</span></div> <div class="line"><a name="l00357"></a><span class="lineno"> 357</span>&#160;<span class="stringliteral">See the &quot;Interface modifications&quot; section in the [hardware manual](https://www.circuitsathome.com/usb-host-shield-hardware-manual) for more information.</span></div>
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00358"></a><span class="lineno"> 358</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>&#160;<span class="stringliteral">&gt; When I plug my device into the USB connector nothing happens?</span></div> <div class="line"><a name="l00359"></a><span class="lineno"> 359</span>&#160;<span class="stringliteral"># FAQ</span></div>
<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00360"></a><span class="lineno"> 360</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>&#160;<span class="stringliteral">* Try to connect a external power supply to the Arduino - this solves the problem in most cases.</span></div> <div class="line"><a name="l00361"></a><span class="lineno"> 361</span>&#160;<span class="stringliteral">&gt; When I plug my device into the USB connector nothing happens?</span></div>
<div class="line"><a name="l00362"></a><span class="lineno"> 362</span>&#160;<span class="stringliteral">* You can also use a powered hub between the device and the USB Host Shield. You should then include the USB hub library: ```#include &lt;usbhub.h&gt;``` and create the instance like so: ```USBHub Hub1(&amp;Usb);```.</span></div> <div class="line"><a name="l00362"></a><span class="lineno"> 362</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00363"></a><span class="lineno"> 363</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00363"></a><span class="lineno"> 363</span>&#160;<span class="stringliteral">* Try to connect a external power supply to the Arduino - this solves the problem in most cases.</span></div>
<div class="line"><a name="l00364"></a><span class="lineno"> 364</span>&#160;<span class="stringliteral">&gt; When I connecting my PS3 controller I get a output like this:</span></div> <div class="line"><a name="l00364"></a><span class="lineno"> 364</span>&#160;<span class="stringliteral">* You can also use a powered hub between the device and the USB Host Shield. You should then include the USB hub library: ```#include &lt;usbhub.h&gt;``` and create the instance like so: ```USBHub Hub1(&amp;Usb);```.</span></div>
<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00365"></a><span class="lineno"> 365</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00366"></a><span class="lineno"> 366</span>&#160;<span class="stringliteral">```</span></div> <div class="line"><a name="l00366"></a><span class="lineno"> 366</span>&#160;<span class="stringliteral">&gt; When I connecting my PS3 controller I get a output like this:</span></div>
<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>&#160;<span class="stringliteral">Dualshock 3 Controller Enabled</span></div> <div class="line"><a name="l00367"></a><span class="lineno"> 367</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00368"></a><span class="lineno"> 368</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00368"></a><span class="lineno"> 368</span>&#160;<span class="stringliteral">```</span></div>
<div class="line"><a name="l00369"></a><span class="lineno"> 369</span>&#160;<span class="stringliteral">LeftHatX: 0 LeftHatY: 0 RightHatX: 0 RightHatY: 0</span></div> <div class="line"><a name="l00369"></a><span class="lineno"> 369</span>&#160;<span class="stringliteral">Dualshock 3 Controller Enabled</span></div>
<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>&#160;<span class="stringliteral">LeftHatX: 0 LeftHatY: 0 RightHatX: 0 RightHatY: 0</span></div> <div class="line"><a name="l00370"></a><span class="lineno"> 370</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00371"></a><span class="lineno"> 371</span>&#160;<span class="stringliteral">LeftHatX: 0 LeftHatY: 0 RightHatX: 0 RightHatY: 0</span></div> <div class="line"><a name="l00371"></a><span class="lineno"> 371</span>&#160;<span class="stringliteral">LeftHatX: 0 LeftHatY: 0 RightHatX: 0 RightHatY: 0</span></div>
<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>&#160;<span class="stringliteral">LeftHatX: 0 LeftHatY: 0 RightHatX: 0 RightHatY: 0</span></div> <div class="line"><a name="l00372"></a><span class="lineno"> 372</span>&#160;<span class="stringliteral">LeftHatX: 0 LeftHatY: 0 RightHatX: 0 RightHatY: 0</span></div>
<div class="line"><a name="l00373"></a><span class="lineno"> 373</span>&#160;<span class="stringliteral">LeftHatX: 0 LeftHatY: 0 RightHatX: 0 RightHatY: 0</span></div> <div class="line"><a name="l00373"></a><span class="lineno"> 373</span>&#160;<span class="stringliteral">LeftHatX: 0 LeftHatY: 0 RightHatX: 0 RightHatY: 0</span></div>
<div class="line"><a name="l00374"></a><span class="lineno"> 374</span>&#160;<span class="stringliteral">```</span></div> <div class="line"><a name="l00374"></a><span class="lineno"> 374</span>&#160;<span class="stringliteral">LeftHatX: 0 LeftHatY: 0 RightHatX: 0 RightHatY: 0</span></div>
<div class="line"><a name="l00375"></a><span class="lineno"> 375</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00375"></a><span class="lineno"> 375</span>&#160;<span class="stringliteral">LeftHatX: 0 LeftHatY: 0 RightHatX: 0 RightHatY: 0</span></div>
<div class="line"><a name="l00376"></a><span class="lineno"> 376</span>&#160;<span class="stringliteral">* This means that your dongle does not support 2.0+EDR, so you will need another dongle. Please see the following [list](https://github.com/felis/USB_Host_Shield_2.0/wiki/Bluetooth-dongles) for tested working dongles.</span></div> <div class="line"><a name="l00376"></a><span class="lineno"> 376</span>&#160;<span class="stringliteral">```</span></div>
<div class="line"><a name="l00377"></a><span class="lineno"> 377</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00377"></a><span class="lineno"> 377</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00378"></a><span class="lineno"> 378</span>&#160;<span class="stringliteral">&gt; When compiling I am getting the following error: &quot;fatal error: SPI.h: No such file or directory&quot;.</span></div> <div class="line"><a name="l00378"></a><span class="lineno"> 378</span>&#160;<span class="stringliteral">* This means that your dongle does not support 2.0+EDR, so you will need another dongle. Please see the following [list](https://github.com/felis/USB_Host_Shield_2.0/wiki/Bluetooth-dongles) for tested working dongles.</span></div>
<div class="line"><a name="l00379"></a><span class="lineno"> 379</span>&#160;<span class="stringliteral"></span></div> <div class="line"><a name="l00379"></a><span class="lineno"> 379</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00380"></a><span class="lineno"> 380</span>&#160;<span class="stringliteral">* Please make sure to include the SPI library like so: ```#include &lt;SPI.h&gt;``` in your .ino file.</span></div> <div class="line"><a name="l00380"></a><span class="lineno"> 380</span>&#160;<span class="stringliteral">&gt; When compiling I am getting the following error: &quot;fatal error: SPI.h: No such file or directory&quot;.</span></div>
<div class="line"><a name="l00381"></a><span class="lineno"> 381</span>&#160;<span class="stringliteral"></span></div>
<div class="line"><a name="l00382"></a><span class="lineno"> 382</span>&#160;<span class="stringliteral">* Please make sure to include the SPI library like so: ```#include &lt;SPI.h&gt;``` in your .ino file.</span></div>
<div class="ttc" id="class_m_a_x3421e_html"><div class="ttname"><a href="class_m_a_x3421e.html">MAX3421e</a></div><div class="ttdef"><b>Definition:</b> <a href="usbhost_8h_source.html#l00132">usbhost.h:132</a></div></div> <div class="ttc" id="class_m_a_x3421e_html"><div class="ttname"><a href="class_m_a_x3421e.html">MAX3421e</a></div><div class="ttdef"><b>Definition:</b> <a href="usbhost_8h_source.html#l00132">usbhost.h:132</a></div></div>
<div class="ttc" id="class_u_s_b_html"><div class="ttname"><a href="class_u_s_b.html">USB</a></div><div class="ttdef"><b>Definition:</b> <a href="_usb_core_8h_source.html#l00210">UsbCore.h:210</a></div></div> <div class="ttc" id="class_u_s_b_html"><div class="ttname"><a href="class_u_s_b.html">USB</a></div><div class="ttdef"><b>Definition:</b> <a href="_usb_core_8h_source.html#l00210">UsbCore.h:210</a></div></div>
</div><!-- fragment --></div><!-- contents --> </div><!-- fragment --></div><!-- contents -->

View file

@ -250,6 +250,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<p>It should then automatically pair the dongle with your controller. This only have to be done once.</p> <p>It should then automatically pair the dongle with your controller. This only have to be done once.</p>
<p>For information see the following blog post: <a href="http://blog.tkjelectronics.dk/2014/01/ps4-controller-now-supported-by-the-usb-host-library/">http://blog.tkjelectronics.dk/2014/01/ps4-controller-now-supported-by-the-usb-host-library/</a>.</p> <p>For information see the following blog post: <a href="http://blog.tkjelectronics.dk/2014/01/ps4-controller-now-supported-by-the-usb-host-library/">http://blog.tkjelectronics.dk/2014/01/ps4-controller-now-supported-by-the-usb-host-library/</a>.</p>
<p>Also check out this excellent Wiki by Frank Zhao about the PS4 controller: <a href="http://eleccelerator.com/wiki/index.php?title=DualShock_4">http://eleccelerator.com/wiki/index.php?title=DualShock_4</a> and this Linux driver: <a href="https://github.com/chrippa/ds4drv">https://github.com/chrippa/ds4drv</a>.</p> <p>Also check out this excellent Wiki by Frank Zhao about the PS4 controller: <a href="http://eleccelerator.com/wiki/index.php?title=DualShock_4">http://eleccelerator.com/wiki/index.php?title=DualShock_4</a> and this Linux driver: <a href="https://github.com/chrippa/ds4drv">https://github.com/chrippa/ds4drv</a>.</p>
<p>Several guides on how to use the PS4 library has been written by Dr. James E. Barger and are available at the following link: <a href="https://sites.google.com/view/vbatc-engineeringtechnology2/control-system-tutorials/ps4-tutorials">https://sites.google.com/view/vbatc-engineeringtechnology2/control-system-tutorials/ps4-tutorials</a>.</p>
<h3>PS3 Library</h3> <h3>PS3 Library</h3>
<p>These libraries consist of the <a href="PS3BT.cpp">PS3BT</a> and <a href="PS3USB.cpp">PS3USB</a>. These libraries allows you to use a Dualshock 3, Navigation or a Motion controller with the <a class="el" href="class_u_s_b.html">USB</a> Host Shield both via Bluetooth and <a class="el" href="class_u_s_b.html">USB</a>.</p> <p>These libraries consist of the <a href="PS3BT.cpp">PS3BT</a> and <a href="PS3USB.cpp">PS3USB</a>. These libraries allows you to use a Dualshock 3, Navigation or a Motion controller with the <a class="el" href="class_u_s_b.html">USB</a> Host Shield both via Bluetooth and <a class="el" href="class_u_s_b.html">USB</a>.</p>
<p>In order to use your Playstation controller via Bluetooth you have to set the Bluetooth address of the dongle internally to your PS3 Controller. This can be achieved by first plugging in the Bluetooth dongle and wait a few seconds. Now plug in the controller via <a class="el" href="class_u_s_b.html">USB</a> and wait until the LEDs start to flash. The library has now written the Bluetooth address of the dongle to the PS3 controller.</p> <p>In order to use your Playstation controller via Bluetooth you have to set the Bluetooth address of the dongle internally to your PS3 Controller. This can be achieved by first plugging in the Bluetooth dongle and wait a few seconds. Now plug in the controller via <a class="el" href="class_u_s_b.html">USB</a> and wait until the LEDs start to flash. The library has now written the Bluetooth address of the dongle to the PS3 controller.</p>