# field_data_body

entity_type: node
bundle: page
language: und
body_format: full_html
body_value:
  <p><strong><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Android tablet app controls a Relay via Bluetooth&nbsp;</span></strong></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">In this step you will be controlling a relay with a Android App that you will be developing using the MIT App Inventor This step has two parts, part one will be controlling a relay and part two will be sending data to OLED from Android App. Complete this step before moving to step 3.</span></p><p></p><p><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><strong><em>What you need.</em></strong></span></p><ol><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><a href="http://www.hobbyist.co.nz/?q=arduino-uno" target="_blank">Arduino Board</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Pc (Windows or Mac)</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Internet Access</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Google account</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><a href="%20http://www.hobbyist.co.nz/?q=dht-11" target="_blank">DHT Sensor</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<a href="http://www.hobbyist.co.nz/?q=dht-11"></a></span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><a href="http://www.hobbyist.co.nz/?q=4-channel-relay-module" target="_blank">1 Channel Relay</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.hobbyist.co.nz/?q=4-channel-relay-module"></a></span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Android OS running Device (Phone or tablet)</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><a href="http://www.hobbyist.co.nz/?q=bluetooth-module-device" target="_blank">Bluetooth Module</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">OLED display</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Connector cables&nbsp;</span></li></ol><p></p><p><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><strong>Arduino Bit:</strong>&nbsp;</span></p><p class="MsoSubtitle"><span class="MsoSubtleEmphasis" style="font-size: medium; font-family: arial, helvetica, sans-serif;"><strong>Step 2 – Part 1 Controlling a Relay</strong><o:p></o:p></span></p><p class="MsoNoSpacing"><span class="MsoSubtleEmphasis" style="font-size: medium; font-family: arial, helvetica, sans-serif;">Wiring the Hardware for step 2</span></p><ul><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium; text-indent: -18pt;">Do the component wiring as show in the wiring diagram below.</span></li><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium; text-indent: -18pt;">Note: when uploading the code to Arduino. Unplug 5V from the Bluetooth to disable it. Since USB and Bluetooth uses same TX/RX it will throw an error when loading code while Bluetooth is on.</span></li></ul><div style="text-indent: -24px; padding-left: 30px;"><a href="/sites/default/files/Wiring%20Sketch%201_bbb.jpg" target="_blank"><img src="/sites/default/files/Wiring%20Sketch%201_bbb.jpg" border="0" alt="Hardware Layout 1" width="600" height="507" /></a></div><div style="text-indent: -24px;"></div><p class="MsoSubtitle"><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><em>&nbsp;Pin Mapping</em></span></p><table style="border: 2px solid #696969;" border="2"><tbody><tr><td><strong><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Arduino &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></strong></td><td><strong><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Bluetooth &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></strong></td></tr><tr><td><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">1(TX)</span></td><td><span style="font-size: medium;">RX</span></td></tr><tr><td><span style="font-size: medium;">0(RX)</span></td><td><span style="font-size: medium;">TX</span></td></tr><tr><td><span style="font-size: medium;">GRD</span></td><td><span style="font-size: medium;">GRD</span></td></tr><tr><td><span style="font-size: medium;">5V</span></td><td><span style="font-size: medium;">5V (VCC)</span></td></tr><tr><td></td><td><br /><span style="font-family: arial, helvetica, sans-serif;"><strong><span style="font-size: medium;">1 Channel Relay</span></strong></span></td></tr><tr><td><span style="font-size: medium;">5V</span></td><td><span style="font-size: medium;">VCC</span></td></tr><tr><td><span style="font-size: medium;">GRD</span></td><td><span style="font-size: medium;">GRD</span></td></tr><tr><td><span style="font-size: medium;">7</span></td><td><span style="font-size: medium;">IN</span></td></tr></tbody></table><p><br /><br /></p><p><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><strong>Arduino Code for step 2</strong></span></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">&nbsp;<a href="/sites/default/files/AndroidStarterKit/Arduino2Android_Part1_1.ino" target="_blank">[Code Here]</a></span></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><br /></span></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><strong>Android Bit:</strong><br /></span></p><ol><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><em><strong>Turn on Relay</strong></em></span></li></ol><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Log onto App Inventor using your credentials and create a new app and name it as you wish. In the example below its named&nbsp; MyApp. You will chnage this to RelayControl.</span></li></ul><div style="padding-left: 30px;"><a href="/sites/default/files/AndroidStarterKit/image002.png" target="_blank"><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><font size="2"><img src="/sites/default/files/AndroidStarterKit/image002.png" border="0" alt="image2" width="600" height="441" /></font></span></a></div><div><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><font size="2"><br /></font></span></div><div><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Change the property for the screen</span></li><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">AlignHorizontal = centre</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Title = Relay Control (you can choose anything you like)</span></li></ul><li><em><font face="arial, helvetica, sans-serif" size="3">Note: You can change the ScreenOrientation to Landscape now if you want or later in Part 4 of this kit tutorial.&nbsp;</font></em></li></ul><div style="padding-left: 30px;"><font size="2"><a href="/sites/default/files/AndroidStarterKit/image003.png" target="_blank"><img src="/sites/default/files/AndroidStarterKit/image003.png" border="0" alt="Image3" width="600" height="437" /></a></font></div><div style="padding-left: 30px;"><font size="2"><a href="/sites/default/files/AndroidStarterKit/image003.png" target="_blank"></a></font><strong><em><font face="arial, helvetica, sans-serif" size="3">Adding Relay Buttons</font></em></strong></div><div style="padding-left: 30px;"><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Here is the list of component that is needed to turn a relay on and off.&nbsp; Drag them to your app Screen. Arrange them show below.</span></li></ul><ul><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Two Buttons&nbsp; (one for ON and another for OFF)</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">BluetoothClient(for connection Android to Arduino)</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Two HorizonatalArrangement&nbsp; (Use this to create space and layout)</span></li></ul></ul></div><div style="padding-left: 30px;"><a href="/sites/default/files/AndroidStarterKit/image004.png" target="_blank"><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/image004.png" border="0" alt="Image4" width="600" height="437" /></font></a></div><div style="padding-left: 30px;"><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Select the HorizontalArrangement Component from component list on screen and change its Height property to 5 pixels.&nbsp;</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Click OK.</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Do the same to second&nbsp; HorizontalArrangement.</span></li></ul></div><div style="padding-left: 30px;"><a href="/sites/default/files/AndroidStarterKit/image005.png" target="_blank"><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/image005.png" border="0" alt="Image5" width="600" height="437" /></font></a></div><div style="padding-left: 30px;"><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Select Button 1 and rename it to btnRelayON and change the following properties:</span></li><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Background Color = Green</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Shape = rounded</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Text = Relay ON</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Width = 60 pixel</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Height = 55 pixel&nbsp;</span></li></ul></ul><div><a href="/sites/default/files/AndroidStarterKit/image006.png" target="_blank"><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/image006.png" border="0" alt="Image6" width="600" height="437" /></font></a></div><div><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"></span></span><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Select Button 2 and rename it to btnRelayOFF and change the following properties:</span><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Background Color = Orange</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Shape = rounded</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Text = Relay OFF</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Width = 60 pixel</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Height = 55 pixel&nbsp;</span></li></ul></li></ul></div><div><a href="/sites/default/files/AndroidStarterKit/image007.png" target="_blank"><img src="/sites/default/files/AndroidStarterKit/image007.png" border="0" alt="Image7" width="600" height="437" /></a></div><div></div><div><em><strong><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Adding Bluetooth Buttons</span></strong></em></div><div><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">These are the component we need to select the paired Bluetooth and then initiate the connection.&nbsp; Drag this to your screen as shown.</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">&nbsp;First Drag the HorizontalArrangement on very top. Drag the ListPicker inside the HorizonatalArrangement . Also drag the Button inside the&nbsp; HorizonatalArrangement to the right .</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">&nbsp;Drag the second HorizonatalArrangement in-between the ListPicket and Button and change its Width and Height properties to 5 pixel.</span></li><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Two HorizonalArrangement</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">One Button</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">One ListPicker - <em>(from Basic -&gt; List Picker)</em></span></li></ul></ul><div><a href="/sites/default/files/AndroidStarterKit/image008.png" target="_blank"><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/image008.png" border="0" alt="Image8" width="600" height="437" /></font></a></div><div><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Change the properties of the ListPicker and Button as below:</span></li></ul><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">ListPicker</span></p><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Rename = lstpkBluetooth</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Background Color = Cyan</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Shape = Rounded</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Text = Select Bluetooth</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Width = 150 pixel</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Height = 50 pixel</span></li></ul><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Button&nbsp;</span></p><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Rename = btnConnect</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Background Color = Light Gray</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Shape = Rounded</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Text = Connect</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Width = 150 pixel</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Height = 50 pixel</span></li></ul><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Optiaonal</span></p><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Add an extra HorizentalArrangement on top as show with 5 x 5 pixel to add some space on top of screen.&nbsp;</span></li></ul></div><div><img src="/sites/default/files/AndroidStarterKit/image009.png" border="0" alt="Image9" width="600" height="471" /></div><div><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Open the Block Editor and drag the blocks from the components and connect them as shown below.&nbsp;</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">These Blocks list all the paired Bluetooth on the android device and allow us to select the one that you would connect to this application.</span></li></ul><div><a href="/sites/default/files/AndroidStarterKit/image010.png" target="_blank"><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/image010.png" border="0" alt="Image10" width="600" height="498" /></font></a></div><div><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">To build the code that will connect the Bluetooth (that was selected from the above block of code) will create a block code that will check if the text on the connect button says “Connect”&nbsp;</span><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">it will connect to the selected Bluetooth and set the text on the connect button to “Disconnect” and if it says Disconnect then it will disconnect the connected Bluetooth and set the connect button to “Connect” again.</span></li></ul><p><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Drag a btnConnect.click block and connect one if else and one if block from the control menu. Right click on code Area to get control menu. As shown below.</span></p><p><em><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Set of blocks are accessed by right clicking on the code area. These include blocks for Defination, Text, &nbsp;List, Maths, Logic, Control and Color. To get more understanding of these block, have a look at the referance document link:</span></em></p><p><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><br /></span></p><p><a href="http://appinventor.mit.edu/explore/content/reference-documentation.html" target="_blank"><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Knowing more about Blocks and how to use them</span></a></p><p><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">&nbsp;</span></p><p><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><img src="/sites/default/files/AndroidStarterKit/image011.png" border="0" width="602" height="500" /></span></p><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Drag the blocks from the components show below. Change the text on the text block to Connect. The equals block is from Number menu and text block is from Text menu.</span></li></ul><p><a href="/sites/default/files/AndroidStarterKit/image012.png" target="_blank"><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><img src="/sites/default/files/AndroidStarterKit/image012.png" border="0" alt="Image12" width="600" height="498" /></span></a></p><p></p><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Drag the others block and connect as shown below to complete this piece of code. Change the text on the text blocks as shown.</span></li></ul><p><a href="/sites/default/files/AndroidStarterKit/image013.png" target="_blank"><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><img src="/sites/default/files/AndroidStarterKit/image013.png" border="0" alt="Image13" width="600" height="498" /></span></a></p><p></p><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Next code will send text (~1 for ON and ~0 for OFF) to the Arduino when the Relay ON and Relay OFF button is clicked on the app.</span><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">When the Relay ON or Relay OFF is clicked, the code will check if there is a Bluetooth connect. If connection is there it will send text (~1 or ~0) to Arduino.</span><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">~1 and ~0 are set as special text to trigger relay ON and OFF. \n is added to indicate end of line.</span></li></ul><p></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Drag the blocks and connect as shown below.&nbsp;</span></p><p><a href="/sites/default/files/AndroidStarterKit/image014.png" target="_blank"><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><img src="/sites/default/files/AndroidStarterKit/image014.png" border="0" alt="Image14" width="600" height="538" /></span></a></p><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">This completes first part of code. Your code should look like as shown below.&nbsp;</span></li></ul><div><a href="/sites/default/files/AndroidStarterKit/image015.png" target="_blank"><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/image015.png" border="0" alt="Image15" width="600" height="538" /></font></a></div><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><ul><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Time to test the App. Turn on the Arduino, make sure the the Bluetooth is connected and ON.</span></li><ul><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Pair your android with the Bluetooth</span></li><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Start the App on the android and click the Select Bluetooth button. Select the paired Bluetooth from the list. There might be couple of them on the list depending on the number of paired Bluetooth on your android.</span></li><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Click Connect button</span></li><li><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Click on the Relay ON button. This should turn relay ON. Clicking the Relay OFF button will turn it OFF</span><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">.</span></li></ul></ul><div><font face="arial, helvetica, sans-serif" size="3"><br /></font></div><div><span style="font-size: medium;"><strong><font face="arial, helvetica, sans-serif" size="3">Arduino Bit:</font></strong></span></div><div><p><em><strong><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">2.&nbsp; &nbsp; &nbsp;Send Message to OLED Display</span></strong></em></p><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">This is the continuous from above. This part will send data from android to OLED display connected to Arduino. Complete the above steps before continuing below.</span><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">&nbsp;</span></li></ul><h3><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Hardware set for this part.</span></h3><p><a href="/sites/default/files/Wiring%20Sketch%202_bbb.jpg" target="_blank"><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><img src="/sites/default/files/Wiring%20Sketch%202_bbb.jpg" border="0" alt="Image16" width="600" height="414" /></span></a></p><p></p><h3><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Pin Layout</span><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></h3><p></p><table border="1" cellpadding="0" cellspacing="0"><tbody><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><b>Arduino</b></span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><b>Bluetooth</b></span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">1 (TX)</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">RX</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">0 (RX)</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">TX</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">GRD</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">GRD</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">5 V</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">VCC</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">&nbsp;</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><b>1 Channel Relay</b></span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">5 V</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">VCC</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">GRD</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">GRD</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">7</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">IN</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">&nbsp;</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><b>OLED Display</b></span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">5V</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">VCC</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">GRD</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">GRD</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">4</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">SDA</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">5</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">SCL</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">&nbsp;</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">&nbsp;</span></p></td></tr></tbody></table><p><strong><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Arduino Code: </span></strong></p><p><a href="/sites/default/files/AndroidStarterKit/Arduino2Android_Part2_1.ino"><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">[Code Here]</span></a></p><p><a href="/sites/default/files/AndroidStarterKit/ztoleddisplay%20.zip" target="_blank"><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">[OLED Library]</span></a></p><p></p><div id="yui_3_7_2_1_1373934274853_3107" style="color: #454545; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; white-space: normal;"><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><b id="yui_3_7_2_1_1373934274853_3628">- download into Arduino IDE-&gt;libraries folder</b></span></div><div id="yui_3_7_2_1_1373934274853_3106" style="color: #454545; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; white-space: normal;"><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><b id="yui_3_7_2_1_1373934274853_3105">- Restart IDE after doing above to access the libraries</b></span></div><p><font face="arial, helvetica, sans-serif" size="3">OLED library needs tyo be installed before you start using it.&nbsp;</font></p><p><a href="http://arduino.cc/en/Guide/Libraries" target="_blank"><font face="arial, helvetica, sans-serif" size="3">How to Install a arduino library</font></a></p><p></p><p><strong><font face="arial, helvetica, sans-serif" size="3">Android Bit:</font></strong></p><h4><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">3. &nbsp; &nbsp; &nbsp;Send Data to OLED Display</span></h4><p></p><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">In this part data will be sent from android to Arduino and show on oled display connected to Arduino.</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">To archive this add a textbox field and button as shown below and also rearrange existed buttons.</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Add four Horizontalarrangement, a Textbox and a Button</span></li></ul><p></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">HorizontalArrangement</span></p><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Drag a HorizontalArrangement and rearrange the Relay ON and Off inside the HorizontalArrangement</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Drag the second in-between the two Relay button and change the size to 5x5 pixel.</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Drag two above and below Textbox to create space. Change Height to 5 pixel.</span></li></ul><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Textbox</span></p><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Rename = txtMessage</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Width = 300 pixel</span></li></ul><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Button</span></p><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Rename = btnSenttoOLED</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Text = Sent to OLED</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Shape = rounded</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Height = 30 pixel</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Width = 150 pixel</span></li></ul><div></div><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Set the component as shown below:</span></p><p><a href="/sites/default/files/AndroidStarterKit/image017.png" target="_blank"><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><img src="/sites/default/files/AndroidStarterKit/image017.png" border="0" alt="Image17" width="600" height="471" /></span></a></p><p></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Open Block editor and drag the blocks and connect it as shown below. This block of code sends the text on the app textbox as string to Arduino and display on OLED</span></p><p></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">When Bluetooth is connected and the clears the textbox for next data.</span></p><p><a href="/sites/default/files/AndroidStarterKit/image018.png" target="_blank"><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><img src="/sites/default/files/AndroidStarterKit/image018.png" border="0" alt="Image18" width="600" height="486" /></span></a></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">This completes part 2 of the tutorial. Load the arduino code and test your app by sending any message to OLED.</span></p><p><a href="http://www.hobbyist.co.nz/?q=android-arduino-complete" target="_blank"><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Part 3 - Read DHT Sensor</span></a></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><a href="http://www.hobbyist.co.nz/?q=android-in-app-pairing-bluetooth" target="_blank" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;"><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Part 4 - Adding Blutooth Pair Option and Application Changes</span></a></span></p></div></div></div></div></div></div></div>


