<div class="fusion-page-title-bar fusion-page-title-bar-none fusion-page-title-bar-left" style="box-sizing: border-box; clear: both; padding: 0px 30px; height: 87px; width: 1261px; background-position: center center; background-repeat: no-repeat; border: none; color: #50586b; font-family: IcoMoon, &quot;Nanum Gothic&quot;; font-size: 14px;">
   <div class="fusion-page-title-row" style="box-sizing: border-box; overflow: hidden; margin: 0px auto; height: 87px; max-width: 930px;">
      <div class="fusion-page-title-wrapper" style="box-sizing: border-box; display: table; z-index: 1; position: relative; height: 87px; width: 930px;">
         <div class="fusion-page-title-captions" style="box-sizing: border-box; display: table-cell; vertical-align: middle; width: 930px;">
            <h1 class="entry-title" data-fontsize="20" data-lineheight="NaN" style="box-sizing: border-box; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 20px; line-height: normal; font-family: &quot;Open Sans&quot;, Arial, Helvetica, sans-serif; margin: 0px; padding: 0px; color: #495b7a;">[아두이노 레퍼런스] Serial.write() 함수</h1>
            </div>
         </div>
      </div>
   </div>
<div id="main" class="clearfix " style="box-sizing: border-box; padding: 5px 30px 20px; background: rgb(255, 255, 255); clear: both; color: #50586b; font-family: IcoMoon, &quot;Nanum Gothic&quot;; font-size: 14px;">
   <div class="fusion-row" style="box-sizing: border-box; margin: 0px auto; zoom: 1; max-width: 930px;">
      <div id="content" class="portfolio-one-sidebar" style="box-sizing: border-box; width: 641.688px; float: left; min-height: 1px;">
         <div id="post-7239" class="post post-7239 type-post status-publish format-standard has-post-thumbnail hentry category-arduino category-tutorials tag-serial tag-serial-write tag-298 tag-295" style="box-sizing: border-box; margin-bottom: 65px;">
            <div class="post-content" style="box-sizing: border-box;">
               <p style="box-sizing: border-box; margin-bottom: 20px;">아두이노의 Serial.write() 함수는 &nbsp;<strong style="box-sizing: border-box;">Serial 포트에 하나의 바이트 또는 그 이상의 바이트를 전송</strong>하는데 사용합니다. 주로 데이터 통신을 구현할 때 사용되며&nbsp;<a href="http://www.iamamaker.kr/ko/tutorials/arduino/%EC%95%84%EB%91%90%EC%9D%B4%EB%85%B8-%EB%A0%88%ED%8D%BC%EB%9F%B0%EC%8A%A4-serial-print-%ED%95%A8%EC%88%98/" style="box-sizing: border-box; text-decoration-line: none; color: #50586b;" target="_blank">Serial.print()</a>&nbsp;함수와 구분되어 사용합니다.</p>
               <p style="box-sizing: border-box; margin-bottom: 20px;">Serial.write() 함수는 숫자를 전송할 때&nbsp;<strong style="box-sizing: border-box;">숫자 있는 그대로 전송</strong>합니다. 이는 숫자를 ASCII 코드로 변환하여 전송하는 Serial.print() 함수와 구분되며 일부 매개변수 입력에도 차이가 있습니다.</p>
               <p style="box-sizing: border-box; margin-bottom: 20px;">&nbsp;</p>
               <h3 data-fontsize="19" data-lineheight="32" style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, Arial, Helvetica, sans-serif; margin-top: 0.2em; margin-bottom: 0.5em; font-size: 19px; line-height: 32px;">Serial.write()</h3>
               <p style="box-sizing: border-box; margin-bottom: 20px;">&nbsp;</p>
               <p style="box-sizing: border-box; margin-bottom: 20px;"><em style="box-sizing: border-box;">Serial.write(val);<br style="box-sizing: border-box;" /></em><em style="box-sizing: border-box;">Serial.write(str);<br style="box-sizing: border-box;" /></em><em style="box-sizing: border-box;">Serial.write(buf, len);</em></p>
               <p style="box-sizing: border-box; margin-bottom: 20px;"><strong style="box-sizing: border-box;"><span style="box-sizing: border-box; color: #ffa147;">매개변수(Parameters)</span></strong><br style="box-sizing: border-box;" />val&nbsp;: 1 바이트 데이터(0x00 ~ 0xFF)<br style="box-sizing: border-box;" />str : 문자열(ex ‘A’, “Hello”)<br style="box-sizing: border-box;" />buf : byte형 배열에 저장된 데이터, len 만큼 바이트 전송</p>
               <p style="box-sizing: border-box; margin-bottom: 20px;"><strong style="box-sizing: border-box;"><span style="box-sizing: border-box; color: #ffa147;">반환값(Return)</span></strong><br style="box-sizing: border-box;" />size_t: write() : 전송한 byte 수</p>
               <p style="box-sizing: border-box; margin-bottom: 20px;">&nbsp;</p>
               <div id="crayon-5dd62076ea80e337114635" class="crayon-syntax crayon-theme-monokai crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" style="box-sizing: border-box; text-size-adjust: none; width: 641.688px; 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: #ffae00 !important; text-shadow: none !important; background: rgb(51, 51, 51) !important; border-style: solid !important; font-size: 12px !important; line-height: 17px !important;">
                  <div class="crayon-plain-wrap" style="box-sizing: border-box; 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="-webkit-appearance: none; border-radius: 0px; vertical-align: middle; color: #000000; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; width: 639.688px; overflow: hidden; padding-top: 0px; padding-right: 5px; padding-left: 5px; margin: 0px; height: 221px; position: absolute; opacity: 0; box-shadow: none; white-space: pre; overflow-wrap: normal; resize: none; tab-size: 4; z-index: 0; font-size: 12px !important; line-height: 17px !important; font-family: Monaco, MonacoRegular, &quot;Courier New&quot;, monospace !important;"></textarea></div>
                  <div class="crayon-main" style="box-sizing: border-box; background: 0px center; border: 0px; padding: 0px; margin: 0px; width: 639.688px; overflow: hidden; position: relative; z-index: 1;">
                     <table class="crayon-table" style="box-sizing: border-box; max-width: 100%; margin-left: 0px; background: none !important; border-spacing: 0px !important; border-width: initial !important; border-style: none !important; border-color: initial !important; padding: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-top: 0px !important; width: auto !important; table-layout: auto !important;">
                        <tbody style="box-sizing: border-box;">
                           <tr class="crayon-row" style="box-sizing: border-box; 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: border-box; border-top: 0px; border-bottom: 0px; border-left: 0px; border-right-style: solid !important; border-right-color: #555555 !important; vertical-align: top !important; padding: 0px !important; margin: 0px !important; background: rgb(34, 34, 34) !important; color: #898989 !important;">
                                 <div class="crayon-nums-content" style="box-sizing: border-box; background: 0px center; border: 0px; padding: 0px; margin: 0px; white-space: nowrap; line-height: 17px !important;">
                                    <div class="crayon-num" data-line="crayon-5dd62076ea80e337114635-1" style="box-sizing: border-box; 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-5dd62076ea80e337114635-2" style="box-sizing: border-box; font-family: inherit; background: rgb(40, 40, 40) !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: #979797 !important;">2</div>
                                    <div class="crayon-num" data-line="crayon-5dd62076ea80e337114635-3" style="box-sizing: border-box; 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-5dd62076ea80e337114635-4" style="box-sizing: border-box; font-family: inherit; background: rgb(40, 40, 40) !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: #979797 !important;">4</div>
                                    <div class="crayon-num" data-line="crayon-5dd62076ea80e337114635-5" style="box-sizing: border-box; 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-5dd62076ea80e337114635-6" style="box-sizing: border-box; font-family: inherit; background: rgb(40, 40, 40) !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: #979797 !important;">6</div>
                                    <div class="crayon-num" data-line="crayon-5dd62076ea80e337114635-7" style="box-sizing: border-box; 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-5dd62076ea80e337114635-8" style="box-sizing: border-box; font-family: inherit; background: rgb(40, 40, 40) !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: #979797 !important;">8</div>
                                    <div class="crayon-num" data-line="crayon-5dd62076ea80e337114635-9" style="box-sizing: border-box; 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-5dd62076ea80e337114635-10" style="box-sizing: border-box; font-family: inherit; background: rgb(40, 40, 40) !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: #979797 !important;">10</div>
                                    <div class="crayon-num" data-line="crayon-5dd62076ea80e337114635-11" style="box-sizing: border-box; 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-5dd62076ea80e337114635-12" style="box-sizing: border-box; font-family: inherit; background: rgb(40, 40, 40) !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: #979797 !important;">12</div>
                                    <div class="crayon-num" data-line="crayon-5dd62076ea80e337114635-13" style="box-sizing: border-box; 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>
                                 </td>
                              <td class="crayon-code" style="box-sizing: border-box; border-width: 0px; border-style: initial; border-color: initial; background: 0px center; width: 614px; vertical-align: top !important; padding: 0px !important; margin: 0px !important;">
                                 <div class="crayon-pre" style="box-sizing: border-box; padding: 0px; margin: 0px; white-space: pre; overflow: visible; tab-size: 4; background: none !important; border: none !important; color: #ffffff !important; line-height: 17px !important;">
                                    <div class="crayon-line" id="crayon-5dd62076ea80e337114635-1" style="box-sizing: border-box; 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-r" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">byte</span><span class="crayon-h" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">buff</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">[</span><span class="crayon-cn" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #e7a37a !important;">10</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">]</span><span class="crayon-h" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f92672 !important;">=</span><span class="crayon-h" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">{</span><span class="crayon-h" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #e7a37a !important;">64</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">,</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #e6db74 !important;">'A'</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">,</span><span class="crayon-h" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #e7a37a !important;">0x42</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">,</span><span class="crayon-h" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #e7a37a !important;">67</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">,</span><span class="crayon-h" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #e7a37a !important;">68</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">,</span><span class="crayon-h" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #e7a37a !important;">69</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">,</span><span class="crayon-h" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #e7a37a !important;">70</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">,</span><span class="crayon-h" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #e7a37a !important;">71</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">,</span><span class="crayon-h" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #e7a37a !important;">72</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">,</span><span class="crayon-h" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #e7a37a !important;">73</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">}</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">;</span></div>
                                    <div class="crayon-line crayon-striped-line" id="crayon-5dd62076ea80e337114635-2" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(54, 54, 54) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">&nbsp;</div>
                                    <div class="crayon-line" id="crayon-5dd62076ea80e337114635-3" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #66d9ef !important;">void</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-st" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f92672 !important;">setup</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">(</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">)</span><span class="crayon-h" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">{</span></div>
                                    <div class="crayon-line crayon-striped-line" id="crayon-5dd62076ea80e337114635-4" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(54, 54, 54) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-h" style="box-sizing: border-box; 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-st" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f92672 !important;">Serial</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">.</span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">begin</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">(</span><span class="crayon-cn" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #e7a37a !important;">115200</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">)</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">;</span></div>
                                    <div class="crayon-line" id="crayon-5dd62076ea80e337114635-5" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">}</span></div>
                                    <div class="crayon-line crayon-striped-line" id="crayon-5dd62076ea80e337114635-6" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(54, 54, 54) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">&nbsp;</div>
                                    <div class="crayon-line" id="crayon-5dd62076ea80e337114635-7" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #66d9ef !important;">void</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"></span><span class="crayon-st" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f92672 !important;">loop</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">(</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">)</span><span class="crayon-h" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">{</span></div>
                                    <div class="crayon-line crayon-striped-line" id="crayon-5dd62076ea80e337114635-8" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(54, 54, 54) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-h" style="box-sizing: border-box; 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-st" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f92672 !important;">Serial</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">.</span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">write</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">(</span><span class="crayon-cn" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #e7a37a !important;">64</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">)</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">;</span></div>
                                    <div class="crayon-line" id="crayon-5dd62076ea80e337114635-9" style="box-sizing: border-box; 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: border-box; 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-st" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f92672 !important;">Serial</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">.</span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">write</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">(</span><span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #e6db74 !important;">"abc"</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">)</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">;</span></div>
                                    <div class="crayon-line crayon-striped-line" id="crayon-5dd62076ea80e337114635-10" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(54, 54, 54) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-h" style="box-sizing: border-box; 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-st" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f92672 !important;">Serial</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">.</span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">write</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">(</span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">buff</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">,</span><span class="crayon-h" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #e7a37a !important;">5</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">)</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">;</span></div>
                                    <div class="crayon-line" id="crayon-5dd62076ea80e337114635-11" style="box-sizing: border-box; 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: border-box; 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-st" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f92672 !important;">Serial</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">.</span><span class="crayon-e" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #66d9ef !important;">println</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">(</span><span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #e6db74 !important;">" "</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">)</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">;</span></div>
                                    <div class="crayon-line crayon-striped-line" id="crayon-5dd62076ea80e337114635-12" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; background: rgb(54, 54, 54) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;"><span class="crayon-h" style="box-sizing: border-box; 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-st" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f92672 !important;">delay</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">(</span><span class="crayon-cn" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #e7a37a !important;">1000</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">)</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">;</span></div>
                                    <div class="crayon-line" id="crayon-5dd62076ea80e337114635-13" style="box-sizing: border-box; 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: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #f8f8f2 !important;">}</span></div>
                                    </div>
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               <p style="box-sizing: border-box; margin-bottom: 20px;">위 예제를 아두이노 보드에 업로드하고 시리얼 모니터로 실행 결과를 보면 “@abc$ABCD” 이 반복적으로 출력될 것입니다.</p>
               <p style="box-sizing: border-box; margin-bottom: 20px;">하나씩 살펴보면</p>
               <p style="box-sizing: border-box; margin-bottom: 20px;">시리얼 모니터에서 수신된 &lt;64&gt;를 ASCII 값으로 판단하고 이에 해당하는 문자 ‘@’을 출력합니다. 문자열은 그대로 출력하여 “abc”가 이어서 출력되고 byte형 배열 중 5개의 데이터는 숫자는 ASCII 문자로, 문자는 문자로 출력합니다.</p>
               <p style="box-sizing: border-box; margin-bottom: 20px;">&lt;64&gt;&nbsp;→ ‘@’<br style="box-sizing: border-box;" />“abc”&nbsp;→ “abc”<br style="box-sizing: border-box;" />&lt;36&gt;&nbsp;→ ‘$’<br style="box-sizing: border-box;" />‘A’&nbsp;→ ‘A’<br style="box-sizing: border-box;" />&lt;0x42&gt;&nbsp;→ ‘B’<br style="box-sizing: border-box;" />&lt;67&gt;&nbsp;→ ‘C’<br style="box-sizing: border-box;" />&lt;68&gt;&nbsp;→ ‘D’</p>
               <p style="box-sizing: border-box; margin-bottom: 20px;">&nbsp;<strong style="box-sizing: border-box;"><span style="box-sizing: border-box; color: #ffa147;">참고</span></strong></p>
               <p style="box-sizing: border-box; margin-bottom: 20px;">아두이노 시리얼 모니터는 수신된 데이터를 ASCII 코드의 문자로 변화하여 출력합니다. &nbsp;raw 데이터를 확인하기 위해서는 헥사(16진수) 값 등을 확인할 수 있는 별도의 시리얼 모니터 프로그램을 사용하셔야 합니다.</p>
               </div>
            </div>
         </div>
      </div>
   </div>