<p><span style="color: #404040; font-family: 굴림;">-FND : SR-3156K (엘레파츠구매)&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">-참고 블로그 사이트 :&nbsp;</span><a href="http://knight76.tistory.com/entry/7-segment-fnd-%EC%A0%95%EB%A6%AC" target="_new" style="text-decoration-line: none; color: #3a4e40; font-family: 굴림;">http://knight76.tistory.com/entry/7-segment-fnd-%EC%A0%95%EB%A6%AC</a><span style="color: #404040; font-family: 굴림;">&nbsp;</span></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;">다시 7 segment로 count down(카운트 다운)을 다시 만들려고 하니. 갑갑해졌다.&nbsp;<br />정보도 찾기 힘들고. 이번기회에 정리해야지.<br /><br />7 segment에 대한 좋은 정보는 여기서 확인할 수 있다.<br />anode type, cathod type이 있다는 것을 처음 알았다. 다 같은 녀석인줄 알았더니 아니구나.<br /><br /><a href="http://cafe.naver.com/digiglue.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=25" style="color: #333333; text-decoration-line: none;" target="_blank">http://cafe.naver.com/digiglue.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=25</a>&amp;<br /><br /><br /><br />내가 가지고 있는 제품은 udg-1056A 라는 7 segment이다.<br /><br /></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;">&nbsp;</p>
<div class="imageblock center" style="border: 1px solid rgb(221, 221, 221); padding: 5px 0px; margin: 5px 0px; text-align: center; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff; clear: both;"><span data-url="https://t1.daumcdn.net/cfile/tistory/115E843C4EB1F77D0F?download" data-lightbox="lightbox" style="cursor: pointer;"><img src="https://t1.daumcdn.net/cfile/tistory/115E843C4EB1F77D0F" width="262" alt="" filename="7segment.jpg" filemime="image/jpeg" style="border: 0px; cursor: pointer; max-width: 100%; height: auto;" /></span></div>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;">&nbsp;</p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;">&nbsp;</p>
<div class="imageblock center" style="border: 1px solid rgb(221, 221, 221); padding: 5px 0px; margin: 5px 0px; text-align: center; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff; clear: both;"><span data-url="https://t1.daumcdn.net/cfile/tistory/205E843C4EB1F77D10?download" data-lightbox="lightbox" style="cursor: pointer;"><img src="https://t1.daumcdn.net/cfile/tistory/205E843C4EB1F77D10" width="124" alt="" filename="7segment1.jpg" filemime="image/jpeg" style="border: 0px; cursor: pointer; max-width: 100%; height: auto;" /></span></div>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;">&nbsp;</p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;">&nbsp;</p>
<div class="imageblock center" style="border: 1px solid rgb(221, 221, 221); padding: 5px 0px; margin: 5px 0px; text-align: center; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff; clear: both;"><span data-url="https://t1.daumcdn.net/cfile/tistory/115E843C4EB1F77D11?download" data-lightbox="lightbox" style="cursor: pointer;"><img src="https://t1.daumcdn.net/cfile/tistory/115E843C4EB1F77D11" width="116" alt="" filename="7segment2.jpg" filemime="image/jpeg" style="border: 0px; cursor: pointer; max-width: 100%; height: auto;" /></span></div>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;">&nbsp;</p>
<p><br style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;" /><br style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;" /><br style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;" /><br style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;" /><span style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;">아두이노 핀과 7 segment와 잘 연결한다.&nbsp;</span><br style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;" /><br style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;" /><br style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;" /></p>
<table border="1" cellpadding="2" width="231" align="center" height="253" style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;">
   <tbody>
      <tr>
         <td align="middle"><strong>Arduino Pin</strong></td>
         <td align="middle"><strong>7 Segment Pin Connection<br /></strong></td>
         </tr>
      <tr>
         <td align="middle">&nbsp;2</td>
         <td align="middle">7 (A)<br /></td>
         </tr>
      <tr>
         <td align="middle">&nbsp;3</td>
         <td align="middle">6 (B)<br /></td>
         </tr>
      <tr>
         <td align="middle">&nbsp;4</td>
         <td align="middle">4 (C)</td>
         </tr>
      <tr>
         <td align="middle">&nbsp;5</td>
         <td align="middle">2 (D)<br /></td>
         </tr>
      <tr>
         <td align="middle">&nbsp;6</td>
         <td align="middle">1 (E)</td>
         </tr>
      <tr>
         <td align="middle">&nbsp;7</td>
         <td align="middle">9 (F)</td>
         </tr>
      <tr>
         <td align="middle">&nbsp;8&nbsp;</td>
         <td align="middle">&nbsp;10 (G)</td>
         </tr>
      <tr>
         <td align="middle">&nbsp;9&nbsp;</td>
         <td align="middle">5 (DP)<br /></td>
         </tr>
      </tbody>
   </table>