entity_type: node
bundle: page
language: und
body_format: full_html
body_value:
  <div><strong><span style="font-size: large;">View sensor reading taken on Arduino on the Android App</span></strong></div><h4><span style="font-family: arial, helvetica, sans-serif;"><strong><span style="font-size: medium;"><br /></span></strong></span></h4><div><span style="text-decoration: underline; font-size: large;"><strong>Things to do on Arduino :</strong></span></div><h4><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Read DHT Sensor</span></h4><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">This is final part. In this part the Arduino will send/ read the DHT sensor and display it on the app.</span></p><p style="padding-left: 30px;"><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">&nbsp;</span><strong><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Hardware setup for this part (continued from previous part)</span></strong></p><p style="padding-left: 30px;"><strong><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><a href="/sites/default/files/Wiring%20Sketch%203_bbb.jpg" target="_blank"><img src="/sites/default/files/Wiring%20Sketch%203_bbb.jpg" border="0" alt="Image 19" width="600" height="414" /></a></span></strong></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Pin Layout&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span></p><table style="border-color: #000000; border-width: 3px; border-style: solid; width: 389px; height: 405px;" border="3" cellpadding="0" cellspacing="0"><tbody><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><b>Arduino</b></span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><b>Bluetooth</b></span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">1 (TX)</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">RX</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">0 (RX)</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">TX</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">GRD</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">GRD</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">5 V</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">VCC</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">&nbsp;</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><b>1 Channel Relay</b></span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">5 V</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">VCC</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">GRD</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">GRD</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">7</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">IN</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">&nbsp;</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><b>OLED Display</b></span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">5V</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">VCC</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">GRD</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">GRD</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">4</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">SDA</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">5</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">SCL</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">&nbsp;</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><b>DHT Sensor</b></span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">5V</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">VCC</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">GRD</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">GRD</span></p></td></tr><tr><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">A0</span></p></td><td valign="top" width="308"><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">DATA</span></p></td></tr></tbody></table><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><strong><br /></strong></span></p><pre><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><strong>Arduino Code</strong></span></pre><pre><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><strong></strong> <a href="/sites/default/files/AndroidStarterKit/Arduino2AndroidV3_1.ino" target="_blank">[Code Here]</a></span></pre><pre><a href="/sites/default/files/AndroidStarterKit/DHT.zip" style="font-family: arial, helvetica, sans-serif; font-size: medium;">[DHT Library - DHT]</a></pre><div id="yui_3_7_2_1_1373934274853_3107" style="color: #454545; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; white-space: normal;"><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><b id="yui_3_7_2_1_1373934274853_3628">- download into Arduino IDE-&gt;libraries folder</b></span></div><div id="yui_3_7_2_1_1373934274853_3106" style="color: #454545; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; white-space: normal;"><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><b id="yui_3_7_2_1_1373934274853_3105">- Restart IDE after doing above to access the libraries</b></span></div><pre><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">DHT Library needs to be installed before you strat using it.</span></pre><pre><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><a href="http://arduino.cc/en/Guide/Libraries" target="_blank">How To Install a Arduino Library</a></span></pre><pre></pre><pre></pre><pre><span style="text-decoration: underline; font-size: large; font-family: arial,helvetica,sans-serif;"><strong>Things to do on Android:</strong></span></pre><pre><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Arduino App</span></pre><ul><li><pre><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Add the components as below:</span></pre></li><li><pre><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">1 HorizentalArranagment</span></pre></li><li><pre><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">1 Textbox</span></pre></li><li><pre><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Clock (this is a invisible component)</span></pre></li></ul><pre></pre><pre><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">HorizentalArrangment properties</span></pre><ul><li><pre><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Height = 10 pixel</span><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">&nbsp;</span></pre></li></ul><pre><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">TextBox Properties</span></pre><ul><li><pre><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Height = 100 pixel</span></pre></li><li><pre><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Width = 300 pixel</span></pre></li><li><pre><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">MiultiLine = true</span></pre></li><li><pre><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">TextAligment = Centre</span></pre></li><li><pre><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Enabled = False</span></pre></li><li><pre><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Rename = txtSensorData</span></pre></li></ul><pre><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">&nbsp;Clock</span></pre><ul><li><pre><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">TimerInterval = 50</span></pre></li></ul><pre>&nbsp;</pre><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Drag the components and connect them as shown below. Se the required properties.</span></p><p><a href="/sites/default/files/AndroidStarterKit/image020.png" target="_blank"><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><img src="/sites/default/files/AndroidStarterKit/image020.png" border="0" alt="Image 20" width="600" height="364" /></span></a></p><p></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Open the Block Editor and Drag and connect Blocks are shown below:</span></p><p></p><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Create two variables; buffer and incomingData and set text on both to blank</span></li></ul><p><a href="/sites/default/files/AndroidStarterKit/image021.png" target="_blank"><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/image021.png" border="0" alt="Image 21" width="600" height="429" /></font></a></p><p></p><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Drag and connect the blocks as show below to create a Timer code. The code checks if there is a bluetooth connection. If connection is there its starts reading the sensor data into buffer variable till it read *.</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">It then transfers the data&nbsp; from buffer to incomingdata variable. The incomingData is display on the app textbox as text and Incoming variable is emptied to receive new Data.</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">If the connection is not there it display “Connect Bluetooth to Re4ad Sensor” on the app textbox. &nbsp;</span></li></ul><p><a href="/sites/default/files/AndroidStarterKit/image022.png" target="_blank"><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/AndroidStarterKit/image022.png" border="0" alt="Image 22" width="600" height="429" /></font></a></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">This almost completes the tutorial for the Kit. Install the arduino code and test your App.</span></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Android App - <a href="/sites/default/files/AndroidStarterKit/MyApp.apk">[MyApp Install File]</a></span></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><a href="/sites/default/files/AndroidStarterKit/MyApp.apk"></a>MIT App Inventor - <a href="/sites/default/files/AndroidStarterKit/MyApp.zip">[Source Code]</a> &nbsp;</span></p><p><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><br /></span></p><p><a href="http://www.hobbyist.co.nz/?q=android-in-app-pairing-bluetooth" target="_blank"><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">Part 4 - Adding Blutooth Pair Option and Application Changes</span></a></p><p><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><br /></span></p>


