# cache_field

cid: field:node:57
data:
  a:3:{s:4:"body";a:1:{s:3:"und";a:1:{i:0;a:5:{s:5:"value";s:3826:"<p>&nbsp;</p><p><img src="http://www.hobbyist.co.nz/sites/default/files/pictures/l298-motor-controller/L298.jpg" border="0" alt="" width="570" height="468" /></p><p><span style="font-size: small; font-family: verdana,geneva;">This article explains how the +5 V and Vcc of this motor controller work.</span></p><p><span style="font-size: small; font-family: verdana,geneva;">All motor contorller circuits have two voltage levels. One is a high voltage (typ. 12 or 24 V) that use as the motor supply voltage, that is, the voltage that drives the motors. The other voltage level is typically a 5 V, which powers the electronics of on the motor controller, including the H-bridge, diodes, and LEDs etc. Depending on the connection of the two jumpers J3 and J5, there are three operating modes of using this motor controller. When working with this motor controller we strongly encourage you to check the voltage lines with a multimeter before connecting it to anything, otherwise a faulty motor controller may damage the devices connecting to it.</span></p><p><span style="font-size: small; font-family: verdana,geneva;"><br /></span></p><p><strong><span style="font-size: small; font-family: verdana,geneva;">Mode 1, jumper J3 and J5 open circuit</span></strong></p><p><span style="font-size: small; font-family: verdana,geneva;">In this mode, Vcc is the motor supply voltage, accepting a voltage range from 5 to 35 V. When the supply voltage is connected, </span><span style="font-size: small; font-family: verdana,geneva;">the LED D1 is off. (if the LED is on, the controller may be faulty). </span><span style="font-size: small; font-family: verdana,geneva;">The terminal +5 V is an input, a +5 V power source is needed to connect to it in order to power the electronics of the controller.</span></p><p><span style="font-size: small; font-family: verdana,geneva;"><br /></span></p><p><strong><span style="font-size: small; font-family: verdana,geneva;">Mode 2, jumper J3 short circuit, J5 open circuit</span></strong></p><p><span style="font-size: small; font-family: verdana,geneva;">In this mode, Vcc is the motor supply voltage, accepting a voltage range from 7 to 35 V. When the supply voltage is connected, </span><span style="font-size: small; font-family: verdana,geneva;"> the LED D1 is on. </span><span style="font-size: small; font-family: verdana,geneva;">The Vcc voltage gets regulated to 5 V to power all the onboard electronics. The terminal +5 V , is an output.meaning that it makes a +5 V power source available for other electronics that need it, e.g. the Arduino microcontroller board.</span></p><p><span style="font-size: small; font-family: verdana,geneva;"><br /></span></p><p><strong><span style="font-size: small; font-family: verdana,geneva;">Mode 3, jumper J3 open circuit, J5 short circuit</span></strong></p><p><span style="font-size: small; font-family: verdana,geneva;">In this mode, Vcc is the motor supply voltage, accepting a voltage range from 7 to 35 V. When the supply voltage is connected, </span><span style="font-size: small; font-family: verdana,geneva;">the LED D1 is on. </span><span style="font-size: small; font-family: verdana,geneva;">The Vcc voltage gets regulated to 5 V to power all the onboard electronics. The terminal +5 V is output, but its voltage is <strong><span style="color: #ff0000;">equal</span></strong> to the Vcc voltage, so it on longer to be +5 V as labeled on the board. This mode is <strong>not</strong> recommended.</span></p><p><span style="font-size: small; font-family: verdana,geneva;"><br /></span></p><p><span style="font-size: small; font-family: verdana,geneva;">To understand how to control the motors, please see <a href="http://www.hobbyist.co.nz/?q=terminator-tutorial">this tutorial</a> where an example code is available.</span></p><p>&nbsp;</p>";s:7:"summary";s:0:"";s:6:"format";s:9:"full_html";s:10:"safe_value";s:3834:"<p> </p>
  <p><img src="http://www.hobbyist.co.nz/sites/default/files/pictures/l298-motor-controller/L298.jpg" border="0" alt="" width="570" height="468" /></p>
  <p><span style="font-size: small; font-family: verdana,geneva;">This article explains how the +5 V and Vcc of this motor controller work.</span></p>
  <p><span style="font-size: small; font-family: verdana,geneva;">All motor contorller circuits have two voltage levels. One is a high voltage (typ. 12 or 24 V) that use as the motor supply voltage, that is, the voltage that drives the motors. The other voltage level is typically a 5 V, which powers the electronics of on the motor controller, including the H-bridge, diodes, and LEDs etc. Depending on the connection of the two jumpers J3 and J5, there are three operating modes of using this motor controller. When working with this motor controller we strongly encourage you to check the voltage lines with a multimeter before connecting it to anything, otherwise a faulty motor controller may damage the devices connecting to it.</span></p>
  <p><span style="font-size: small; font-family: verdana,geneva;"><br /></span></p>
  <p><strong><span style="font-size: small; font-family: verdana,geneva;">Mode 1, jumper J3 and J5 open circuit</span></strong></p>
  <p><span style="font-size: small; font-family: verdana,geneva;">In this mode, Vcc is the motor supply voltage, accepting a voltage range from 5 to 35 V. When the supply voltage is connected, </span><span style="font-size: small; font-family: verdana,geneva;">the LED D1 is off. (if the LED is on, the controller may be faulty). </span><span style="font-size: small; font-family: verdana,geneva;">The terminal +5 V is an input, a +5 V power source is needed to connect to it in order to power the electronics of the controller.</span></p>
  <p><span style="font-size: small; font-family: verdana,geneva;"><br /></span></p>
  <p><strong><span style="font-size: small; font-family: verdana,geneva;">Mode 2, jumper J3 short circuit, J5 open circuit</span></strong></p>
  <p><span style="font-size: small; font-family: verdana,geneva;">In this mode, Vcc is the motor supply voltage, accepting a voltage range from 7 to 35 V. When the supply voltage is connected, </span><span style="font-size: small; font-family: verdana,geneva;"> the LED D1 is on. </span><span style="font-size: small; font-family: verdana,geneva;">The Vcc voltage gets regulated to 5 V to power all the onboard electronics. The terminal +5 V , is an output.meaning that it makes a +5 V power source available for other electronics that need it, e.g. the Arduino microcontroller board.</span></p>
  <p><span style="font-size: small; font-family: verdana,geneva;"><br /></span></p>
  <p><strong><span style="font-size: small; font-family: verdana,geneva;">Mode 3, jumper J3 open circuit, J5 short circuit</span></strong></p>
  <p><span style="font-size: small; font-family: verdana,geneva;">In this mode, Vcc is the motor supply voltage, accepting a voltage range from 7 to 35 V. When the supply voltage is connected, </span><span style="font-size: small; font-family: verdana,geneva;">the LED D1 is on. </span><span style="font-size: small; font-family: verdana,geneva;">The Vcc voltage gets regulated to 5 V to power all the onboard electronics. The terminal +5 V is output, but its voltage is <strong><span style="color: #ff0000;">equal</span></strong> to the Vcc voltage, so it on longer to be +5 V as labeled on the board. This mode is <strong>not</strong> recommended.</span></p>
  <p><span style="font-size: small; font-family: verdana,geneva;"><br /></span></p>
  <p><span style="font-size: small; font-family: verdana,geneva;">To understand how to control the motors, please see <a href="http://www.hobbyist.co.nz/?q=terminator-tutorial">this tutorial</a> where an example code is available.</span></p>
  <p> </p>
  ";s:12:"safe_summary";s:0:"";}}}s:10:"field_tags";a:1:{s:3:"und";a:1:{i:0;a:1:{s:3:"tid";s:2:"34";}}}s:11:"field_image";a:0:{}}


cid: field:node:105
data:
  a:1:{s:4:"body";a:1:{s:3:"und";a:1:{i:0;a:5:{s:5:"value";s:13644:"<p><strong><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">GOAL: Add a background to the Android application and Change Screen Orientation to Landscape + upgrade the Android application to do following:</span></strong></p><ul><li><strong><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Automatically connect to Bluetooth when application is opened.</span></strong></li><li><strong><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Check if Bluetooth is ON, request user to Turn Bluetooth ON if Bluetooth is OFF</span></strong></li><li><strong><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Allow User to Pair to the Bluetooth.</span></strong></li></ul><div><font face="arial, helvetica, sans-serif" size="3"><b><br /></b></font></div><div><font face="arial, helvetica, sans-serif" size="3"><b>Android Bit:</b></font></div><div><em><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Step 1: Change the Application backgorund.</span></em></div><div><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><br /></span></div><div style="padding-left: 30px;"><font face="arial, helvetica, sans-serif" size="3">Save this image to use as background in your application. You can use another image if your prefer.</font></div><div style="padding-left: 30px;"><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div style="padding-left: 30px;"><a href="/sites/default/files/AndroidStarterKit/blue_and_red.jpg" target="_blank"><font face="arial, helvetica, sans-serif" size="3">Background Image to use on Android Application</font></a></div><div style="padding-left: 30px;"><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><a href="/sites/default/files/AndroidStarterKit/ScreenShot064.jpg" target="_blank" style="font-family: arial, helvetica, sans-serif; font-size: medium;"><img src="/sites/default/files/AndroidStarterKit/ScreenShot064.jpg" border="0" alt="Image 64" width="600" height="468" /></a></div><p></p><ol><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Click on Upload Now as show on the screenshot and load the background image.</span></li><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Click Choose File from open window and browse to the file location.</span></li><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Select the image file.</span></li><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Click Open</span></li><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Click OK</span></li></ol><p><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">This will display the Image file in the Media Section.</span></p><p><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><a href="/sites/default/files/AndroidStarterKit/ScreenShot065.jpg" target="_blank"><img src="/sites/default/files/AndroidStarterKit/ScreenShot065.jpg" border="0" alt="image 64" width="600" height="468" /></a></span></p><p><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><a href="/sites/default/files/AndroidStarterKit/ScreenShot065.jpg" target="_blank"></a></span><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Select Screen1 by clicking on it on the component Section. Change the Screen properties:</span></p><ol><li><font face="arial, helvetica, sans-serif" size="3">BackgroundColor = None</font></li><li><font face="arial, helvetica, sans-serif" size="3">BackgroundImage = Select the image from the dropdown list.</font></li><li><font face="arial, helvetica, sans-serif" size="3">Click OK</font></li></ol><p><font face="arial, helvetica, sans-serif" size="3">The Image will appear on the screen as background Image.</font></p><p><font face="arial, helvetica, sans-serif" size="3"><br /></font></p><p><em><font face="arial, helvetica, sans-serif" size="3">Step 2: Upgrade Bluetooth Paring and Automatic Connection.</font></em></p><p><a href="/sites/default/files/AndroidStarterKit/ScreenShot067.jpg" target="_blank"><em><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/ScreenShot067.jpg" border="0" width="600" height="485" /></font></em></a></p><p><font face="arial, helvetica, sans-serif" size="3">Add four invisiable components and change the properties as below.</font></p><p><font face="arial, helvetica, sans-serif" size="3"></font><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">1. TinyDB (Basic -&gt; TinyDB)</span></p><ul><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Rename = db_MACAddress</span></li></ul><div><font face="arial, helvetica, sans-serif" size="3">2. Notifer (Other stuff -&gt; Notifer)</font></div><div><ul><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Rename = Notifer</span></li></ul><div><font face="arial, helvetica, sans-serif" size="3">3. Two ActivityStarter (Other stuff -&gt; ActivityStarter)</font></div><div><ul><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Rename ActivityStarter 1 = as_TurnONBT</span></li><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Rename ActivityStarter 2 = as_PairDevice</span></li></ul><div><font face="arial, helvetica, sans-serif" size="3">4. Change the property for ActivityStarters as below:</font></div><div><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><br /></span></div><div><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">as_TurnONBT</span></div><div><ul><li><font face="arial, helvetica, sans-serif" size="3">Action =&nbsp;android.bluetooth.adapter.action.REQUEST_ENABLE</font></li></ul><div><font face="arial, helvetica, sans-serif" size="3">as_PairDevice</font></div><ul><li><font face="arial, helvetica, sans-serif" size="3">Action =&nbsp;android.intent.action.MAIN</font></li><li><font face="arial, helvetica, sans-serif" size="3">ActivityClass =&nbsp;com.android.settings.Settings$BluetoothSettingsActivity</font></li><li><font face="arial, helvetica, sans-serif" size="3">ActivityPackage =&nbsp;com.android.settings</font></li></ul><div><a href="/sites/default/files/AndroidStarterKit/ScreenShot068_2.jpg" target="_blank"><img src="/sites/default/files/AndroidStarterKit/ScreenShot068_2.jpg" border="0" alt="image 86 updated." width="600" height="468" /></a></div><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><font face="arial, helvetica, sans-serif" size="3">Add a Button Component (Basic -&gt; Button). Use HorizentalArrangements (Screen Arrangement -&gt; HorizontalArrangement) to space it nicely on the screen. Change the Button properties as below:</font></div><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><ul><li><font face="arial, helvetica, sans-serif" size="3">Rename =&nbsp;btnBluetoothPair</font></li><li><font face="arial, helvetica, sans-serif" size="3">BackgroundColor = Yellow</font></li><li><font face="arial, helvetica, sans-serif" size="3">Shape = Rounded</font></li><li><font face="arial, helvetica, sans-serif" size="3">Text = Pair Bluetooth</font></li><li><font face="arial, helvetica, sans-serif" size="3">Width = 305 pixels</font></li><li><font face="arial, helvetica, sans-serif" size="3">Height = 45 pixels</font></li></ul><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><em><font face="arial, helvetica, sans-serif" size="3">Step 2: Change Screen Orientation.</font></em></div><div><a href="/sites/default/files/AndroidStarterKit/ScreenShot074.jpg" target="_blank"><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/ScreenShot074.jpg" border="0" alt="Image74" width="600" height="428" /></font></a></div><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><font face="arial, helvetica, sans-serif" size="3">Change the screen orientation to Landscape to accomodate the layout to tablet screen.&nbsp;</font></div><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><font face="arial, helvetica, sans-serif" size="3">BlockBuilder Code:</font></div><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><a href="/sites/default/files/AndroidStarterKit/ScreenShot069.jpg" target="_blank"><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/ScreenShot069.jpg" border="0" alt="Image 69" width="600" height="478" /></font></a></div><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><font face="arial, helvetica, sans-serif" size="3">Look at the screenshot above. Drag the blocks to code as shown.</font></div><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><font face="arial, helvetica, sans-serif" size="3">1. Create a variable to hold Bluetooth MAC Address.</font></div><div><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><br /></span></div><div><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Drag Screen1.Initialize from the Screen Component. Use a IF Else block to&nbsp;</span></div><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><font face="arial, helvetica, sans-serif" size="3">2. Check if there are any MAC address in the MACAddress database</font></div><div><font face="arial, helvetica, sans-serif" size="3">3. If not then add the MAC Address to the database.</font></div><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><a href="/sites/default/files/AndroidStarterKit/ScreenShot070.jpg" target="_blank"><img src="/sites/default/files/AndroidStarterKit/ScreenShot070.jpg" border="0" alt="Image 70" width="600" height="508" /></a><div><font face="arial, helvetica, sans-serif" size="3">&nbsp;</font></div><div><font face="arial, helvetica, sans-serif" size="3">Add a second If Else block as shown in above. This will check if Bluetooth is ON or OFF. If OFF then a application request is sent to turn bluetooth ON.</font></div><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><a href="/sites/default/files/AndroidStarterKit/ScreenShot071.jpg" target="_blank"><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/ScreenShot071.jpg" border="0" alt="image 27" width="600" height="508" /></font></a></div><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><font face="arial, helvetica, sans-serif" size="3">Add three level nested If Else blocks and other blocks as show in screenshot above. First If Else block checks if Bluetooth is ON, second If Else block check if there is MAC Address and bluetooth is paired, third If Else connects to the bluetooth and chnage the Connect button text to Disconnect.</font></div><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><a href="/sites/default/files/AndroidStarterKit/ScreenShot072.jpg" target="_blank"><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/ScreenShot072.jpg" border="0" alt="Image 72" width="600" height="499" /></font></a></div><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><font face="arial, helvetica, sans-serif" size="3">Insert the next two blocks on teh code as shown above. When the Pair Bluetooth button is clicked, this brings up bluetooth setting screen to pair available bluetooth.&nbsp;</font></div><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><a href="/sites/default/files/AndroidStarterKit/ScreenShot073.jpg" target="_blank"><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/ScreenShot073.jpg" border="0" alt="image 73" width="600" height="499" /></font></a></div><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><font face="arial, helvetica, sans-serif" size="3">This section of code deals with two parts. </font></div><div style="padding-left: 30px;"><ol><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">First update the List BeforePicking Block to also check if the bluietooth is On and paired.&nbsp;</span><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Insert a IF Else block to check if the Bluetooth is ON and Paired. If Not then call &nbsp; the. Bluetooth setting screen and display message to Turn ON bluetooth.</span></li><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Second block code on AfterPicking. This saves the bluetooth MAC address to use connecting on when the application is turn on next time.&nbsp;</span></li></ol><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div></div><div><font face="arial, helvetica, sans-serif" size="3">This completes this tutorial. Upload and run the application to test it. &nbsp;&nbsp;</font></div><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><a href="/sites/default/files/AndroidStarterKit/MyApp_checkpoint1%20%282%29.zip" target="_blank"><font face="arial, helvetica, sans-serif" size="3">MIT APP Inventor - [Source Code]</font></a></div></div></div></div></div>";s:7:"summary";s:0:"";s:6:"format";s:9:"full_html";s:10:"safe_value";s:13693:"<p><strong><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">GOAL: Add a background to the Android application and Change Screen Orientation to Landscape + upgrade the Android application to do following:</span></strong></p>
  <ul><li><strong><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Automatically connect to Bluetooth when application is opened.</span></strong></li>
  <li><strong><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Check if Bluetooth is ON, request user to Turn Bluetooth ON if Bluetooth is OFF</span></strong></li>
  <li><strong><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Allow User to Pair to the Bluetooth.</span></strong></li>
  </ul><div><font face="arial, helvetica, sans-serif" size="3"><b><br /></b></font></div>
  <div><font face="arial, helvetica, sans-serif" size="3"><b>Android Bit:</b></font></div>
  <div><em><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Step 1: Change the Application backgorund.</span></em></div>
  <div><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><br /></span></div>
  <div style="padding-left: 30px;"><font face="arial, helvetica, sans-serif" size="3">Save this image to use as background in your application. You can use another image if your prefer.</font></div>
  <div style="padding-left: 30px;"><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <div style="padding-left: 30px;"><a href="/sites/default/files/AndroidStarterKit/blue_and_red.jpg" target="_blank"><font face="arial, helvetica, sans-serif" size="3">Background Image to use on Android Application</font></a></div>
  <div style="padding-left: 30px;"><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <div><a href="/sites/default/files/AndroidStarterKit/ScreenShot064.jpg" target="_blank" style="font-family: arial, helvetica, sans-serif; font-size: medium;"><img src="/sites/default/files/AndroidStarterKit/ScreenShot064.jpg" border="0" alt="Image 64" width="600" height="468" /></a></div>

  <ol><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Click on Upload Now as show on the screenshot and load the background image.</span></li>
  <li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Click Choose File from open window and browse to the file location.</span></li>
  <li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Select the image file.</span></li>
  <li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Click Open</span></li>
  <li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Click OK</span></li>
  </ol><p><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">This will display the Image file in the Media Section.</span></p>
  <p><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><a href="/sites/default/files/AndroidStarterKit/ScreenShot065.jpg" target="_blank"><img src="/sites/default/files/AndroidStarterKit/ScreenShot065.jpg" border="0" alt="image 64" width="600" height="468" /></a></span></p>
  <p><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><a href="/sites/default/files/AndroidStarterKit/ScreenShot065.jpg" target="_blank"></a></span><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Select Screen1 by clicking on it on the component Section. Change the Screen properties:</span></p>
  <ol><li><font face="arial, helvetica, sans-serif" size="3">BackgroundColor = None</font></li>
  <li><font face="arial, helvetica, sans-serif" size="3">BackgroundImage = Select the image from the dropdown list.</font></li>
  <li><font face="arial, helvetica, sans-serif" size="3">Click OK</font></li>
  </ol><p><font face="arial, helvetica, sans-serif" size="3">The Image will appear on the screen as background Image.</font></p>
  <p><font face="arial, helvetica, sans-serif" size="3"><br /></font></p>
  <p><em><font face="arial, helvetica, sans-serif" size="3">Step 2: Upgrade Bluetooth Paring and Automatic Connection.</font></em></p>
  <p><a href="/sites/default/files/AndroidStarterKit/ScreenShot067.jpg" target="_blank"><em><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/ScreenShot067.jpg" border="0" width="600" height="485" /></font></em></a></p>
  <p><font face="arial, helvetica, sans-serif" size="3">Add four invisiable components and change the properties as below.</font></p>
  <p><font face="arial, helvetica, sans-serif" size="3"></font><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">1. TinyDB (Basic -&gt; TinyDB)</span></p>
  <ul><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Rename = db_MACAddress</span></li>
  </ul><div><font face="arial, helvetica, sans-serif" size="3">2. Notifer (Other stuff -&gt; Notifer)</font></div>
  <div>
  <ul><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Rename = Notifer</span></li>
  </ul><div><font face="arial, helvetica, sans-serif" size="3">3. Two ActivityStarter (Other stuff -&gt; ActivityStarter)</font></div>
  <div>
  <ul><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Rename ActivityStarter 1 = as_TurnONBT</span></li>
  <li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Rename ActivityStarter 2 = as_PairDevice</span></li>
  </ul><div><font face="arial, helvetica, sans-serif" size="3">4. Change the property for ActivityStarters as below:</font></div>
  <div><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><br /></span></div>
  <div><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">as_TurnONBT</span></div>
  <div>
  <ul><li><font face="arial, helvetica, sans-serif" size="3">Action = android.bluetooth.adapter.action.REQUEST_ENABLE</font></li>
  </ul><div><font face="arial, helvetica, sans-serif" size="3">as_PairDevice</font></div>
  <ul><li><font face="arial, helvetica, sans-serif" size="3">Action = android.intent.action.MAIN</font></li>
  <li><font face="arial, helvetica, sans-serif" size="3">ActivityClass = com.android.settings.Settings$BluetoothSettingsActivity</font></li>
  <li><font face="arial, helvetica, sans-serif" size="3">ActivityPackage = com.android.settings</font></li>
  </ul><div><a href="/sites/default/files/AndroidStarterKit/ScreenShot068_2.jpg" target="_blank"><img src="/sites/default/files/AndroidStarterKit/ScreenShot068_2.jpg" border="0" alt="image 86 updated." width="600" height="468" /></a></div>
  <div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <div><font face="arial, helvetica, sans-serif" size="3">Add a Button Component (Basic -&gt; Button). Use HorizentalArrangements (Screen Arrangement -&gt; HorizontalArrangement) to space it nicely on the screen. Change the Button properties as below:</font></div>
  <div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <div>
  <ul><li><font face="arial, helvetica, sans-serif" size="3">Rename = btnBluetoothPair</font></li>
  <li><font face="arial, helvetica, sans-serif" size="3">BackgroundColor = Yellow</font></li>
  <li><font face="arial, helvetica, sans-serif" size="3">Shape = Rounded</font></li>
  <li><font face="arial, helvetica, sans-serif" size="3">Text = Pair Bluetooth</font></li>
  <li><font face="arial, helvetica, sans-serif" size="3">Width = 305 pixels</font></li>
  <li><font face="arial, helvetica, sans-serif" size="3">Height = 45 pixels</font></li>
  </ul><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <div><em><font face="arial, helvetica, sans-serif" size="3">Step 2: Change Screen Orientation.</font></em></div>
  <div><a href="/sites/default/files/AndroidStarterKit/ScreenShot074.jpg" target="_blank"><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/ScreenShot074.jpg" border="0" alt="Image74" width="600" height="428" /></font></a></div>
  <div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <div><font face="arial, helvetica, sans-serif" size="3">Change the screen orientation to Landscape to accomodate the layout to tablet screen. </font></div>
  <div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <div><font face="arial, helvetica, sans-serif" size="3">BlockBuilder Code:</font></div>
  <div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <div><a href="/sites/default/files/AndroidStarterKit/ScreenShot069.jpg" target="_blank"><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/ScreenShot069.jpg" border="0" alt="Image 69" width="600" height="478" /></font></a></div>
  <div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <div><font face="arial, helvetica, sans-serif" size="3">Look at the screenshot above. Drag the blocks to code as shown.</font></div>
  <div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <div><font face="arial, helvetica, sans-serif" size="3">1. Create a variable to hold Bluetooth MAC Address.</font></div>
  <div><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><br /></span></div>
  <div><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Drag Screen1.Initialize from the Screen Component. Use a IF Else block to </span></div>
  <div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <div><font face="arial, helvetica, sans-serif" size="3">2. Check if there are any MAC address in the MACAddress database</font></div>
  <div><font face="arial, helvetica, sans-serif" size="3">3. If not then add the MAC Address to the database.</font></div>
  <div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <p><a href="/sites/default/files/AndroidStarterKit/ScreenShot070.jpg" target="_blank"><img src="/sites/default/files/AndroidStarterKit/ScreenShot070.jpg" border="0" alt="Image 70" width="600" height="508" /></a>
  </p><div><font face="arial, helvetica, sans-serif" size="3"> </font></div>
  <div><font face="arial, helvetica, sans-serif" size="3">Add a second If Else block as shown in above. This will check if Bluetooth is ON or OFF. If OFF then a application request is sent to turn bluetooth ON.</font></div>
  <div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <div><a href="/sites/default/files/AndroidStarterKit/ScreenShot071.jpg" target="_blank"><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/ScreenShot071.jpg" border="0" alt="image 27" width="600" height="508" /></font></a></div>
  <div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <div><font face="arial, helvetica, sans-serif" size="3">Add three level nested If Else blocks and other blocks as show in screenshot above. First If Else block checks if Bluetooth is ON, second If Else block check if there is MAC Address and bluetooth is paired, third If Else connects to the bluetooth and chnage the Connect button text to Disconnect.</font></div>
  <div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <div><a href="/sites/default/files/AndroidStarterKit/ScreenShot072.jpg" target="_blank"><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/ScreenShot072.jpg" border="0" alt="Image 72" width="600" height="499" /></font></a></div>
  <div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <div><font face="arial, helvetica, sans-serif" size="3">Insert the next two blocks on teh code as shown above. When the Pair Bluetooth button is clicked, this brings up bluetooth setting screen to pair available bluetooth. </font></div>
  <div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <div><a href="/sites/default/files/AndroidStarterKit/ScreenShot073.jpg" target="_blank"><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/ScreenShot073.jpg" border="0" alt="image 73" width="600" height="499" /></font></a></div>
  <div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <div><font face="arial, helvetica, sans-serif" size="3">This section of code deals with two parts. </font></div>
  <div style="padding-left: 30px;">
  <ol><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">First update the List BeforePicking Block to also check if the bluietooth is On and paired. </span><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Insert a IF Else block to check if the Bluetooth is ON and Paired. If Not then call   the. Bluetooth setting screen and display message to Turn ON bluetooth.</span></li>
  <li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Second block code on AfterPicking. This saves the bluetooth MAC address to use connecting on when the application is turn on next time. </span></li>
  </ol><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  </div>
  <div><font face="arial, helvetica, sans-serif" size="3">This completes this tutorial. Upload and run the application to test it.   </font></div>
  <div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div>
  <div><a href="/sites/default/files/AndroidStarterKit/MyApp_checkpoint1%20%282%29.zip" target="_blank"><font face="arial, helvetica, sans-serif" size="3">MIT APP Inventor - [Source Code]</font></a></div>
  </div>
  </div>
  </div>
  </div>
  ";s:12:"safe_summary";s:0:"";}}}}


cid: field:node:84
data:
  a:3:{s:4:"body";a:1:{s:3:"und";a:1:{i:0;a:5:{s:5:"value";s:580900:"<h2><span style="font-size: large;">This tutorial details how to use the mini USB servo controller in Windows 7.</span></h2><p></p><p><span style="font-size: medium;">1. Plug the mini USB to the computer, and the two LEDs (ON, LED) should turn on, green and red.</span></p><p><span style="font-size: medium;"><img src="data:image/jpeg;base64,[encoded data, 58036 characters]" border="0" alt="" width="432" height="111" /></span></p><p></p><p><span style="font-size: medium;">2. Once the USB is plugged to a Windows 7 PC, the driver should be automatically installed. Confirm the COM port the servo controller is connected to in device manager. To go to device manager, press the start button, right click on 'computer', and select 'properties'. Then choose 'Device Manager' on the top left corner.</span></p><p><span style="font-size: medium;"><img src="data:image/jpeg;base64,[encoded data, 111688 characters]" border="0" alt="" width="566" height="407" /></span></p><p><br /><span style="font-size: medium;"> 2, it should be noted that the usb doesn't supply any power to the servo, since there are potentially 16 servos, usb has no way of supply sufficient current for that. So an external power source has to connect to the 5v and gnd screw terminals. It doesn't have to be 5v, you can connect whatever voltage you like to supply to the servos, they normally tolerate up to 6v. With the power supply, the 3rd LED will turn on.</span></p><p><span style="font-size: medium;"><img src="data:image/jpeg;base64,[encoded data, 121852 characters]" border="0" alt="" width="513" height="224" /></span></p><p><span style="font-size: medium;">3. plug in servos, brown is GND, and orange is Signal.</span></p><p><span style="font-size: medium;"><img src="data:image/png;base64,[encoded data, 46800 characters]" border="0" alt="" width="348" height="281" /></span></p><p><br /><img src="data:image/jpeg;base64,[encoded data, 93156 characters]" border="0" alt="" width="572" height="330" /></p><p><span style="font-size: medium;">4, send command from pc. Terminal programs like putty is great if you want to send each character separately as you type on the keyboard, but for the servo controller you better use a terminal program that can send a whole string when you press a button. For example, you can use the <a href="http://arduino.googlecode.com/files/arduino-1.0.1-windows.zip">Arduino program</a>, open it and select the correct COM from tools-&gt; Serial port</span></p><p><span style="font-size: medium;"><img src="data:image/png;base64,[encoded data, 104120 characters]" border="0" alt="" width="633" height="563" /></span></p><p><span style="font-size: medium;">5, open on the serial monitor on the top right corner. On the bottom of the serial monitor, the baudrate doesn't matter, but change the 'no line ending' to both 'NL &amp; CR'.</span></p><p><span style="font-size: medium;"><img src="data:image/png;base64,[encoded data, 41996 characters]" border="0" alt="" width="511" height="418" /></span><br /><span style="font-size: medium;"> 6, in the serial monitor, you can type command, for example, type #1P1200T1000 and hit 'send button' will it send a 1200 us duty cycle PWM to channel 1 for 1000 ms. If you like to control 2 servos simultaneously, use the command <br /> <br /> #1P1200T1000#2P1200T1000<br /> <br /> Please note that normally the servo range is from 1000us (+90 degree) to 2000us (-90 degree), with 1500us being the neutral position. <br /> </span></p>";s:7:"summary";s:0:"";s:6:"format";s:9:"full_html";s:10:"safe_value";s:580904:"<h2><span style="font-size: large;">This tutorial details how to use the mini USB servo controller in Windows 7.</span></h2>

  <p><span style="font-size: medium;">1. Plug the mini USB to the computer, and the two LEDs (ON, LED) should turn on, green and red.</span></p>
  <p><span style="font-size: medium;"><img src="data:image/jpeg;base64,[encoded data, 58036 characters]" border="0" alt="" width="432" height="111" /></span></p>

  <p><span style="font-size: medium;">2. Once the USB is plugged to a Windows 7 PC, the driver should be automatically installed. Confirm the COM port the servo controller is connected to in device manager. To go to device manager, press the start button, right click on 'computer', and select 'properties'. Then choose 'Device Manager' on the top left corner.</span></p>
  <p><span style="font-size: medium;"><img src="data:image/jpeg;base64,[encoded data, 111688 characters]" border="0" alt="" width="566" height="407" /></span></p>
  <p><span style="font-size: medium;"> 2, it should be noted that the usb doesn't supply any power to the servo, since there are potentially 16 servos, usb has no way of supply sufficient current for that. So an external power source has to connect to the 5v and gnd screw terminals. It doesn't have to be 5v, you can connect whatever voltage you like to supply to the servos, they normally tolerate up to 6v. With the power supply, the 3rd LED will turn on.</span></p>
  <p><span style="font-size: medium;"><img src="data:image/jpeg;base64,[encoded data, 121852 characters]" border="0" alt="" width="513" height="224" /></span></p>
  <p><span style="font-size: medium;">3. plug in servos, brown is GND, and orange is Signal.</span></p>
  <p><span style="font-size: medium;"><img src="data:image/png;base64,[encoded data, 46800 characters]" border="0" alt="" width="348" height="281" /></span></p>
  <p><img src="data:image/jpeg;base64,[encoded data, 93156 characters]" border="0" alt="" width="572" height="330" /></p>
  <p><span style="font-size: medium;">4, send command from pc. Terminal programs like putty is great if you want to send each character separately as you type on the keyboard, but for the servo controller you better use a terminal program that can send a whole string when you press a button. For example, you can use the <a href="&lt;a href=" http:="">http://arduino.googlecode.com/files/arduino-1.0.1-windows.zip</a>"&gt;Arduino program, open it and select the correct COM from tools-&gt; Serial port</span></p>
  <p><span style="font-size: medium;"><img src="data:image/png;base64,[encoded data, 104120 characters]" border="0" alt="" width="633" height="563" /></span></p>
  <p><span style="font-size: medium;">5, open on the serial monitor on the top right corner. On the bottom of the serial monitor, the baudrate doesn't matter, but change the 'no line ending' to both 'NL &amp; CR'.</span></p>
  <p><span style="font-size: medium;"><img src="data:image/png;base64,[encoded data, 41996 characters]" border="0" alt="" width="511" height="418" /></span><br /><span style="font-size: medium;"> 6, in the serial monitor, you can type command, for example, type #1P1200T1000 and hit 'send button' will it send a 1200 us duty cycle PWM to channel 1 for 1000 ms. If you like to control 2 servos simultaneously, use the command </span></p>
  <p> #1P1200T1000#2P1200T1000</p>
  <p> Please note that normally the servo range is from 1000us (+90 degree) to 2000us (-90 degree), with 1500us being the neutral position. <br /></p>
  ";s:12:"safe_summary";s:0:"";}}}s:10:"field_tags";a:1:{s:3:"und";a:1:{i:0;a:1:{s:3:"tid";s:2:"39";}}}s:11:"field_image";a:1:{s:3:"und";a:1:{i:0;a:11:{s:3:"fid";s:3:"209";s:3:"alt";s:0:"";s:5:"title";s:0:"";s:3:"uid";s:1:"1";s:8:"filename";s:8:"main.jpg";s:3:"uri";s:29:"public://field/image/main.jpg";s:8:"filemime";s:10:"image/jpeg";s:8:"filesize";s:6:"109563";s:6:"status";s:1:"1";s:9:"timestamp";s:10:"1351990707";s:11:"rdf_mapping";a:0:{}}}}}


