<h1 class="entry-title" style="box-sizing: inherit; margin: 20px 0px 25px; font-size: 24px; font-family: Raleway, Arial, sans-serif; line-height: 1.4; color: #454545; clear: both; letter-spacing: 1px; background-color: #ffffff;">솔레노이드(Solenoid) 모터, 밸브 (TIP120 트랜지스터)</h1>
<div class="entry-content" style="box-sizing: inherit; margin: 1.5em 0px 0px; color: #505050; font-family: Lato, Verdana, sans-serif; font-size: 14px; background-color: #ffffff;">
   <p style="box-sizing: inherit; margin-bottom: 10px;">&nbsp;</p>
   <h1 style="box-sizing: inherit; margin: 20px 0px 10px; font-size: 28px; font-family: Raleway, Arial, sans-serif; line-height: 1; color: #454545; clear: both;"><strong style="box-sizing: inherit;">1. 솔레노이드(Solenoid) 모터</strong></h1>
   <p style="box-sizing: inherit; margin-bottom: 10px;">솔레노이드란 원통형으로 감은 전기 코일을 의미합니다. 원통형으로 코일을 감으면 원통 내부에 자기장이 형성되는데 여기에 철과 같은 자성 물질을 접근시키면 원통의 축 방향으로 이동하게 됩니다. 즉, 코일에 전기를 넣으면 왕복 운동을 만들 수 있습니다. 일반적인 전기 모터가 전기에너지를 회전 운동으로 변환시켜 주는 것과 기본 원리는 비슷합니다.</p>
   <p style="box-sizing: inherit; margin-bottom: 10px;">솔레노이드 모터는 의외로 다양한 곳에 사용이 됩니다. 집에서 사용하는 도어락이나 원격으로 자동차 문을 제어하는 데에도 사용됩니다.</p>
   <p style="box-sizing: inherit; margin-bottom: 10px;">솔레노이드 모터를 응용한 것이 솔레노이드 밸브입니다. 솔레노이드 밸브를 통해 수족관에 들어가는 물의 양을 제어하거나 칵테일 기계, 커피머신 등등 유체를 제어하는 곳에 사용이 가능합니다.</p>
   <p style="box-sizing: inherit; margin-bottom: 10px;"><a href="http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/09/Cocktail_Machine.jpg" style="box-sizing: inherit; background-color: transparent; color: #009688; text-decoration-line: none; transition: color 0.35s ease 0s;" target="_blank"><img class="alignnone size-full wp-image-1061" src="http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/09/Cocktail_Machine.jpg" alt="Cocktail_Machine" width="410" srcset="http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/09/Cocktail_Machine.jpg 410w, http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/09/Cocktail_Machine-300x169.jpg 300w" sizes="(max-width: 410px) 100vw, 410px" style="box-sizing: inherit; border: 0px; vertical-align: middle; max-width: 100%; height: auto; margin-top: 20px; margin-bottom: 20px;" /></a></p>
   <p style="box-sizing: inherit; margin-bottom: 10px;">일반적으로 솔레노이드 모터는 비교적 많은 전기에너지를 필요로 하기 때문에(5~60V) 아두이노 자체의 전력으로는 감당이 안됩니다.(아두이노는 핀당 5v – 40mA 정도만 출력) 그래서 별도의 외부 전원을 사용해야 하고, 솔레노이드 모터로 들어가는 이 외부 전원을 아두이노에서 제어해야 합니다. 이런 역할을 하는 것이 트랜지스터, 여기서는 특히&nbsp;<a href="http://wiki.bildr.org/index.php/TIP120%20Darlington%20Transistor" style="box-sizing: inherit; background-color: transparent; color: #009688; text-decoration-line: none; transition: color 0.35s ease 0s;" target="_blank">TIP120 Darlington Transistor</a>&nbsp;를 사용합니다. 트랜지스터에 대한 내용은 저도 잘 모르고 내용이 방대해질 수 있으므로 특정 트랜지스터를 사용하는 방법만 기술합니다. 자세한 내용은 구글링하세요!! (<a href="http://www.bourns.com/pdfs/bd645.pdf" style="box-sizing: inherit; background-color: transparent; color: #009688; text-decoration-line: none; transition: color 0.35s ease 0s;" target="_blank">BD651</a>&nbsp; 과 같은&nbsp;NPN&nbsp;<a href="http://wiki.bildr.org/index.php/darlington%20transistor" style="box-sizing: inherit; background-color: transparent; color: #009688; text-decoration-line: none; transition: color 0.35s ease 0s;" target="_blank">darlington transistor</a>&nbsp;도 여기서 사용한 방법과 같은 방법으로 사용이 가능하다고 하니 참고하세요.)</p>
   <p style="box-sizing: inherit; margin-bottom: 10px;"><a href="http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/09/TIP120.jpg" style="box-sizing: inherit; background-color: transparent; color: #009688; text-decoration-line: none; transition: color 0.35s ease 0s;" target="_blank"><img class="alignnone size-full wp-image-1062" src="http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/09/TIP120.jpg" alt="TIP120" width="435" srcset="http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/09/TIP120.jpg 435w, http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/09/TIP120-300x166.jpg 300w" sizes="(max-width: 435px) 100vw, 435px" style="box-sizing: inherit; border: 0px; vertical-align: middle; max-width: 100%; height: auto; margin-top: 20px; margin-bottom: 20px;" /></a></p>
   <p style="box-sizing: inherit; margin-bottom: 10px;">TIP120 트랜지스터는 위 그림처럼 생겼습니다. 3개의 핀이 있는데, base pin(B) 을 작은 전압으로 제어하면 collector pin(C) -&gt; emitter pin(E)으로 흐르는 높은 전압을 &nbsp;제어할 수 있습니다. 전자식 스위치라고 할 수 있습니다. base pin 을 아두이노의 디지털 핀에 연결하고 여기에 HIGH, LOW 등의 신호를 주면 제어가 됩니다! 참 쉽죠.</p>
   <p style="box-sizing: inherit; margin-bottom: 10px;">&nbsp;</p>
   <h1 style="box-sizing: inherit; margin: 20px 0px 10px; font-size: 28px; font-family: Raleway, Arial, sans-serif; line-height: 1; color: #454545; clear: both;"><strong style="box-sizing: inherit;">2. 연결 방법</strong></h1>
   <p style="box-sizing: inherit; margin-bottom: 10px;"><a href="http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/09/SolCir01.png" style="box-sizing: inherit; background-color: transparent; color: #009688; text-decoration-line: none; transition: color 0.35s ease 0s;" target="_blank"><img class="alignnone size-full wp-image-1063" src="http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/09/SolCir01.png" alt="SolCir01" width="554" srcset="http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/09/SolCir01.png 554w, http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/09/SolCir01-300x135.png 300w" sizes="(max-width: 554px) 100vw, 554px" style="box-sizing: inherit; border: 0px; vertical-align: middle; max-width: 100%; height: auto; margin-top: 20px; margin-bottom: 20px;" /></a></p>
   <p style="box-sizing: inherit; margin-bottom: 10px;">여기서 사용된 트랜지스터는 전압이 아닌 전류로 제어가 됩니다. 그래서 아두이노에서 base pin 으로 들어가는 전류가 특정 크기 이내로 제한이 되도록 하기 위해 R1 (2.2kohm) 저항을 달아줍니다. base pin 은 아두이노의 디지털 핀 어느 것에나 연결하면 됩니다.</p>
   <p style="box-sizing: inherit; margin-bottom: 10px;">그림을 유심히보시면 모터의 하단 +, – 라인에 다이오드가 달려 있는 것이 보이실겁니다. 릴레이, 솔레노이드, 모터와 같이 코일을 사용하는 모듈에는 다이오드를 반드시 사용해야하고 다이오드 없이 집을 비워서는 안됩니다! 이런 모듈들은 전원이 차단&nbsp;될 때 수백 볼트에 이르는 역전압(reverse voltage)이 순간적으로 발생해서 트랜지스터를 먹통으로 만듭니다. 다이오드는 전류가 한 방향으로만 흐르도록 함으로써 역전압이 코일로 다시 돌아가도록 하고 트랜지스터를 보호합니다.</p>
   <p style="box-sizing: inherit; margin-bottom: 10px;">다이오드는 이런 현상에 대응할 만큼 충분히 빠르고 부하를 견딜만한 용량을 갖추어야 합니다.&nbsp;<a href="http://wiki.bildr.org/index.php/Diode%20Rectifier%20-%201A%2050V" style="box-sizing: inherit; background-color: transparent; color: #009688; text-decoration-line: none; transition: color 0.35s ease 0s;" target="_blank">1N4001</a>&nbsp;or&nbsp;<a href="http://www.fairchildsemi.com/ds/SB/SB560.pdf" style="box-sizing: inherit; background-color: transparent; color: #009688; text-decoration-line: none; transition: color 0.35s ease 0s;" target="_blank">SB560</a>&nbsp;과 같은&nbsp;rectifier diode 가 적당하다고 하네요.</p>
   <p style="box-sizing: inherit; margin-bottom: 10px;">다이오드는 띠가 있는 쪽이 솔레노이드의 전원 입력쪽(V+)를 향하도록 해야합니다.</p>
   <p style="box-sizing: inherit; margin-bottom: 10px;"><span style="box-sizing: inherit; color: #000000;"><strong style="box-sizing: inherit;">주의 :</strong>&nbsp;TIP120 트랜지스터는 높은 전압을 제어하는데 유용하게 사용될 수 있지만 DC 전원에만 해당합니다.&nbsp;<span style="box-sizing: inherit; color: #ff0000;">AC 전원은 제어할 수 없으니</span>&nbsp;시도하지 마세요.&nbsp;<span style="box-sizing: inherit; color: #ff0000;">트랜지스터는 제어가능한 전압, 전류의 범위해 대한 정격 용량이 정해져 있습니다.</span>&nbsp;TIP120의 경우 5~60V, 5A 또는 300us의 8A pulse 까지 입니다. 이 이상의 용량이나 AC 전원을 제어하고 싶으시다면 릴레이(Relay)를 사용하시기 바랍니다.</span></p>
   <p style="box-sizing: inherit; margin-bottom: 10px;">&nbsp;</p>
   <h1 style="box-sizing: inherit; margin: 20px 0px 10px; font-size: 28px; font-family: Raleway, Arial, sans-serif; line-height: 1; color: #454545; clear: both;"><strong style="box-sizing: inherit;">3. 소스코드 (스케치)</strong></h1>
   <p style="box-sizing: inherit; margin-bottom: 10px;">&nbsp;</p>
   <div id="crayon-5cc29f0541547344564183" class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" style="box-sizing: border-box; text-size-adjust: none; width: 747.5px; padding: 0px; margin: 12px 0px; font-family: Monaco, MonacoRegular, &quot;Courier New&quot;, monospace; height: auto; overflow: hidden !important; position: relative !important; direction: ltr !important; border-width: 1px !important; border-color: #999999 !important; border-style: solid !important; text-shadow: none !important; background: rgb(253, 253, 253) !important; font-size: 12px !important; line-height: 15px !important;">
      <div class="crayon-plain-wrap" style="box-sizing: inherit; background: 0px center; border: 0px; padding: 0px !important; margin: 0px !important; height: auto !important;"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="margin: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; color: #000000; overflow: hidden; height: 570px; padding-top: 0px; padding-right: 5px; padding-left: 5px; border-width: 0px; border-style: initial; border-color: initial; border-radius: 0px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; width: 745.5px; resize: none; outline: none; position: absolute; opacity: 0; box-shadow: none; white-space: pre; overflow-wrap: normal; tab-size: 4; z-index: 0; font-size: 12px !important; line-height: 15px !important; font-family: Monaco, MonacoRegular, &quot;Courier New&quot;, monospace !important;"></textarea></div>
      <div class="crayon-main" style="box-sizing: inherit; background: 0px center; border: 0px; padding: 0px; margin: 0px; width: 745.5px; overflow: hidden; position: relative; z-index: 1;">
         <table class="crayon-table" style="box-sizing: inherit; margin-left: 0px; border-spacing: 0px !important; background: none !important; width: auto !important; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; border-width: initial !important; border-style: none !important; border-color: initial !important; padding: 0px !important; table-layout: auto !important;">
            <tbody style="box-sizing: inherit;">
               <tr class="crayon-row" style="box-sizing: inherit; background: 0px center; padding: 0px !important; border: none !important; vertical-align: top !important; margin: 0px !important;">
                  <td class="crayon-nums " data-settings="show" style="box-sizing: inherit; border-width: 0px; border-style: initial; border-color: initial; padding: 0px !important; vertical-align: top !important; margin: 0px !important; background: rgb(223, 239, 255) !important; color: #5499de !important;">
                     <div class="crayon-nums-content" style="box-sizing: inherit; background: 0px center; border: 0px; padding: 0px; margin: 0px; white-space: nowrap; line-height: 15px !important;">
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-1" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">1</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-2" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">2</div>
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-3" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">3</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-4" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">4</div>
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-5" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">5</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-6" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">6</div>
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-7" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">7</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-8" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">8</div>
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-9" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">9</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-10" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">10</div>
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-11" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">11</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-12" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">12</div>
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-13" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">13</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-14" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">14</div>
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-15" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">15</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-16" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">16</div>
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-17" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">17</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-18" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">18</div>
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-19" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">19</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-20" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">20</div>
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-21" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">21</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-22" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">22</div>
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-23" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">23</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-24" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">24</div>
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-25" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">25</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-26" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">26</div>
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-27" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">27</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-28" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">28</div>
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-29" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">29</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-30" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">30</div>
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-31" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">31</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-32" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">32</div>
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-33" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">33</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-34" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">34</div>
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-35" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">35</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-36" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">36</div>
                        <div class="crayon-num" data-line="crayon-5cc29f0541547344564183-37" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">37</div>
                        <div class="crayon-num crayon-striped-num" data-line="crayon-5cc29f0541547344564183-38" style="box-sizing: inherit; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;">38</div>
                        </div>
                     </td>
                  <td class="crayon-code" style="box-sizing: inherit; border-width: 0px; border-style: initial; border-color: initial; background: 0px center; width: 720px; padding: 0px !important; vertical-align: top !important; margin: 0px !important;">
                     <div class="crayon-pre" style="box-sizing: inherit; padding: 0px; margin: 0px; white-space: pre; overflow: visible; tab-size: 4; background: none !important; border: none !important; line-height: 15px !important;">
                        <div class="crayon-line" id="crayon-5cc29f0541547344564183-1" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-t" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #800080 !important;">int</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-v" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #002d7a !important;">valvePin</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-o" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;">=</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-cn" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #ce0000 !important;">4</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">;</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-c" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #ff8000 !important;">// Solenoid valve control pin</span></div>
                        <div class="crayon-line crayon-striped-line" id="crayon-5cc29f0541547344564183-2" style="box-sizing: inherit; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(247, 247, 247) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-t" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #800080 !important;">int</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-v" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #002d7a !important;">buttonPin</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-o" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;">=</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-cn" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #ce0000 !important;">5</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">;</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span class="crayon-c" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #ff8000 !important;">// Button pin</span></div>
                        <div class="crayon-line" id="crayon-5cc29f0541547344564183-3" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-t" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #800080 !important;">int</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-v" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #002d7a !important;">buttonInput</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-o" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;">=</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-cn" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #ce0000 !important;">0</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">;</span></div>
                        <div class="crayon-line crayon-striped-line" id="crayon-5cc29f0541547344564183-4" style="box-sizing: inherit; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(247, 247, 247) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">&nbsp;</div>
                        <div class="crayon-line" id="crayon-5cc29f0541547344564183-5" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">&nbsp;</div>
                        <div class="crayon-line crayon-striped-line" id="crayon-5cc29f0541547344564183-6" style="box-sizing: inherit; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(247, 247, 247) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-t" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #800080 !important;">void</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-e" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #004ed0 !important;">setup</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">(</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">)</span></div>
                        <div class="crayon-line" id="crayon-5cc29f0541547344564183-7" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">{</span></div>
                        <div class="crayon-line crayon-striped-line" id="crayon-5cc29f0541547344564183-8" style="box-sizing: inherit; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(247, 247, 247) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;">&nbsp;&nbsp;</span><span class="crayon-e" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #004ed0 !important;">pinMode</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">(</span><span class="crayon-v" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #002d7a !important;">valvePin</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">,</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-v" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #002d7a !important;">OUTPUT</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">;</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-c" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #ff8000 !important;">// sets the valve pin as output</span></div>
                        <div class="crayon-line" id="crayon-5cc29f0541547344564183-9" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;">&nbsp;&nbsp;</span><span class="crayon-e" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #004ed0 !important;">pinMode</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">(</span><span class="crayon-v" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #002d7a !important;">buttonPin</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">,</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-v" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #002d7a !important;">INPUT</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">;</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-c" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #ff8000 !important;">// sets the button pin as input</span></div>
                        <div class="crayon-line crayon-striped-line" id="crayon-5cc29f0541547344564183-10" style="box-sizing: inherit; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(247, 247, 247) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">}</span></div>
                        <div class="crayon-line" id="crayon-5cc29f0541547344564183-11" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">&nbsp;</div>
                        <div class="crayon-line crayon-striped-line" id="crayon-5cc29f0541547344564183-12" style="box-sizing: inherit; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(247, 247, 247) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-c" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #ff8000 !important;">//===========Functions=====================//</span></div>
                        <div class="crayon-line" id="crayon-5cc29f0541547344564183-13" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-t" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #800080 !important;">void</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-e" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #004ed0 !important;">getButton</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">(</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">)</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">{</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span></div>
                        <div class="crayon-line crayon-striped-line" id="crayon-5cc29f0541547344564183-14" style="box-sizing: inherit; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(247, 247, 247) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;">&nbsp;&nbsp;</span><span class="crayon-v" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #002d7a !important;">buttonInput</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-o" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;">=</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-e" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #004ed0 !important;">digitalRead</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">(</span><span class="crayon-v" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #002d7a !important;">buttonPin</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">;</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-c" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #ff8000 !important;">// Read the button input</span></div>
                        <div class="crayon-line" id="crayon-5cc29f0541547344564183-15" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">}</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span></div>
                        <div class="crayon-line crayon-striped-line" id="crayon-5cc29f0541547344564183-16" style="box-sizing: inherit; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(247, 247, 247) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">&nbsp;</div>
                        <div class="crayon-line" id="crayon-5cc29f0541547344564183-17" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-t" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #800080 !important;">void</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-e" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #004ed0 !important;">openValve</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">(</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">{</span></div>
                        <div class="crayon-line crayon-striped-line" id="crayon-5cc29f0541547344564183-18" style="box-sizing: inherit; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(247, 247, 247) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-e" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #004ed0 !important;">digitalWrite</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">(</span><span class="crayon-v" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #002d7a !important;">valvePin</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">,</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-v" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #002d7a !important;">HIGH</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">;</span></div>
                        <div class="crayon-line" id="crayon-5cc29f0541547344564183-19" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">}</span></div>
                        <div class="crayon-line crayon-striped-line" id="crayon-5cc29f0541547344564183-20" style="box-sizing: inherit; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(247, 247, 247) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">&nbsp;</div>
                        <div class="crayon-line" id="crayon-5cc29f0541547344564183-21" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-t" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #800080 !important;">void</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-e" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #004ed0 !important;">closeValve</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">(</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">{</span></div>
                        <div class="crayon-line crayon-striped-line" id="crayon-5cc29f0541547344564183-22" style="box-sizing: inherit; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(247, 247, 247) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;">&nbsp;&nbsp;</span><span class="crayon-e" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #004ed0 !important;">digitalWrite</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">(</span><span class="crayon-v" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #002d7a !important;">valvePin</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">,</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-v" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #002d7a !important;">LOW</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">;</span></div>
                        <div class="crayon-line" id="crayon-5cc29f0541547344564183-23" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-sy" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;">}</span></div>
                        <div class="crayon-line crayon-striped-line" id="crayon-5cc29f0541547344564183-24" style="box-sizing: inherit; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(247, 247, 247) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;">&nbsp;&nbsp;</span></div>
                        <div class="crayon-line" id="crayon-5cc29f0541547344564183-25" style="box-sizing: inherit; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-c" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #ff8000 !important;">//=================Main Loop===================//</span></div>
                        <div class="crayon-line crayon-striped-line" id="crayon-5cc29f0541547344564183-26" style="box-sizing: inherit; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(247, 247, 247) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-t" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #800080 !important;">void</span><span class="crayon-h" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-e" style="box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #004ed0 !important;">loop</sp