entity_type: node
bundle: article
language: und
body_format: full_html
body_value:
  <p><span style="font-size: medium; font-family: verdana,geneva;">For advance users who wish to customize their Bluetooth module configurations, this tutorial shows you how this can be done.</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">&nbsp;</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">You will need to connect the bluetooth module directly to your PC through serial interface. Since these days hardly any PC has serial interface, a USB-to-RS232 converter like the one below may be used.</span></p><p class="rtecenter"><span style="font-size: medium; font-family: verdana,geneva;"><a href="http://www.hobbyist.co.nz/?q=ftdi-usb-to-serial"><img src="sites/default/files/usb232.jpg" border="0" alt="" /></a></span></p><p><span style="font-size: medium; font-family: verdana,geneva;">Connect this module to the Bluetooth module according to the table below</span></p><table border="0"><tbody><tr><td><span style="font-size: medium; font-family: verdana,geneva;">Bluetooth module</span></td><td><span style="font-size: medium; font-family: verdana,geneva;">USB to Serial Module</span></td></tr><tr><td><span style="font-size: medium; font-family: verdana,geneva;">Vcc</span></td><td><span style="font-size: medium; font-family: verdana,geneva;">Vcc</span></td></tr><tr><td><span style="font-size: medium; font-family: verdana,geneva;">GND</span></td><td><span style="font-size: medium; font-family: verdana,geneva;">GND</span></td></tr><tr><td><span style="font-size: medium; font-family: verdana,geneva;">TXD</span></td><td><span style="font-size: medium; font-family: verdana,geneva;">RXD</span></td></tr><tr><td><span style="font-size: medium; font-family: verdana,geneva;">RXD</span></td><td><span style="font-size: medium; font-family: verdana,geneva;">TXD</span></td></tr></tbody></table><p></p><p><span style="font-size: medium; font-family: verdana,geneva;">While configuring the bluetooth module, it shouldn't be connected wirelessly with any other bluetooth devices, so switch off the bluetooth of your PC and/or smart phones.</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">The default settings of the Bluetooth is:</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">Baudrate: 9600</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">Name: linvor</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">Pairing code: 1234</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">Any changes to the above configurations will be saved even when power is off.</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">All the commands sent to the Buetooth must not contain a 'newline' character at the end, puTTY doesn't do well in this regards. Hence we recommend using the 'Serial Monitor' in the Arduino IDE to configure the Bluetooth module. The procedures are as follows:</span><br /> <br /><span style="font-size: medium; font-family: verdana,geneva;"> 1, connect the Bluetooth to the pc, the LED should be flashing</span><br /><span style="font-size: medium; font-family: verdana,geneva;"> 2, If you have an Arduino board connecting to the pc via USB, please unplug it.</span><br /><span style="font-size: medium; font-family: verdana,geneva;"> 3, Launch the Arduino IDE (the program where you write Arduion code and download to the Arduino)</span><br /><span style="font-size: medium; font-family: verdana,geneva;"> 4, select the correct COM port that the Bluetooth is connected to.</span></p><p><span style="font-size: medium; font-family: verdana,geneva;"><img src="/sites/default/files/pictures/ConfirmCOMport.jpg" border="0" alt="" /></span></p><p><br /><span style="font-size: medium; font-family: verdana,geneva;"> 5, Open the 'Serial Monitor'</span></p><p><span style="font-size: medium; font-family: verdana,geneva;"><img src="/sites/default/files/pictures/SerialMonitor.jpg" border="0" alt="" /></span></p><p><span style="font-size: medium; font-family: verdana,geneva;">&nbsp;</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">Once the Serial Monitor pops up, make sure the 'no line ending' is selected. To test the communication between the Bluetooth and the PC, send the command AT (case sensitive), and hit the 'Send' button, the Bluetooth should reply 'OK'</span></p><p><span style="font-size: medium; font-family: verdana,geneva;"><img src="/sites/default/files/pictures/AT-OK.jpg" border="0" alt="" /></span></p><p><span style="font-size: medium; font-family: verdana,geneva;">If you can get the Bluetooth to reply, you are ready to configure the Bluetooth module to your preference!</span></p><h2><span style="font-size: medium; font-family: verdana,geneva;">&nbsp;</span></h2><h2><span style="font-size: medium; font-family: verdana,geneva;"><strong>Change the Baudrate</strong></span></h2><p><span style="font-size: medium; font-family: verdana,geneva;">The example below shows how to set the baudrate to 4800 bps</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">Send the command (case sensitive!)</span></p><p><span style="font-family: verdana,geneva; font-size: medium;">AT+BAUD3</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">the Bluetooth will reply:</span></p><p><span style="font-family: verdana,geneva; font-size: medium;">OK4800</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">As shown in the figure below</span></p><p><span style="font-size: medium; font-family: verdana,geneva;"><img src="/sites/default/files/pictures/AT-BAUD.jpg" border="0" alt="" /></span></p><p><span style="font-size: medium; font-family: verdana,geneva;">Now, since the Baudrate of the Bluetooth has been changed, you need to change the Baudrate of the terminal program to 4800 in order to talk to the Bluetooth again.</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">The index&nbsp; after the command AT+BAUD corresponds to the following Baudrate:</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">1----1200bps<br /> 2----2400bps<br /> 3----4800bps<br /> 4----9600bps<br /> 5----19200bps<br /> 6----38400bps<br /> 7----57600bps<br /> 8----115200bps<br /> 9----230400bps<br /> A----460800bps<br /> B----921600bps<br /> C----1382400bps</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">The change of Baudrate takes effect immediately after the command is sent. So if you want to keep configuring the Bluetooth module, you need to set the Baudrate of your terminal program to the new Baudrate the Bluetooth is using. To test it, send AT again, you should receive 'OK'.</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">NOTE: some MAX 232 chips cannot work reliably for Baudrates faster than 115200bps, therefore, we don't recommend to set the Bluetooth to a Baudrate that is faster than 115200bps.</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">&nbsp;</span></p><h2><span style="font-size: medium; font-family: verdana,geneva;"><strong>Change name</strong></span></h2><p><span style="font-size: medium; font-family: verdana,geneva;">This example show you how to change the name of the Bluetooth module to hobbyist:</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">In the terminal program, send the command (case sensitive):</span></p><p><span style="font-family: verdana,geneva; font-size: medium;">AT+NAMEhobbyist</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">The Bluetooth should reply:</span></p><p><span style="font-family: verdana,geneva; font-size: medium;">OKsetname</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">as shown in the figure below</span></p><p><span style="font-size: medium; font-family: verdana,geneva;"><img src="/sites/default/files/pictures/AT-NAME.jpg" border="0" alt="" /></span></p><p><span style="font-size: medium; font-family: verdana,geneva;">The Bluetooth needs to be reboot (power off then on) for the name to be changed</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">Please note that the length of the name cannot exceed 20 characters!</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">&nbsp;</span></p><h2><span style="font-size: medium; font-family: verdana,geneva;">Change pairing code</span></h2><p><span style="font-size: medium; font-family: verdana,geneva;">The following example shows how to change the pairing code to 5566</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">In the terminal program, send the command (case sensitive):</span></p><p><span style="font-family: verdana,geneva; font-size: medium;">AT+PIN5566</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">The Bluetooth should reply:</span></p><p><span style="font-family: verdana,geneva; font-size: medium;">OKsetPIN</span></p><p><span style="font-size: medium; font-family: verdana,geneva;">as shown in the figure below</span></p><p><span style="font-size: medium; font-family: verdana,geneva;"><img src="/sites/default/files/pictures/AT-PIN.jpg" border="0" alt="" /></span></p><p><span style="font-family: verdana,geneva; font-size: medium;">The change of pairing code takes effect immediately. </span></p><p><span style="font-size: medium; font-family: verdana,geneva;">&nbsp;</span></p>


