# cache_field

cid: field:node:117
data:
  a:3:{s:4:"body";a:1:{s:3:"und";a:1:{i:0;a:5:{s:5:"value";s:62155:"<p><span style="font-size: small;">Brand new unopened RIGOL DS1052E 50MHz Oscilloscope </span><br /><br /><span style="font-size: small;">It's the perfect present for anyone who loves electronics!</span><br /><br /><span style="font-size: small;">About Rigol: This is the company which manufactures scopes for Agilent and HP as is mentioned in the review.</span><br /><span style="font-size: small;"></span><br /><br /><span style="font-size: small;">Product Features</span><br /><br /><span style="font-size: small;">- 1 GSa/s maximum real-time sample rate, - 25 GSa/s maximum equivalent-time sample rate</span><br /><span style="font-size: small;">- 50 MHz Bandwidths</span><br /><span style="font-size: small;">- 20 automatic measurements</span><br /><span style="font-size: small;">- 64 k TFT color LCD, bright and vivid waveform display</span><br /><span style="font-size: small;">- Ultra compact design: 303mm x 154mm x 133mm (WxHxD)</span><br /><br /><span style="font-size: small;">- 2 Analog channels + external trigger</span><br /><span style="font-size: small;">- 1 Million point deep memory</span><br /><span style="font-size: small;">- 1 GSa/sec max sample rate</span><br /><span style="font-size: small;">- 5.7” TFT QVGA (320X240) with 64K color LCD backlit display</span><br /><span style="font-size: small;">- Trigger modes: edge, pulse width, slope, video, pattern, continuous time, and alternate</span><br /><br /><span style="font-size: small;">- Comes with 2 high frequency probes.</span></p><p></p><p><img src="data:image/jpeg;base64,[encoded data, 60572 characters]" border="0" alt="" /></p>";s:7:"summary";s:0:"";s:6:"format";s:9:"full_html";s:10:"safe_value";s:62127:"<p><span style="font-size: small;">Brand new unopened RIGOL DS1052E 50MHz Oscilloscope </span></p>
  <p><span style="font-size: small;">It's the perfect present for anyone who loves electronics!</span></p>
  <p><span style="font-size: small;">About Rigol: This is the company which manufactures scopes for Agilent and HP as is mentioned in the review.</span><br /><span style="font-size: small;"></span></p>
  <p><span style="font-size: small;">Product Features</span></p>
  <p><span style="font-size: small;">- 1 GSa/s maximum real-time sample rate, - 25 GSa/s maximum equivalent-time sample rate</span><br /><span style="font-size: small;">- 50 MHz Bandwidths</span><br /><span style="font-size: small;">- 20 automatic measurements</span><br /><span style="font-size: small;">- 64 k TFT color LCD, bright and vivid waveform display</span><br /><span style="font-size: small;">- Ultra compact design: 303mm x 154mm x 133mm (WxHxD)</span></p>
  <p><span style="font-size: small;">- 2 Analog channels + external trigger</span><br /><span style="font-size: small;">- 1 Million point deep memory</span><br /><span style="font-size: small;">- 1 GSa/sec max sample rate</span><br /><span style="font-size: small;">- 5.7” TFT QVGA (320X240) with 64K color LCD backlit display</span><br /><span style="font-size: small;">- Trigger modes: edge, pulse width, slope, video, pattern, continuous time, and alternate</span></p>
  <p><span style="font-size: small;">- Comes with 2 high frequency probes.</span></p>

  <p><img src="data:image/jpeg;base64,[encoded data, 60572 characters]" border="0" alt="" /></p>
  ";s:12:"safe_summary";s:0:"";}}}s:16:"uc_product_image";a:1:{s:3:"und";a:1:{i:0;a:11:{s:3:"fid";s:3:"343";s:3:"alt";s:0:"";s:5:"title";s:0:"";s:3:"uid";s:1:"1";s:8:"filename";s:23:"51r-DIl6bsL (Small).jpg";s:3:"uri";s:32:"public://51r-DIl6bsL (Small).jpg";s:8:"filemime";s:10:"image/jpeg";s:8:"filesize";s:5:"32886";s:6:"status";s:1:"1";s:9:"timestamp";s:10:"1379932481";s:11:"rdf_mapping";a:0:{}}}}s:16:"taxonomy_catalog";a:1:{s:3:"und";a:1:{i:0;a:1:{s:3:"tid";s:2:"42";}}}}


cid: field:node:31
data:
  a:3:{s:4:"body";a:1:{s:3:"und";a:1:{i:0;a:5:{s:5:"value";s:9519:"<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>";s:7:"summary";s:0:"";s:6:"format";s:9:"full_html";s:10:"safe_value";s:9538:"<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;"> </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><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></p>
  <p><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><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;"> </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;"> </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  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;"> </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;"> </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;"> </span></p>
  ";s:12:"safe_summary";s:0:"";}}}s:10:"field_tags";a:1:{s:3:"und";a:3:{i:0;a:1:{s:3:"tid";s:2:"19";}i:1;a:1:{s:3:"tid";s:2:"20";}i:2;a:1:{s:3:"tid";s:2:"21";}}}s:11:"field_image";a:0:{}}


cid: field:node:24
data:
  a:3:{s:4:"body";a:1:{s:3:"und";a:1:{i:0;a:5:{s:5:"value";s:15545:"<div style="background-color: rgb(255, 255, 255);">
  	<p class="rteleft" dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt;">
  		&nbsp;&nbsp;</p>
  </div>
  <div style="background-color: rgb(255, 255, 255);">
  	<div style="background-color: rgb(255, 255, 255);">
  		<p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  			<strong><span style="font-size: 16px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000">What is a Arduino Motorshield?</font></font></span></span></strong></p>
  		<p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  			<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">This Arduino Motor Shield is built upon the L298 Dual channel H-bridge IC, with a maximum DC current of 2 A for each channel. This current rating is sufficient for most home made medium size robots. It has 3 different power operating modes based on the positions of the jumpers. When plugged into an Arduino board, the Power Supply Mode Selection jumper allows you to choose how the motor shield and the Arduino are powered.</span></font></font></span></span></p>
  		<p>
  			&nbsp;</p>
  		<p>
  			<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><img src="/sites/default/files/Motorshield_1.jpg" style="cursor: default;" /></span></span></p>
  		<p>
  			&nbsp;</p>
  	</div>
  </div>
  <p>
  	&nbsp;</p>
  <p>
  	<strong><span style="font-size: 16px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000">Modes of operation:</font></font></span></span></strong></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	&nbsp;</p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<strong><span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000">Mode 1 : PWRIN &amp; VIN</font></font></span></span></strong></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000">This mode is to short both the PWRIN and VIN, which is the most commonly used configuration.</font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><img height="258px;" src="https://lh4.googleusercontent.com/c3_LAxag34O8AtlyDwnBRSpRud8mI0_ntoxoNNXX4vaMScReL7MDoQR40JfwiYDHJ061kRwWx9QwtiKHuOwwg-9_lJd7GxDTyXasX_CQs4G5k6g3zKU" style="cursor: default;" width="395px;" /></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">In this mode only one power source is needed to connect to the Motor Shield, which also supplies power to the Arduino underneath. The power source should be kept between 6.5 - 12 V.</span></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	&nbsp;</p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<strong><span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000">Mode 2: Vin only</font></font></span></span></strong></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000">In this mode, both of the jumpers are on VIN as shown in the figure below.</font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><img height="220px;" src="https://lh6.googleusercontent.com/Vu_5ynGCbsiHZrmzEvQhufUBori62V6gwJCyhLSDJL8Vzp8b2a3nuA-ZM7aQBNSQkSnyqjIY1OyJyzGDYaRHYYhwoEmbNJviRHI24zTM9lteGJ02Q1I" style="cursor: default;" width="411px;" /></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<br />
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">This mode actually lets the Motor Shield to get the power from the Arduino, which means the Arduino board has to be powered up by a center-positive power jack. Again, the voltage level should be 6.5 - 12 V.&nbsp;</span><br />
  	<br />
  	<strong>Mode 3: PWRIN only</strong></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: 14px;">In some applications you may wish to keep the power sources of the Motor Shield and the Arduino separate. This requires both jumpers to sit on the PWRIN as shown in the figure below.</span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><img height="227px;" src="https://lh5.googleusercontent.com/kFusgNCztIJFJTdrlQkUMvad9Xd1xhfFlw9ZbOoyffwTVbdEce2jK-Zfj2cAhzJh9jNMMzxx7vUEb-j6t3sFdvEpV81-NI8oiWfGew6SDSlrLfJWCjQ" style="cursor: default;" width="399px;" /></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<br />
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">A good reason to keep the power sources separate is when the Motor Shield needs to supply large current and there are substantial noise while controlling the current through PWM. If both the analog and the digital share the same power source, in the event of current surge, the voltage level can drop suddenly and hence the microcontroller can make wrong decisions. Better digital signal integrity is obtained if the analog and digital power supply are kept separate. But remember, they should have a common ground. In this mode, the voltage range &nbsp;to the Motor Shield &nbsp;is 4.8 - 24 V, and to the Arduino is 6.5-12V.</span></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<br />
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><img height="185px;" src="https://lh5.googleusercontent.com/Ud_fk-QNHuqt0JDsa3uwp7OKFzGIPFwXUAR69dO2cyqTBm40bOrsGXvzWrIpFUEy0rOiXoL0Sp9mowpPRbQWWgcV5IZ_tsA2y2l_x6wWtDAVbAUwIxA" style="cursor: default;" width="373px;" /></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">&nbsp;&nbsp;&nbsp;</span><br />
  	<span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">After selecting the power mode, the rest of the work is quite straightforward and pretty much self-explanatory. Connect the first motor to M1+ and M1- and the second motor to M2+ and M2-, the motor can be controlled through PWM (pulse width modulation) or PLL (Phase locked loop) by placing the jumpers in the Control Mode Selection.</span><br />
  	<br />
  	<strong><span style="font-size: 16px;"><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">Programming the Arduino</span></span></strong></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<br />
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">Once all the wires are hooked up, you are ready to download the&nbsp;</span><a href="http://code.google.com/p/hobbyist-repository/source/browse/trunk/RoboTank/RoboTank.pde"><span style="color: rgb(0, 0, 153); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: underline; vertical-align: baseline;">example code</span></a><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">&nbsp;to test the Motor Shield. The code should work on any Arduino compatible boards, and in particular we have tested it on Arduino Duemilanove 2009 and Arduino Mega 1280. Make sure you have your external power source connected, because the USB cable alone will be most likely not able to supply the current for the DC motors. From Arduino IDE, after plugging in the USB cable, double check if the correct board is selected from Tools -&gt; Boards, and the correct Serial port is selected from Tools -&gt; Serial port. &nbsp;Upload the program once you are happy with the settings. Open the serial monitor, press &lsquo;e&rsquo; and &lsquo;Enter&rsquo; on the keyboard, your motors should be turning and the serial monitor should display &ldquo;Go!!&rdquo;.</span></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><img height="297px;" src="https://lh3.googleusercontent.com/tpLA1Y98_zlj-uPuTwQ9XqCNc4uNwSgayLj4ntkOTl7MJM_C_A0cyGS71fyJWdEnXJ9IbRFhzduFU03J0JKHex1EJHYARMfZSq2HUDo7NZb_rqCjMcU" style="cursor: default;" width="337px;" /></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	&nbsp;</p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<strong><span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000">How to control the robot</font></font></span></span></strong></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<br />
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">If that&rsquo;s the case, congratulations, you have got the Motor Shield going! The &lsquo;s&rsquo;, &lsquo;f&rsquo;,&rsquo;c&rsquo; keys control the motors to turn in different directions, and the &lsquo;d&rsquo; key is to stop. Play with it, the direction of the motor may appear opposite to what you want. If this is the case, you may either need to swap the polarity of the motor or swap the High and Low logic in the code.&nbsp;</span><br />
  	<br />
  	<span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">If you still need some more references for the Motor Shield, you may download the&nbsp;<a href="http://sites.google.com/site/nzhobbyist/docs_cabinet/L298_Motor_Shield_Manual.pdf?attredirects=0">manual</a>.</span></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	&nbsp;</p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	&nbsp;</p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><a href="?q=bluetooth-module-device">Step2: Test the Bluetooth module</a></font></font></span></span></p>
  <div class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	&nbsp;</div>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	&nbsp;</p>
  <p>
  	&nbsp;</p>
  ";s:7:"summary";s:0:"";s:6:"format";s:9:"full_html";s:10:"safe_value";s:15257:"<div style="background-color: rgb(255, 255, 255);">
  <p class="rteleft" dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt;">
  		  </p>
  </div>
  <div style="background-color: rgb(255, 255, 255);">
  <div style="background-color: rgb(255, 255, 255);">
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  			<strong><span style="font-size: 16px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000">What is a Arduino Motorshield?</font></font></span></span></strong></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  			<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">This Arduino Motor Shield is built upon the L298 Dual channel H-bridge IC, with a maximum DC current of 2 A for each channel. This current rating is sufficient for most home made medium size robots. It has 3 different power operating modes based on the positions of the jumpers. When plugged into an Arduino board, the Power Supply Mode Selection jumper allows you to choose how the motor shield and the Arduino are powered.</span></font></font></span></span></p>
  <p>
  			 </p>
  <p>
  			<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><img src="/sites/default/files/Motorshield_1.jpg" style="cursor: default;" /></span></span></p>
  <p>
  			 </p>
  </div>
  </div>
  <p>
  	 </p>
  <p>
  	<strong><span style="font-size: 16px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000">Modes of operation:</font></font></span></span></strong></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	 </p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<strong><span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000">Mode 1 : PWRIN &amp; VIN</font></font></span></span></strong></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000">This mode is to short both the PWRIN and VIN, which is the most commonly used configuration.</font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><img height="258px;" src="https://lh4.googleusercontent.com/c3_LAxag34O8AtlyDwnBRSpRud8mI0_ntoxoNNXX4vaMScReL7MDoQR40JfwiYDHJ061kRwWx9QwtiKHuOwwg-9_lJd7GxDTyXasX_CQs4G5k6g3zKU" style="cursor: default;" width="395px;" /></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">In this mode only one power source is needed to connect to the Motor Shield, which also supplies power to the Arduino underneath. The power source should be kept between 6.5 - 12 V.</span></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	 </p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<strong><span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000">Mode 2: Vin only</font></font></span></span></strong></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000">In this mode, both of the jumpers are on VIN as shown in the figure below.</font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><img height="220px;" src="https://lh6.googleusercontent.com/Vu_5ynGCbsiHZrmzEvQhufUBori62V6gwJCyhLSDJL8Vzp8b2a3nuA-ZM7aQBNSQkSnyqjIY1OyJyzGDYaRHYYhwoEmbNJviRHI24zTM9lteGJ02Q1I" style="cursor: default;" width="411px;" /></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<br /><span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">This mode actually lets the Motor Shield to get the power from the Arduino, which means the Arduino board has to be powered up by a center-positive power jack. Again, the voltage level should be 6.5 - 12 V. </span></font></font></span></span></p>
  <p>	<strong>Mode 3: PWRIN only</strong></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: 14px;">In some applications you may wish to keep the power sources of the Motor Shield and the Arduino separate. This requires both jumpers to sit on the PWRIN as shown in the figure below.</span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><img height="227px;" src="https://lh5.googleusercontent.com/kFusgNCztIJFJTdrlQkUMvad9Xd1xhfFlw9ZbOoyffwTVbdEce2jK-Zfj2cAhzJh9jNMMzxx7vUEb-j6t3sFdvEpV81-NI8oiWfGew6SDSlrLfJWCjQ" style="cursor: default;" width="399px;" /></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<br /><span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">A good reason to keep the power sources separate is when the Motor Shield needs to supply large current and there are substantial noise while controlling the current through PWM. If both the analog and the digital share the same power source, in the event of current surge, the voltage level can drop suddenly and hence the microcontroller can make wrong decisions. Better digital signal integrity is obtained if the analog and digital power supply are kept separate. But remember, they should have a common ground. In this mode, the voltage range  to the Motor Shield  is 4.8 - 24 V, and to the Arduino is 6.5-12V.</span></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<br /><span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><img height="185px;" src="https://lh5.googleusercontent.com/Ud_fk-QNHuqt0JDsa3uwp7OKFzGIPFwXUAR69dO2cyqTBm40bOrsGXvzWrIpFUEy0rOiXoL0Sp9mowpPRbQWWgcV5IZ_tsA2y2l_x6wWtDAVbAUwIxA" style="cursor: default;" width="373px;" /></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">   </span><br /><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">After selecting the power mode, the rest of the work is quite straightforward and pretty much self-explanatory. Connect the first motor to M1+ and M1- and the second motor to M2+ and M2-, the motor can be controlled through PWM (pulse width modulation) or PLL (Phase locked loop) by placing the jumpers in the Control Mode Selection.</span></font></font></span></span></p>
  <p>	<strong><span style="font-size: 16px;"><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">Programming the Arduino</span></span></strong></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<br /><span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">Once all the wires are hooked up, you are ready to download the </span><a href="http://code.google.com/p/hobbyist-repository/source/browse/trunk/RoboTank/RoboTank.pde"><span style="color: rgb(0, 0, 153); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: underline; vertical-align: baseline;">example code</span></a><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;"> to test the Motor Shield. The code should work on any Arduino compatible boards, and in particular we have tested it on Arduino Duemilanove 2009 and Arduino Mega 1280. Make sure you have your external power source connected, because the USB cable alone will be most likely not able to supply the current for the DC motors. From Arduino IDE, after plugging in the USB cable, double check if the correct board is selected from Tools -&gt; Boards, and the correct Serial port is selected from Tools -&gt; Serial port.  Upload the program once you are happy with the settings. Open the serial monitor, press ‘e’ and ‘Enter’ on the keyboard, your motors should be turning and the serial monitor should display “Go!!”.</span></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><img height="297px;" src="https://lh3.googleusercontent.com/tpLA1Y98_zlj-uPuTwQ9XqCNc4uNwSgayLj4ntkOTl7MJM_C_A0cyGS71fyJWdEnXJ9IbRFhzduFU03J0JKHex1EJHYARMfZSq2HUDo7NZb_rqCjMcU" style="cursor: default;" width="337px;" /></font></font></span></span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	 </p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<strong><span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000">How to control the robot</font></font></span></span></strong></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<br /><span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">If that’s the case, congratulations, you have got the Motor Shield going! The ‘s’, ‘f’,’c’ keys control the motors to turn in different directions, and the ‘d’ key is to stop. Play with it, the direction of the motor may appear opposite to what you want. If this is the case, you may either need to swap the polarity of the motor or swap the High and Low logic in the code. </span></font></font></span></span></p>
  <p>	<span style="color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">If you still need some more references for the Motor Shield, you may download the <a href="http://sites.google.com/site/nzhobbyist/docs_cabinet/L298_Motor_Shield_Manual.pdf?attredirects=0">manual</a>.</span></p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	 </p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	 </p>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	<span style="font-size: 14px;"><span style="font-family: arial,helvetica,sans-serif;"><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#000000"><a href="?q=bluetooth-module-device">Step2: Test the Bluetooth module</a></font></font></span></span></p>
  <div class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	 </div>
  <p class="rteleft" style="color: rgb(34, 34, 34); font-family: Arial,Verdana,sans-serif; font-size: 12px;">
  	 </p>
  <p>
  	 </p>
  ";s:12:"safe_summary";s:0:"";}}}s:10:"field_tags";a:1:{s:3:"und";a:3:{i:0;a:1:{s:3:"tid";s:2:"11";}i:1;a:1:{s:3:"tid";s:2:"12";}i:2;a:1:{s:3:"tid";s:2:"13";}}}s:11:"field_image";a:0:{}}


cid: field:node:47
data:
  a:3:{s:4:"body";a:1:{s:3:"und";a:1:{i:0;a:5:{s:5:"value";s:51644:"<p>&nbsp;</p><div><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">To connect the 4 Relay board to an Arduino is very easy. &nbsp;</span></p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">You only need to connect the Arduino +5v to the 4 Relay board VCC pin and an Arduino Ground to the 4 Relay board GND pin.</span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;">&nbsp;</p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">Then it’s a matter of just connecting some data pins from the Arduino to the 4 Relay board IN pins.</span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;">&nbsp;</p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">In the example code below I used Arduino pins 7, 8 , 9, 10.</span></p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">I didn’t use the same digital pins as the LEDs because they are inversed to each other. &nbsp;</span></p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">The LEDs get power from the Arduino, that means when the digital pin is HIGH (1) it has +5v on the line and the LED lights up.</span></p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">The relay commands are the opposite to this and the relay is switched with the IN pin is set LOW (0).</span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;">&nbsp;</p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">The relays default state is to connect COM to NC (normally closed), this is also done by setting the relays IN pin HIGH. &nbsp;</span></p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">This is a safety feature in-case you Arduino looses power it turns off all the relay switches. &nbsp;</span></p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">To change the relays state so NO (Normally Open) the pin is set to LOW.</span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;">&nbsp;</p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">I have some 12v DC lights that I want to activate like LEDs as a VU meter.</span></p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">To do that I connect the lights power line to the 4 Relay board relay Com connector and</span></p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">the line to the lights connects to the relays NO connector. &nbsp;The NC connect is left empty.</span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;">&nbsp;</p><h5 class="c0" style="padding-top: 11pt; color: #000000; font-size: 11pt; font-family: Arial; padding-bottom: 2pt; direction: ltr;">Example of connecting Lights to the relays.</h5><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;">&nbsp;</p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><a href="/sites/default/files/pictures/dancing-lights/dancinglights_step3.jpg"><img src="/sites/default/files/pictures/dancing-lights/dancinglights_step3.jpg" title="Click to see full sized image" width="600" height="413" /></a></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;">&nbsp;</p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;">&nbsp;</p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;">&nbsp;</p><table class="c14" style="border-collapse: collapse; font-family: Arial; width: 657px;" cellspacing="0" cellpadding="0"><tbody><tr><td class="c17" style="vertical-align: top; width: 641px; border: 1pt solid #000000; padding: 5pt;"><p class="c0" style="margin: 0px; direction: ltr;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// Relay controlled Danceing Lights</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// <span style="font-size: 12px;">Based on code from http://www.instructables.com/id/VU-Meter/</span></span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;">&nbsp;</p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">#define soundpin &nbsp;8 &nbsp;&nbsp;&nbsp; </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// &nbsp;reads the power from the light sensor from Analog input 0</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">#define LED1 3 &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// &nbsp;4 LED's on Digital output pins 3,4,5,6</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">#define LED2 4</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">#define LED3 5</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">#define LED4 6</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">#define RELAY1 7 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// &nbsp;4 Digital pins on the Arduino 7,8,9,10</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">#define RELAY2 8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// &nbsp;These pins link to 4 Relay board IN pins 1,2,3,4</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">#define RELAY3 9</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">#define RELAY4 10</span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;">&nbsp;</p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// define the sampling variable</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">int sound;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// arduino pin 13 LED flash. This goes on or off each time relays are updated</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">int flash =&nbsp;</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; </span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;">&nbsp;</p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c4" style="color: #e69138; font-size: 12pt;">void&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">setup</span><span class="c2" style="color: #242424; font-size: 12pt;">()</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">{</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">&nbsp; // initialize the serial communications for diagnostic output</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp;&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">Serial.begin</span><span class="c2" style="color: #242424; font-size: 12pt;">(9600);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp;</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">&nbsp; // Provide power by using the analog inputs as normal digital pins. &nbsp;</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp;&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(soundpin,&nbsp;</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">INPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp;&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED1,&nbsp;</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">OUTPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp;&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED2,&nbsp;</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">OUTPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp;&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED3,&nbsp;</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">OUTPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp;&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED4,&nbsp;</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">OUTPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp;&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY1,&nbsp;</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">OUTPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp;&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY2,&nbsp;</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">OUTPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp;&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY3,&nbsp;</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">OUTPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp;&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY4,&nbsp;</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">OUTPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">); &nbsp;</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp;&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(13,&nbsp;</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">OUTPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">); &nbsp;</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">}</span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;">&nbsp;</p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c4" style="color: #e69138; font-size: 12pt;">void&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">loop</span><span class="c2" style="color: #242424; font-size: 12pt;">()</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">{</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; sound=</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">analogRead</span><span class="c2" style="color: #242424; font-size: 12pt;">(soundpin);</span><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp;&nbsp;</span><span style="color: #006400;"><span class="c2" style="font-size: 12pt;"><strong>// read current sound level</strong></span></span></p><p class="c0" style="margin: 0px; direction: ltr;"><span style="font-family: Arial;">&nbsp;</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp;&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">Serial.println</span><span class="c2" style="color: #242424; font-size: 12pt;">(</span><span class="c2" style="color: #242424; font-size: 12pt;">sound); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// send the value of the sound level to the serial port.</span><span class="c11" style="color: #38761d; font-size: 12pt;">&nbsp;</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c8" style="text-indent: 48px; color: #38761d; font-size: 12pt; font-weight: bold;">&nbsp; // The above output will help to calibrate the the vu levels if your music is quieter</span><span class="c11" style="text-indent: 48px; color: #38761d; font-size: 12pt;">&nbsp;</span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;"><br /></span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;"><br /></span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">&nbsp; // below toggles the flash variable with a logical not operation.</span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"><span style="color: #38761d; font-size: medium;"><strong><br /></strong></span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; flash=!flash; &nbsp;&nbsp;</span><span style="color: #38761d; font-family: Arial; font-size: 16px; font-style: normal; font-weight: bold;">// True (1) &nbsp;become False (0) and then reversed.</span><span style="color: #242424; font-size: 12pt; font-family: Arial;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp;&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(13, flash);</span><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; </span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;">&nbsp;</p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">&nbsp; // loud level - from viewing the serial log the max level is around 300 for me</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp;&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">if</span><span class="c2" style="color: #242424; font-size: 12pt;">((sound)&gt;200) &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="c11" style="color: #38761d; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; </span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; {</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// set the LEDs on</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED4,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;">&nbsp;</p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">); &nbsp; &nbsp; &nbsp; </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// Turns the Relays on</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY4,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;">&nbsp;</p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; } &nbsp;</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">else if</span><span class="c2" style="color: #242424; font-size: 12pt;">((sound)&gt;150)</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; {</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// set the LED on</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED4,&nbsp;</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// set the LED off</span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;">&nbsp;</p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">); &nbsp; &nbsp; &nbsp; </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// turns the Relays on</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY4,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">); &nbsp; &nbsp; &nbsp;</span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// turns the Relay off</span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;">&nbsp;</p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; }</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">else if</span><span class="c2" style="color: #242424; font-size: 12pt;">(sound&gt;100)</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; {</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// set the LED on</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// set the LED off</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED4,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;">&nbsp;</p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">); &nbsp; &nbsp; &nbsp; </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// turns the Relays on</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">); &nbsp; &nbsp; &nbsp;</span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// turns the Relays off</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY4,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; }</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">else if</span><span class="c2" style="color: #242424; font-size: 12pt;">(sound&gt;50) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// sound below this level will turn off all leds / relays&nbsp; </span><br /> <span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// you can reduce this to have at least one led/relay most of the time.</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; {</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// set the LED on</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// set the LED off</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED4,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;">&nbsp;</p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">); &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// turnset the Relays on</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">); &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// turns the Relays off</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY4,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; }</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">else&nbsp;</span><span class="c2" style="color: #242424; font-size: 12pt;">&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;</span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// sound below 50 equals no leds / relays on.</span><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp;</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; {</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// set the LEDs off</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED4,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;">&nbsp;</p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">); &nbsp; &nbsp; &nbsp;</span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// turns the Relays off</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY4,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;">&nbsp;</p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; }</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp; &nbsp;</span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp;&nbsp;</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">delay</span><span class="c2" style="color: #242424; font-size: 12pt;">(1000); &nbsp;&nbsp;</span><span style="color: #38761d; font-family: Arial; font-size: 16px; font-style: normal; font-weight: bold;">// wait a second between changes to help protect the relay</span><span class="c2" style="color: #242424; font-size: 12pt;">&nbsp; &nbsp;</span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;"></span></p><p class="c0" style="margin: 0px; direction: ltr;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;"></span><span style="color: #242424; font-size: 12pt; font-family: Arial;">}</span></p></td></tr></tbody></table><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;">&nbsp;</p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;">&nbsp;</p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;">&nbsp;</p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;">Other Details:</p><h4 class="c0" style="padding-top: 12pt; color: #000000; font-size: 12pt; font-family: Arial; padding-bottom: 2pt; direction: ltr;"><span class="c23" style="background-color: #fcfcfc;">Specification of 4 Relay board:</span></h4><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c9" style="font-size: 10pt; background-color: #fcfcfc;">Equipped with high-current relay, AC250V 10A ; DC30V 10A</span></p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c9" style="font-size: 10pt; background-color: #fcfcfc;">Support 5V voltage</span></p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c9" style="font-size: 10pt; background-color: #fcfcfc;">Independent wiring in contact area , safe and reliable</span></p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c9" style="font-size: 10pt; background-color: #fcfcfc;">Standard interface that can be expanded in a variety of development boards</span></p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c9" style="font-size: 10pt; background-color: #fcfcfc;">Equipped with screw holes for easy installation</span></p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c9" style="font-size: 10pt; background-color: #fcfcfc;">Applicable to a variety of platforms including &nbsp; Arduino / AVR / ARM</span></p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c12" style="color: #242424; font-size: 10pt;">Size: 7 X 4.9 X1.8 (high) cm</span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;">&nbsp;</p><h4 class="c0" style="padding-top: 12pt; color: #000000; font-size: 12pt; font-family: Arial; padding-bottom: 2pt; direction: ltr;">Schematic Diagram:</h4><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><img src="/sites/default/files/pictures/dancing-lights/schematic.jpg" width="640" height="647" /></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;">&nbsp;</p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;">&nbsp;</p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;">More information about relays:&nbsp;<span class="c16" style="color: #000099; text-decoration: underline;"><a href="http://www.kpsec.freeuk.com/components/relay.htm" class="c13" style="text-decoration: inherit;">http://www.kpsec.freeuk.com/components/relay.htm</a></span></p><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;">&nbsp;</p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c10" style="color: #cc0000; font-size: 12pt;">Tips on working with AC power: &nbsp;</span><span class="c19" style="color: #ff0000; font-size: 12pt; font-weight: bold; background-color: #ffffff;">&nbsp;… IT IS DANGEROUS !!!... &nbsp;&nbsp;</span><span class="c10" style="color: #cc0000; font-size: 12pt;">&nbsp;</span></p><p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c10" style="color: #cc0000; font-size: 12pt;">Only work with AC if you really know what your doing, it can kill.</span></p></div><div>&nbsp;</div><div><a href="http://www.hobbyist.co.nz/?q=interfacing-relay-modules-to-arduino"><span style="font-size: 14px;"><strong>Previous Step: Interfacing relay modules to Arduino </strong></span></a></div><div>&nbsp;</div><div><a href="http://www.hobbyist.co.nz/?q=dancing-lights"><strong><span style="color: #006400;"><span style="font-size: 18px;">Get yourself the dancing lights now</span></span></strong></a></div><p>&nbsp;</p>";s:7:"summary";s:0:"";s:6:"format";s:9:"full_html";s:10:"safe_value";s:49095:"<p> </p>
  <div>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">To connect the 4 Relay board to an Arduino is very easy.  </span></p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">You only need to connect the Arduino +5v to the 4 Relay board VCC pin and an Arduino Ground to the 4 Relay board GND pin.</span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;"> </p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">Then it’s a matter of just connecting some data pins from the Arduino to the 4 Relay board IN pins.</span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;"> </p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">In the example code below I used Arduino pins 7, 8 , 9, 10.</span></p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">I didn’t use the same digital pins as the LEDs because they are inversed to each other.  </span></p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">The LEDs get power from the Arduino, that means when the digital pin is HIGH (1) it has +5v on the line and the LED lights up.</span></p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">The relay commands are the opposite to this and the relay is switched with the IN pin is set LOW (0).</span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;"> </p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">The relays default state is to connect COM to NC (normally closed), this is also done by setting the relays IN pin HIGH.  </span></p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">This is a safety feature in-case you Arduino looses power it turns off all the relay switches.  </span></p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">To change the relays state so NO (Normally Open) the pin is set to LOW.</span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;"> </p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">I have some 12v DC lights that I want to activate like LEDs as a VU meter.</span></p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">To do that I connect the lights power line to the 4 Relay board relay Com connector and</span></p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c2" style="color: #242424; font-size: 12pt;">the line to the lights connects to the relays NO connector.  The NC connect is left empty.</span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;"> </p>
  <h5 class="c0" style="padding-top: 11pt; color: #000000; font-size: 11pt; font-family: Arial; padding-bottom: 2pt; direction: ltr;">Example of connecting Lights to the relays.</h5>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"> </p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><a href="/sites/default/files/pictures/dancing-lights/dancinglights_step3.jpg"><img src="/sites/default/files/pictures/dancing-lights/dancinglights_step3.jpg" title="Click to see full sized image" width="600" height="413" /></a></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;"> </p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;"> </p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;"> </p>
  <table class="c14" style="border-collapse: collapse; font-family: Arial; width: 657px;" cellspacing="0" cellpadding="0"><tbody><tr><td class="c17" style="vertical-align: top; width: 641px; border: 1pt solid #000000; padding: 5pt;">
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// Relay controlled Danceing Lights</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// <span style="font-size: 12px;">Based on code from <a href="http://www.instructables.com/id/VU-Meter/">http://www.instructables.com/id/VU-Meter/</a></span></span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"> </p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">#define soundpin  8     </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">//  reads the power from the light sensor from Analog input 0</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">#define LED1 3           </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">//  4 LED's on Digital output pins 3,4,5,6</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">#define LED2 4</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">#define LED3 5</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">#define LED4 6</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">#define RELAY1 7                   </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">//  4 Digital pins on the Arduino 7,8,9,10</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">#define RELAY2 8                   </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">//  These pins link to 4 Relay board IN pins 1,2,3,4</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">#define RELAY3 9</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">#define RELAY4 10</span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"> </p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// define the sampling variable</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">int sound;                        </span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// arduino pin 13 LED flash. This goes on or off each time relays are updated</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">int flash = </span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">;            </span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"> </p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c4" style="color: #e69138; font-size: 12pt;">void </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">setup</span><span class="c2" style="color: #242424; font-size: 12pt;">()</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">{</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">  // initialize the serial communications for diagnostic output</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">  </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">Serial.begin</span><span class="c2" style="color: #242424; font-size: 12pt;">(9600);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;"> </span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">  // Provide power by using the analog inputs as normal digital pins.  </span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">  </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(soundpin, </span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">INPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">  </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED1, </span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">OUTPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">  </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED2, </span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">OUTPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">  </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED3, </span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">OUTPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">  </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED4, </span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">OUTPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">  </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY1, </span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">OUTPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">  </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY2, </span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">OUTPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">  </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY3, </span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">OUTPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">  </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY4, </span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">OUTPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">);  </span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">  </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">pinMode</span><span class="c2" style="color: #242424; font-size: 12pt;">(13, </span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">OUTPUT</span><span class="c2" style="color: #242424; font-size: 12pt;">);  </span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">}</span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"> </p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c4" style="color: #e69138; font-size: 12pt;">void </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">loop</span><span class="c2" style="color: #242424; font-size: 12pt;">()</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">{</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">    sound=</span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">analogRead</span><span class="c2" style="color: #242424; font-size: 12pt;">(soundpin);</span><span class="c2" style="color: #242424; font-size: 12pt;">    </span><span style="color: #006400;"><span class="c2" style="font-size: 12pt;"><strong>// read current sound level</strong></span></span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span style="font-family: Arial;"> </span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">  </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">Serial.println</span><span class="c2" style="color: #242424; font-size: 12pt;">(</span><span class="c2" style="color: #242424; font-size: 12pt;">sound);                  </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// send the value of the sound level to the serial port.</span><span class="c11" style="color: #38761d; font-size: 12pt;"> </span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c8" style="text-indent: 48px; color: #38761d; font-size: 12pt; font-weight: bold;">  // The above output will help to calibrate the the vu levels if your music is quieter</span><span class="c11" style="text-indent: 48px; color: #38761d; font-size: 12pt;"> </span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;"><br /></span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;"><br /></span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">  // below toggles the flash variable with a logical not operation.</span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"><span style="color: #38761d; font-size: medium;"><strong><br /></strong></span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"><span class="c2" style="color: #242424; font-size: 12pt;">  flash=!flash;   </span><span style="color: #38761d; font-family: Arial; font-size: 16px; font-style: normal; font-weight: bold;">// True (1)  become False (0) and then reversed.</span><span style="color: #242424; font-size: 12pt; font-family: Arial;">                                </span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">  </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(13, flash);</span><span class="c2" style="color: #242424; font-size: 12pt;">               </span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"> </p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">  // loud level - from viewing the serial log the max level is around 300 for me</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">    </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">if</span><span class="c2" style="color: #242424; font-size: 12pt;">((sound)&gt;200)       </span><span class="c11" style="color: #38761d; font-size: 12pt;">               </span><span class="c2" style="color: #242424; font-size: 12pt;">    </span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">        {</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);           </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// set the LEDs on</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED4,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"> </p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);       </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// Turns the Relays on</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY4,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"> </p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">        }  </span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">        </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">else if</span><span class="c2" style="color: #242424; font-size: 12pt;">((sound)&gt;150)</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">        {</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);           </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// set the LED on</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED4, </span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);           </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// set the LED off</span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"> </p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);       </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// turns the Relays on</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY4,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);      </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// turns the Relay off</span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"> </p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">        }</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">        </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">else if</span><span class="c2" style="color: #242424; font-size: 12pt;">(sound&gt;100)</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">        {</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);           </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// set the LED on</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);            </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// set the LED off</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED4,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"> </p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);       </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// turns the Relays on</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);      </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// turns the Relays off</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY4,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">        }</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">         </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">else if</span><span class="c2" style="color: #242424; font-size: 12pt;">(sound&gt;50)                             </span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">         </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// sound below this level will turn off all leds / relays  </span><br /><span class="c2" style="color: #242424; font-size: 12pt;">         </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// you can reduce this to have at least one led/relay most of the time.</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">        {</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);           </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// set the LED on</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);            </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// set the LED off</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED4,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"> </p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);        </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// turnset the Relays on</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);       </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// turns the Relays off</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY4,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">        }</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">         </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">else </span><span class="c2" style="color: #242424; font-size: 12pt;">                                                     </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// sound below 50 equals no leds / relays on.</span><span class="c2" style="color: #242424; font-size: 12pt;"> </span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">        {</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);            </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// set the LEDs off</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(LED4,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">LOW</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"> </p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY1,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);      </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;">// turns the Relays off</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY2,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY3,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">             </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">digitalWrite</span><span class="c2" style="color: #242424; font-size: 12pt;">(RELAY4,</span><span class="c7" style="color: #0b5394; font-size: 12pt; font-weight: bold;">HIGH</span><span class="c2" style="color: #242424; font-size: 12pt;">);</span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt;"> </p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">        }</span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">     </span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c2" style="color: #242424; font-size: 12pt;">    </span><span class="c3" style="color: #e69138; font-size: 12pt; font-weight: bold;">delay</span><span class="c2" style="color: #242424; font-size: 12pt;">(1000);   </span><span style="color: #38761d; font-family: Arial; font-size: 16px; font-style: normal; font-weight: bold;">// wait a second between changes to help protect the relay</span><span class="c2" style="color: #242424; font-size: 12pt;">   </span><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;"></span></p>
  <p class="c0" style="margin: 0px; direction: ltr;"><span class="c8" style="color: #38761d; font-size: 12pt; font-weight: bold;"></span><span style="color: #242424; font-size: 12pt; font-family: Arial;">}</span></p>
  </td>
  </tr></tbody></table><p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;"> </p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;"> </p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;"> </p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;">Other Details:</p>
  <h4 class="c0" style="padding-top: 12pt; color: #000000; font-size: 12pt; font-family: Arial; padding-bottom: 2pt; direction: ltr;"><span class="c23" style="background-color: #fcfcfc;">Specification of 4 Relay board:</span></h4>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c9" style="font-size: 10pt; background-color: #fcfcfc;">Equipped with high-current relay, AC250V 10A ; DC30V 10A</span></p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c9" style="font-size: 10pt; background-color: #fcfcfc;">Support 5V voltage</span></p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c9" style="font-size: 10pt; background-color: #fcfcfc;">Independent wiring in contact area , safe and reliable</span></p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c9" style="font-size: 10pt; background-color: #fcfcfc;">Standard interface that can be expanded in a variety of development boards</span></p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c9" style="font-size: 10pt; background-color: #fcfcfc;">Equipped with screw holes for easy installation</span></p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c9" style="font-size: 10pt; background-color: #fcfcfc;">Applicable to a variety of platforms including   Arduino / AVR / ARM</span></p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c12" style="color: #242424; font-size: 10pt;">Size: 7 X 4.9 X1.8 (high) cm</span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;"> </p>
  <h4 class="c0" style="padding-top: 12pt; color: #000000; font-size: 12pt; font-family: Arial; padding-bottom: 2pt; direction: ltr;">Schematic Diagram:</h4>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><img src="/sites/default/files/pictures/dancing-lights/schematic.jpg" width="640" height="647" /></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;"> </p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;"> </p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;">More information about relays: <span class="c16" style="color: #000099; text-decoration: underline;"><a href="http://www.kpsec.freeuk.com/components/relay.htm" class="c13" style="text-decoration: inherit;">http://www.kpsec.freeuk.com/components/relay.htm</a></span></p>
  <p class="c0 c1" style="margin: 0px; direction: ltr; height: 11pt; color: #000000; font-family: Arial; font-size: 15px;"> </p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c10" style="color: #cc0000; font-size: 12pt;">Tips on working with AC power:  </span><span class="c19" style="color: #ff0000; font-size: 12pt; font-weight: bold; background-color: #ffffff;"> … IT IS DANGEROUS !!!...   </span><span class="c10" style="color: #cc0000; font-size: 12pt;"> </span></p>
  <p class="c0" style="margin: 0px; direction: ltr; color: #000000; font-family: Arial; font-size: 15px;"><span class="c10" style="color: #cc0000; font-size: 12pt;">Only work with AC if you really know what your doing, it can kill.</span></p>
  </div>
  <div> </div>
  <div><a href="http://www.hobbyist.co.nz/?q=interfacing-relay-modules-to-arduino"><span style="font-size: 14px;"><strong>Previous Step: Interfacing relay modules to Arduino </strong></span></a></div>
  <div> </div>
  <div><a href="http://www.hobbyist.co.nz/?q=dancing-lights"><strong><span style="color: #006400;"><span style="font-size: 18px;">Get yourself the dancing lights now</span></span></strong></a></div>
  <p> </p>
  ";s:12:"safe_summary";s:0:"";}}}s:10:"field_tags";a:1:{s:3:"und";a:5:{i:0;a:1:{s:3:"tid";s:1:"7";}i:1;a:1:{s:3:"tid";s:2:"26";}i:2;a:1:{s:3:"tid";s:2:"29";}i:3;a:1:{s:3:"tid";s:2:"31";}i:4;a:1:{s:3:"tid";s:2:"32";}}}s:11:"field_image";a:1:{s:3:"und";a:1:{i:0;a:11:{s:3:"fid";s:2:"84";s:3:"alt";s:0:"";s:5:"title";s:0:"";s:3:"uid";s:2:"82";s:8:"filename";s:18:"relay front sm.JPG";s:3:"uri";s:41:"public://field/image/relay front sm_0.JPG";s:8:"filemime";s:10:"image/jpeg";s:8:"filesize";s:6:"164093";s:6:"status";s:1:"1";s:9:"timestamp";s:10:"1322118592";s:11:"rdf_mapping";a:0:{}}}}}


cid: field:node:93
data:
  a:1:{s:4:"body";a:1:{s:3:"und";a:1:{i:0;a:5:{s:5:"value";s:399713:"<p></p><p></p><h2><span style="font-size: medium;"><span style="font-family: arial,helvetica,sans-serif;"><strong>Arduino IDE TOOLS menu is very slow</strong></span><br /></span></h2><p class="MsoNormal"><span style="font-size: medium;"><br /></span></p><p class="MsoNormal"><span style="font-size: medium;">The following syndromes appear when using a computer with Bluetooth turned on:</span></p><ul><li><span style="font-size: medium;"> Arduino IDE takes 30 seconds to start up</span></li><li><span style="font-size: medium;"> While other menus are fine, clicking on the “TOOLS” menu, it hangs for another 20 seconds</span></li></ul><p></p><p class="MsoNormal"><span style="font-size: medium;">This problem is caused by the auto-scanning COM ports feature of the Arduino IDE. It gets confused when a Bluetooth COM port is present. To fix this problem, follow the steps below</span></p><p></p><p class="MsoNormal"><span style="font-size: medium;"><strong>1.</strong> Close all opened Arduino IDE</span></p><p></p><p class="MsoNormal"><span style="font-size: medium;"><strong>2.</strong> Go to the Arduino IDE directory, e.g. c:\arduino-1.0.1, instead of deleting the rxtxSerial.dll file, rename it to “rxtxSerial_original.dll”</span></p><p class="MsoNormal"><span style="font-size: medium;"><img src="data:image/png;base64,[encoded data, 193128 characters]" border="0" alt="" /></span></p><p></p><p class="MsoListParagraph"><span style="font-size: medium;"><span style="position: absolute; z-index: 1; left: 0px; margin-left: 202px; margin-top: 418px; width: 140px; height: 42px;"><img src="file:///C:\Users\King\AppData\Local\Temp\msohtmlclip1\01\clip_image001.gif" border="0" width="140" height="42" /></span></span></p><p class="MsoNormal"><span style="font-size: medium;"><strong>3.</strong> Download, unzip and place this <a href="/sites/default/files/docs/Bluttooth/slow%20Arduino%20IDE/rxtxSerial-2.2_fixed_2009-03-17.rar" target="_blank">rxtxSerial.dll file</a> to the directory</span></p><p></p><p><span style="font-size: medium;"><img src="data:image/png;base64,[encoded data, 204216 characters]" border="0" alt="" /></span></p><p><span style="font-size: medium;"><br /></span></p><p><span style="font-size: medium;">This is a common problem and it is discussed in this thread of the Arduino Forums. </span></p><p><span style="font-size: medium;">http://arduino.cc/forum/index.php/topic,46977.0.html<br /></span></p>";s:7:"summary";s:0:"";s:6:"format";s:9:"full_html";s:10:"safe_value";s:399751:"
  <h2><span style="font-size: medium;"><span style="font-family: arial,helvetica,sans-serif;"><strong>Arduino IDE TOOLS menu is very slow</strong></span><br /></span></h2>
  <p class="MsoNormal"><span style="font-size: medium;"><br /></span></p>
  <p class="MsoNormal"><span style="font-size: medium;">The following syndromes appear when using a computer with Bluetooth turned on:</span></p>
  <ul><li><span style="font-size: medium;"> Arduino IDE takes 30 seconds to start up</span></li>
  <li><span style="font-size: medium;"> While other menus are fine, clicking on the “TOOLS” menu, it hangs for another 20 seconds</span></li>
  </ul><p class="MsoNormal"><span style="font-size: medium;">This problem is caused by the auto-scanning COM ports feature of the Arduino IDE. It gets confused when a Bluetooth COM port is present. To fix this problem, follow the steps below</span></p>

  <p class="MsoNormal"><span style="font-size: medium;"><strong>1.</strong> Close all opened Arduino IDE</span></p>

  <p class="MsoNormal"><span style="font-size: medium;"><strong>2.</strong> Go to the Arduino IDE directory, e.g. c:\arduino-1.0.1, instead of deleting the rxtxSerial.dll file, rename it to “rxtxSerial_original.dll”</span></p>
  <p class="MsoNormal"><span style="font-size: medium;"><img src="data:image/png;base64,[encoded data, 193128 characters]" border="0" alt="" /></span></p>

  <p class="MsoListParagraph"><span style="font-size: medium;"><span style="position: absolute; z-index: 1; left: 0px; margin-left: 202px; margin-top: 418px; width: 140px; height: 42px;"><img src="file:///C:\Users\King\AppData\Local\Temp\msohtmlclip1\01\clip_image001.gif" border="0" width="140" height="42" /></span></span></p>
  <p class="MsoNormal"><span style="font-size: medium;"><strong>3.</strong> Download, unzip and place this <a href="/sites/default/files/docs/Bluttooth/slow%20Arduino%20IDE/rxtxSerial-2.2_fixed_2009-03-17.rar" target="_blank">rxtxSerial.dll file</a> to the directory</span></p>

  <p><span style="font-size: medium;"><img src="data:image/png;base64,[encoded data, 204216 characters]" border="0" alt="" /></span></p>
  <p><span style="font-size: medium;"><br /></span></p>
  <p><span style="font-size: medium;">This is a common problem and it is discussed in this thread of the Arduino Forums. </span></p>
  <p><span style="font-size: medium;"><a href="http://arduino.cc/forum/index.php/topic,46977.0.html">http://arduino.cc/forum/index.php/topic,46977.0.html</a><br /></span></p>
  ";s:12:"safe_summary";s:0:"";}}}}