<p><br style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;" /><br style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;" /><span style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;">8 번 GND과 3.3V connection pin 사이에 저항을 잘 둔다.</span><br style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;" /><br style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;" /></p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;">&nbsp;</p>
<div class="imageblock center" style="border: 1px solid rgb(221, 221, 221); padding: 5px 0px; margin: 5px 0px; text-align: center; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff; clear: both;"><span data-url="https://t1.daumcdn.net/cfile/tistory/172B0B3A4EB1F8F41C?download" data-lightbox="lightbox" style="cursor: pointer;"><img src="https://t1.daumcdn.net/cfile/tistory/172B0B3A4EB1F8F41C" width="600" alt="" filename="IMG_0916.jpg" filemime="image/jpeg" style="border: 0px; cursor: pointer; max-width: 100%; height: auto;" /></span></div>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;">&nbsp;</p>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;"><br /><br /><br />간단한 count down 코드 테스트<br /><br /><br /></p>
<div class="txc-textbox" style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; border-width: 1px; border-style: solid; border-color: #fefeb8; padding: 10px; background-color: #fefeb8;">
   <p>void setup() {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp; pinMode(2, OUTPUT);&nbsp;&nbsp;<br />&nbsp; pinMode(3, OUTPUT);<br />&nbsp; pinMode(4, OUTPUT);<br />&nbsp; pinMode(5, OUTPUT);<br />&nbsp; pinMode(6, OUTPUT);<br />&nbsp; pinMode(7, OUTPUT);<br />&nbsp; pinMode(8, OUTPUT);<br />&nbsp; pinMode(9, OUTPUT);<br />&nbsp; digitalWrite(9, 0);&nbsp; // start with the "dot" off<br />}</p>
   <p>void loop() {<br />&nbsp;// write '9'<br />&nbsp;digitalWrite(2, 0);<br />&nbsp;digitalWrite(3, 0);<br />&nbsp;digitalWrite(4, 0);<br />&nbsp;digitalWrite(5, 1);<br />&nbsp;digitalWrite(6, 1);<br />&nbsp;digitalWrite(7, 0);<br />&nbsp;digitalWrite(8, 0);<br />&nbsp;delay(1000);</p>
   <p>&nbsp;// write '8'<br />&nbsp;digitalWrite(2, 0);<br />&nbsp;digitalWrite(3, 0);<br />&nbsp;digitalWrite(4, 0);<br />&nbsp;digitalWrite(5, 0);<br />&nbsp;digitalWrite(6, 0);<br />&nbsp;digitalWrite(7, 0);<br />&nbsp;digitalWrite(8, 0);<br />&nbsp;delay(1000);<br />&nbsp;<br />&nbsp;// write '7'<br />&nbsp;digitalWrite(2, 0);<br />&nbsp;digitalWrite(3, 0);<br />&nbsp;digitalWrite(4, 0);<br />&nbsp;digitalWrite(5, 1);<br />&nbsp;digitalWrite(6, 1);<br />&nbsp;digitalWrite(7, 1);<br />&nbsp;digitalWrite(8, 1);<br />&nbsp;delay(1000);<br />&nbsp;// write '6'<br />&nbsp;digitalWrite(2, 0);<br />&nbsp;digitalWrite(3, 1);<br />&nbsp;digitalWrite(4, 0);<br />&nbsp;digitalWrite(5, 0);<br />&nbsp;digitalWrite(6, 0);<br />&nbsp;digitalWrite(7, 0);<br />&nbsp;digitalWrite(8, 0);<br />&nbsp;delay(1000);<br />&nbsp;// write '5'<br />&nbsp;digitalWrite(2, 0);<br />&nbsp;digitalWrite(3, 1);<br />&nbsp;digitalWrite(4, 0);<br />&nbsp;digitalWrite(5, 0);<br />&nbsp;digitalWrite(6, 1);<br />&nbsp;digitalWrite(7, 0);<br />&nbsp;digitalWrite(8, 0);<br />&nbsp;delay(1000);</p>
   <p>&nbsp;// write '4'<br />&nbsp;digitalWrite(2, 1);<br />&nbsp;digitalWrite(3, 0);<br />&nbsp;digitalWrite(4, 0);<br />&nbsp;digitalWrite(5, 1);<br />&nbsp;digitalWrite(6, 1);<br />&nbsp;digitalWrite(7, 0);<br />&nbsp;digitalWrite(8, 0);<br />&nbsp;delay(1000);<br />&nbsp;// write '3'<br />&nbsp;digitalWrite(2, 0);<br />&nbsp;digitalWrite(3, 0);<br />&nbsp;digitalWrite(4, 0);<br />&nbsp;digitalWrite(5, 0);<br />&nbsp;digitalWrite(6, 1);<br />&nbsp;digitalWrite(7, 1);<br />&nbsp;digitalWrite(8, 0);<br />&nbsp;delay(1000);<br />&nbsp;// write '2'<br />&nbsp;digitalWrite(2, 0);<br />&nbsp;digitalWrite(3, 0);<br />&nbsp;digitalWrite(4, 1);<br />&nbsp;digitalWrite(5, 0);<br />&nbsp;digitalWrite(6, 0);<br />&nbsp;digitalWrite(7, 1);<br />&nbsp;digitalWrite(8, 0);<br />&nbsp;delay(1000);<br />&nbsp;// write '1'<br />&nbsp;digitalWrite(2, 1);<br />&nbsp;digitalWrite(3, 0);<br />&nbsp;digitalWrite(4, 0);<br />&nbsp;digitalWrite(5, 1);<br />&nbsp;digitalWrite(6, 1);<br />&nbsp;digitalWrite(7, 1);<br />&nbsp;digitalWrite(8, 1);<br />&nbsp;delay(1000);<br />&nbsp;// write '0'<br />&nbsp;digitalWrite(2, 0);<br />&nbsp;digitalWrite(3, 0);<br />&nbsp;digitalWrite(4, 0);<br />&nbsp;digitalWrite(5, 0);<br />&nbsp;digitalWrite(6, 0);<br />&nbsp;digitalWrite(7, 0);<br />&nbsp;digitalWrite(8, 1);<br />&nbsp;delay(4000);</p>
   <p>}<br />&nbsp;<br /></p>
   <br /></div>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;"><br /><br /><br />여기서 배열을 사용한 사례이다.&nbsp;<br /><br /></p>
<div class="txc-textbox" style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; border-width: 1px; border-style: solid; border-color: #fefeb8; padding: 10px; background-color: #fefeb8;">
   <p><br />byte seven_seg_digits[10][7] = { { 0,0,0,0,0,0,1 },&nbsp; // = 0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp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;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp; pinMode(2, OUTPUT);&nbsp;&nbsp;&nbsp;<br />&nbsp; pinMode(3, OUTPUT);<br />&nbsp; pinMode(4, OUTPUT);<br />&nbsp; pinMode(5, OUTPUT);<br />&nbsp; pinMode(6, OUTPUT);<br />&nbsp; pinMode(7, OUTPUT);<br />&nbsp; pinMode(8, OUTPUT);<br />&nbsp; pinMode(9, OUTPUT);<br />&nbsp; writeDot(0);&nbsp; // start with the "dot" off<br />}</p>
   <p>void writeDot(byte dot) {<br />&nbsp; digitalWrite(9, dot);<br />}<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />void sevenSegWrite(byte digit) {<br />&nbsp; byte pin = 2;<br />&nbsp; for (byte segCount = 0; segCount &lt; 7; ++segCount) {<br />&nbsp;&nbsp;&nbsp; digitalWrite(pin, seven_seg_digits[digit][segCount]);<br />&nbsp;&nbsp;&nbsp; ++pin;<br />&nbsp; }<br />}</p>
   <p>void loop() {<br />&nbsp; for (byte count = 10; count &gt; 0; --count) {<br />&nbsp;&nbsp; delay(1000);<br />&nbsp;&nbsp; sevenSegWrite(count - 1);&nbsp;<br />&nbsp; }<br />&nbsp; delay(4000);<br />}</p>
   <br /></div>
<p style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;"><br /><br />idea :&nbsp;<br /><a href="http://www.hacktronics.com/Tutorials/arduino-and-7-segment-led.html" style="color: #333333; text-decoration-line: none;" target="_blank">http://www.hacktronics.com/Tutorials/arduino-and-7-segment-led.html</a><br /><br />내가 쓰고 있는&nbsp;7 segment와 약간 달라서 조금 수정</p>
<p><br style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;" /><br style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;" /><span style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;">출처:&nbsp;</span><a href="https://knight76.tistory.com/entry/7-segment-fnd-%EC%A0%95%EB%A6%AC" style="color: #333333; text-decoration-line: none; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;" target="_blank">https://knight76.tistory.com/entry/7-segment-fnd-정리</a><span style="color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #ffffff;">&nbsp;[김용환 블로그(2004-2018)]</span><br style="color: #404040; font-family: 굴림;" />===============================================================================<br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">-사용예) 예를들어 아래와 같이 연결했을경우,&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">1/E&nbsp; ---&gt;&nbsp; Arduino PIN 2&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">2/D ---&gt;&nbsp; Arduino PIN 3&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">3/DP --&gt; Arduino PIN 4&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">4/C ---&gt;&nbsp; Arduino PIN 5&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">5/G ---&gt;&nbsp; Arduino PIN 6&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">6 ---&gt; Not Connect&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">7/B ---&gt;&nbsp; Arduino PIN 7&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">8/DIG3(or 9, 12 번 DIG선택) ---&gt; Arduino GND&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">10/F ---&gt;&nbsp; Arduino PIN 8&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">11/A&nbsp; --&gt;&nbsp; Arduino PIN 9&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">//물리적으로 DIG핀은 GND와 연결하여 선택한 상태&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">void setup() {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; pinMode(2, OUTPUT);&nbsp;&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; pinMode(3, OUTPUT);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; pinMode(4, OUTPUT);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; pinMode(5, OUTPUT);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; pinMode(6, OUTPUT);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; pinMode(7, OUTPUT);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; pinMode(8, OUTPUT);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; pinMode(9, OUTPUT);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; digitalWrite(9, 0);&nbsp; // start with the "dot" off&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">}&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">void loop() {&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;// write '7'&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;digitalWrite(2, 0);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;digitalWrite(3, 0);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;digitalWrite(4, 1);&nbsp; //C&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;digitalWrite(5, 1);&nbsp; //E&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;digitalWrite(6, 0);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;digitalWrite(7, 1);&nbsp; //B&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;digitalWrite(8, 1);&nbsp; //F&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;digitalWrite(9, 1);&nbsp; //A&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;delay(2000);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp; // write '8'&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;digitalWrite(2, 1);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;digitalWrite(3, 1);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;digitalWrite(4, 1);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;digitalWrite(5, 1);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;digitalWrite(6, 1);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;digitalWrite(7, 1);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;digitalWrite(8, 1);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;digitalWrite(9, 1);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">&nbsp;delay(2000);&nbsp;</span><br style="color: #404040; font-family: 굴림;" /><span style="color: #404040; font-family: 굴림;">}</span></p>