entity_type: node
bundle: product
language: und
body_format: full_html
body_value:
  <p><span style="font-family: verdana, geneva; font-size: medium;">This COMBO Includes</span><br /> <br /><span style="font-family: verdana, geneva; font-size: medium;"> - Arduino UNO</span><br /> <br /><span style="font-family: verdana, geneva; font-size: medium;"> - Protoshield plugin module &nbsp;</span><br /><span style="font-family: verdana, geneva; font-size: medium;"> &nbsp;&nbsp; - A must have! Makes it easy to wire up any circuit</span><br /><span style="font-family: verdana, geneva; font-size: medium;"> &nbsp;&nbsp;&nbsp;&nbsp; to the Arduino.</span><br /> <br /><span style="font-family: verdana, geneva; font-size: medium;"> -&nbsp; Breadboard which fits right in the protoshield.</span><br /><span style="font-family: verdana, geneva; font-size: medium;"> &nbsp;&nbsp;&nbsp; - You can wire up your sensors and motors, LCD right here.</span><br /> <br /><span style="font-family: verdana, geneva; font-size: medium;"> - A set of about 50 breadboarding wires of</span><br /><span style="font-family: verdana, geneva; font-size: medium;"> &nbsp; different sizes</span></p><p><span style="font-family: verdana, geneva; font-size: medium;">-&nbsp; <a href="http://www.arduino.cc/en/Main/software" target="_blank">IDE</a> with complete development tools</span><br /><span style="font-family: verdana, geneva; font-size: medium;"> &nbsp;&nbsp; ( For Windows ,Linux &amp; Mac OS X)</span><br /> <br /> <br /><span style="font-family: verdana, geneva; font-size: medium;"> Look here for fun projects you can do with this kit :</span><br /> <br /><span style="font-family: verdana, geneva; font-size: medium;"> http://hacknmod.com/hack/top-40-arduino-projects-of-the-web/</span><br /> <br /><span style="font-family: verdana, geneva; font-size: medium;"> SUPPORT:</span><br /> <br /><span style="font-family: verdana, geneva; font-size: medium;"> We are engineers and also hobbyists who passionately involve in embedded system and software projects. These development boards are the best value kits to start your first microcontroller projects. As part of the open source community, we are more than happy to provide you with technical supports in regards to our products if needed.</span><br /> <br /><span style="font-family: verdana, geneva; font-size: medium;"> WARRANTY:</span><br /> <br /><span style="font-family: verdana, geneva; font-size: medium;"> We provide warranty for any defects in manufacturing. Feel free to get back to us if you have any issues.For any of our products combined shipping is welcome.</span></p>


entity_type: node
bundle: product
language: und
body_format: full_html
body_value:
  <p><span style="font-family: verdana,geneva; font-size: medium;">Clear case for Raspberry pi. </span><span style="font-family: verdana,geneva; font-size: medium;">Case comes unassembled so assembling will be required. </span></p>


entity_type: node
bundle: product
language: und
body_format: full_html
body_value:
  <p><span style="font-family: verdana,geneva; font-size: medium;"><strong>What is NetSensor? </strong></span></p><p><span style="font-family: verdana,geneva; font-size: medium;">NetSensor is an Arduino Kit which allows you to monitor your room from anywhere in the world via Internet.</span></p><p><span style="font-family: verdana,geneva; font-size: medium;">All you would need is a browser and this kit has all the hardware required to monitor your room and check if its warm, not too humid and if someone has broken into your home.</span></p><div><span style="font-family: verdana,geneva; font-size: medium;">This kit can be easily extended with our existing documentation to add many new sensors and hook them up to the internet. Making this a powerful extendable platform to meet remote sensing needs.<br /></span></div><div><span style="font-family: verdana,geneva; font-size: medium;"><br /></span></div><div><span style="font-family: verdana,geneva; font-size: medium;"><strong>Features:</strong></span></div><div><ul><li><span style="font-family: verdana,geneva; font-size: medium;">Room/plant monitoring</span></li><ul><li><span style="font-family: verdana,geneva; font-size: medium;">Temperature</span></li><li><span style="font-family: verdana,geneva; font-size: medium;">Humidity</span></li></ul></ul><span style="font-family: verdana,geneva; font-size: medium;"></span><ul><li><span style="font-family: verdana,geneva; font-size: medium;">Home Security Montoring</span></li><ul><li><span style="font-family: verdana,geneva; font-size: medium;">Door status sensor</span></li><li><span style="font-family: verdana,geneva; font-size: medium;">Provision to add motion sensor or other bits you need</span></li></ul></ul><p></p><p><span style="font-family: verdana,geneva; font-size: medium;"><strong>Contents:</strong></span></p><ul><li><span style="font-family: verdana,geneva; font-size: medium;">Arduino Uno</span></li><li><span style="font-family: verdana,geneva; font-size: medium;">Ethernet Shield </span></li><li><span style="font-family: verdana,geneva; font-size: medium;">OLED display</span></li><li><span style="font-family: verdana,geneva; font-size: medium;">High Precision Temp &amp; Humidity Sensor</span></li><li><span style="font-family: verdana,geneva; font-size: medium;">Door State sensor</span></li><li><span style="font-family: verdana,geneva; font-size: medium;">Wires + connector cables</span></li><li><span style="font-family: verdana,geneva; font-size: medium;">USB cable</span></li></ul><p></p><p><span style="font-family: verdana,geneva; font-size: medium;">Complete 3 Step tutorial</span></p><p><span style="font-family: verdana,geneva; font-size: medium;"><a href="http://www.hobbyist.co.nz/?q=arduino-to-oled-display" target="_blank">Step 1: OLED display interfacing with Arduino</a></span></p><p><span style="font-family: verdana,geneva; font-size: medium;"><a href="http://www.hobbyist.co.nz/?q=bump-sensor-dht22-oled-and-arduino" target="_blank">Step 2: Wiring the Temp&amp; Humidity Sensor + OLED Display + Door Opening Switch</a></span></p><p><span style="font-family: verdana,geneva; font-size: medium;"><a href="http://www.hobbyist.co.nz/?q=netsensor-goes-live" target="_blank">Step 3: See your setup in the Browser from anywhere in the world</a></span></p><p></p><p><span style="font-family: verdana,geneva; font-size: medium;"><img src="/sites/default/files/NetSensor/NetSensorAssembled_small.jpg" border="0" alt="Net Sensor Arduino Assembled" title="Net Sensor Arduino Assembled" width="639" height="465" /></span></p></div><div></div><p></p><p></p><p><span style="font-family: verdana,geneva; font-size: medium;">Browser view of the NetSensor Montoring Page</span></p><p><span style="font-family: verdana,geneva; font-size: medium;"><img src="/sites/default/files/NetSensor/NetSensorScreenShot.png" border="0" alt="Screen Shot NetSensor" title="Screen Shot NetSensor" width="645" height="706" /></span></p><p></p><p></p><p style="margin-bottom: 0in;"><span style="font-family: verdana,geneva; font-size: medium;"><font face="Arial, sans-serif"><font size="1" style="font-size: 2pt;">ethernet for arduino, arduino internet, to ethernet, ethernet internet, what is internet switch, project on arduino, how to arduino, ethernet arduino, ethernet poe, sensors for arduino, tutorial arduino, arduino tutorial, wifi arduino, arduino programming, arduino display, arduino browser,</font></font></span></p>


entity_type: node
bundle: page
language: und
body_format: full_html
body_value:
  <p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><strong>About us</strong></span></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">We are engineers and also hobbyists who passionately involve in embedded system and software projects.</span></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">As part of the open source community, we are more than happy to provide you with technical support in regard to our products.</span></p><p></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;"><strong>Consulting</strong></span></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">We provide consulting services on Arduino , Embedded and &nbsp;Android &nbsp;products.</span></p><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Details of services we provide</span></p><ul><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Consultancy on product development and materials.</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Prototype development&nbsp;</span></li><li><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Complete product development</span></li></ul><p><span style="font-size: medium; font-family: arial, helvetica, sans-serif;">Drop us a mail if you have a product in mind and want advice or help to develop it.&nbsp;We can help you get it done.&nbsp;</span></p><p></p><p><span style="font-family: arial,helvetica,sans-serif; font-size: medium;"><strong>Pay by online banking</strong></span><br /><span style="font-family: arial,helvetica,sans-serif; font-size: medium;"></span></p><p><span style="font-family: arial,helvetica,sans-serif; font-size: medium;">New Zealand customers can make payment to our Kiwi bank account for purchases. If you use this payment method, please use the first few characters of your email address as reference and email us your order.</span></p><p><span style="font-family: arial,helvetica,sans-serif; font-size: medium;"> Kiwi bank: 38-9011-0310259-02</span></p><p></p><h2><strong><span style="font-family: arial,helvetica,sans-serif; font-size: medium;">Contact details</span></strong></h2><p><span style="font-family: arial,helvetica,sans-serif; font-size: medium;">57 Shirley Road</span></p><p><span style="font-family: arial,helvetica,sans-serif; font-size: medium;">Shirley</span></p><p><span style="font-family: arial,helvetica,sans-serif; font-size: medium;">Christchurch 8013</span><strong><span style="font-family: arial,helvetica,sans-serif; font-size: medium;"><br /></span></strong></p><p><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"></span><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">New Zealand <br /></span></p><p><span style="font-family: arial, helvetica, sans-serif; font-size: medium;"><br /></span></p><p><font face="arial, helvetica, sans-serif" size="3"><img src="/sites/default/files/pictures/Phone.jpg" border="0" title="Contact" width="65" height="40" />&nbsp; &nbsp;021 1784802&nbsp;&nbsp;<span style="color: #800000;"> ( No texts please, call or email )</span><br /></font></p><p>&nbsp; &nbsp; &nbsp;<a href="mailto:nzelectronicswarehouse@gmail.com   " style="font-family: arial, helvetica, sans-serif; font-size: medium;"><img src="http://finellipizzeria.com/wp-content/uploads/2010/08/email_logo.jpg" border="0" width="25" /></a><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><a href="mailto:contact@hobbyist.co.nz?subject=Enquiry%20" style="font-family: arial, helvetica, sans-serif; font-size: medium;">contact@hobbyist.co.nz</a><span style="font-family: arial, helvetica, sans-serif; font-size: medium;">&nbsp; &nbsp;</span></p>


entity_type: node
bundle: product
language: und
body_format: full_html
body_value:
  <p><img src="sites/default/files/pictures/stepper-motor-controller/Stepper_motor_controller2.jpg" border="0" alt="" /></p><p><img src="sites/default/files/pictures/stepper-motor-controller/Stepper_motor_controller3.jpg" border="0" alt="" /></p><p><span style="font-size: medium;">This is a single channel stepper motor controller that support a variety of micro stepping functions. It's recommended for building Reprap 3D printers and any other Stepper motor application</span></p><p><span style="font-size: medium;">For documentation and more detail, please visit</span></p><p><span style="font-size: medium;"><a href="http://reprap.org/wiki/StepStick">http://reprap.org/wiki/StepStick</a></span></p><p><span style="font-size: medium;">Input voltage: 8 - 35 V</span></p><p><span style="font-size: medium;">Current rating: 2 A</span></p><p><span style="font-size: medium;"><br /></span></p><p><span style="font-size: medium;"><a href="sites/default/files/docs/Stepper%20motor%20controller%20A4988/a4988_DMOS_microstepping_driver_with_translator.pdf" target="_blank" title="a4988_DMOS_microstepping_driver_with_translator.pdf">Datasheet download</a><br /></span></p><pre><span style="font-size: xx-small;"><br /></span></pre><p><span style="font-size: xx-small;">tags: stepper motor, stepper motor controller, stepper motor driver&nbsp;</span></p>


entity_type: node
bundle: product
language: und
body_format: full_html
body_value:
  <p><span style="font-family: verdana, geneva; font-size: medium;">Module consists of 8 relays. Each relay is connected to a current &nbsp;buffer so that you can connect them directly to a Microcontroller.</span></p><p><span style="font-family: verdana, geneva; font-size: medium;">Using these relays you can easily control power appliances, the relay is rated for 230V 10Amps.</span></p><p><span style="font-family: verdana, geneva; font-size: medium;"><br /></span></p><p><span style="font-family: verdana, geneva; font-size: medium;">This can be easily interfaced with Arduinos.</span></p><p><span style="font-family: verdana, geneva; font-size: medium;">The Module has 9 LED's, one for power and 8 for indicating relay signals.</span></p><p><span style="font-family: verdana, geneva; font-size: medium;">This module comes with a ribbon cable for easy interfacing of the relays to the Micro.</span></p><p><span style="font-family: verdana, geneva; font-size: medium;"><br /></span></p><p><span style="font-family: verdana, geneva; font-size: medium;">Rating: &nbsp;10A 250V AC</span></p><p><span style="font-family: verdana, geneva; font-size: medium;">Input voltage: 5V DC<br /></span></p>


entity_type: node
bundle: product
language: und
body_format: full_html
body_value:
  <p><span style="font-family: verdana,geneva; font-size: medium;">There isn't a cleaner way to control something through the internet than using this WiFi Universal Power Adapter. It's super easy to setup and use. Think off things you can control on/off by your cellphone, or computer over the internet, usage of this plug is only limited by your imagination.</span></p><table align="center" border="0"><tbody><tr><td><span style="font-family: verdana,geneva; font-size: medium;"><img src="data:image/png;base64,[encoded data, 387672 characters]" border="0" alt="" width="636" height="292" /></span></td></tr><tr><td><span style="font-family: verdana,geneva; font-size: medium;"><img src="data:image/jpeg;base64,[encoded data, 32208 characters]" border="0" alt="" width="606" height="260" /></span></td></tr></tbody></table>


