<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">WI FI 테스트에 이어서 이번 포스팅에서는 블루투스 기능을 테스트해 보도록 하겠습니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">ESP8266는 무선 통신으로 와이파이만 지원하지만 ESP32는 와이파이와 함께 블루투스를 사용 가능합니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">마찬가지로 NodeMCU-32S Lua WiFi 보드를 이용해 테스트를 진행하도록 하겠습니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">NodeMCU-32S Lua WiFi&nbsp;</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><a href="https://www.eleparts.co.kr/EPXMDLDY" target="_blank" class="con_link" style="text-decoration-line: none; overflow-wrap: break-word;">https://www.eleparts.co.kr/EPXMDLDY</a></p>
<div align="" style="line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">
   <div class="og" style="display: inline-block; width: 513px; margin-top: 7px; text-align: left; font-family: Dotum; box-shadow: rgb(249, 249, 249) 0px 1px 0px; line-height: 1.5;">
      <div class="box" style="display: inline-block; overflow: hidden; position: relative; width: 513px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; vertical-align: top; line-height: 1.5;">
         <div class="thumb s_size" style="overflow: hidden; position: relative; text-align: center; font-size: 0px; float: left; width: 136px; height: 136px; line-height: 1.5;"><a href="https://www.eleparts.co.kr/EPXMDLDY" target="_blank" class="" style="text-decoration-line: none;"><img src="https://dthumb-phinf.pstatic.net/?src=%22https%3A%2F%2Fimg.eleparts.co.kr%2Fgoods%2F1%2F2019%2F03%2F7480199_tmp_a55551574d8e9f1012135e611fba037c5313large.jpg%22&amp;type=f220" style="border: none; width: 136px;" /><span class="bd" style="display: block; position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px; border: 1px solid rgb(0, 0, 0); opacity: 0.08;"></span></a></div>
         <div class="txt" style="overflow: hidden; width: 336px; height: 134px; padding: 0px 20px; border-width: 1px 1px 1px 0px; border-style: solid; border-color: #e2e2e2; border-image: initial; background: rgb(252, 252, 252); cursor: pointer; float: left; line-height: 1.5;"><a href="https://www.eleparts.co.kr/EPXMDLDY" target="_blank" style="text-decoration-line: none;">
               <div class="tit" style="overflow: hidden; max-height: 40px; margin-top: 17px; font-weight: bold; font-size: 14px; color: #222222; word-break: keep-all; overflow-wrap: break-word; line-height: 1.5;">NodeMCU-32S Lua WiFi - ESP32 개발보드</div>
               <div class="dsc" style="overflow: hidden; max-height: 34px; margin: 8px 0px 3px; font-size: 11px; color: #4f4f4f; letter-spacing: -1px; word-break: keep-all; overflow-wrap: break-word; line-height: 1.5;">ESP32(ESP-WROOM-32)를 탑재하고있는 NodeMCU-32S Lua WiFi 개발보드 아두이노 IDE를 지원하는 Wifi &amp; 블루투스 모듈</div>
               <div class="cp" style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; color: #9197a3; overflow-wrap: normal; line-height: 1.5;">www.eleparts.co.kr</div>
               </a></div>
         </div>
      </div>
   <div align="left" style="line-height: 1.5;"><img src="https://ssl.pstatic.net/static/blank.gif" class="m20" alt="" style="border: none; display: block; width: 1px; height: 20px;" /></div>
   </div>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">시작하기에 앞서 블루투스 동작 확인을 위해 스마트폰에 블루투스 테스트를 위한 앱을 설치해 주어야 합니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">여기서는&nbsp;<b><span style="color: #000000;">nRF Connect for Mobile</span></b>를 설치하여 테스트해 보도록 하겠습니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">위 앱은 구글 플레이 등에서 nrf로 검색해 설치할 수 있습니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><img src="https://blogfiles.pstatic.net/MjAxOTA1MTZfNDAg/MDAxNTU3OTkyMjc5MzI4.jr1PWR7cTX44s_z-SThOLWybD3szJfdvCoGFtSj9Qdog.odI-ocznG3H3Ja3uDcZb0NhO2ohQYCnJkGK8RmTaxGYg.JPEG.elepartsblog/01-1.jpg?type=w2" width="431" height="413" id="MjAxOTA1MTZfNDAg/MDAxNTU3OTkyMjc5MzI4.jr1PWR7cTX44s_z-SThOLWybD3szJfdvCoGFtSj9Qdog.odI-ocznG3H3Ja3uDcZb0NhO2ohQYCnJkGK8RmTaxGYg.JPEG.elepartsblog/01-1.jpg" alt="" class="_photoImage" data-lazy-src="" style="border: 1px solid rgb(0, 0, 0); cursor: pointer; clear: none;" /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">위 앱을 설치해준 뒤 ESP32에 블루투스 예제를 다운로드해 주도록 하겠습니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">아두이노 IDE에서 사용할 예제는 아래 예제입니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><span style="color: #000000;">[예제] -&gt; [ESp32 BLE Arduino] -&gt; [BLE_notify]</span></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><img src="https://blogfiles.pstatic.net/MjAxOTA1MTZfMTYg/MDAxNTU3OTkyMjc5Njgy.mXBrkf7LO27hv3YHbp0WHAGhL1C8Gx12iGwM_1zQuRwg.i2crWBoezI4OUSuYQy6H1stHVgnNF1Xds1v-XfF1ENMg.PNG.elepartsblog/02-1.png?type=w2" width="740" height="483" id="MjAxOTA1MTZfMTYg/MDAxNTU3OTkyMjc5Njgy.mXBrkf7LO27hv3YHbp0WHAGhL1C8Gx12iGwM_1zQuRwg.i2crWBoezI4OUSuYQy6H1stHVgnNF1Xds1v-XfF1ENMg.PNG.elepartsblog/02-1.png" alt="" class="_photoImage" data-lazy-src="" style="border: 1px solid rgb(0, 0, 0); cursor: pointer; clear: none;" /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">코드는 기본적인 블루투스 연결(setup 부분) 및 연결 상태에 따른 동작(loop 부분)으로 구별되는 예제입니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><b>setup</b>에서 참고하실 부분은 &nbsp;<span style="color: #ff0000;"><b>BLEDevice::init("ESP32");</b></span>으로, 해당 값이 타 기기에서 확인 가능한 블루투스 이름으로 설정됩니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><img src="https://blogfiles.pstatic.net/MjAxOTA1MTZfMjE0/MDAxNTU3OTkyMjc5ODc1.alE0jAdZBOfsSUUmnaFWOzatJtlE3IDduYARcf6wuX8g.VEm_JAWbG5Pyg1Ft9shxnZEtXOqTUB7fg230Fh03imIg.PNG.elepartsblog/02-2.png?type=w2" width="678" height="331" id="MjAxOTA1MTZfMjE0/MDAxNTU3OTkyMjc5ODc1.alE0jAdZBOfsSUUmnaFWOzatJtlE3IDduYARcf6wuX8g.VEm_JAWbG5Pyg1Ft9shxnZEtXOqTUB7fg230Fh03imIg.PNG.elepartsblog/02-2.png" alt="" class="_photoImage" data-lazy-src="" style="border: 1px solid rgb(0, 0, 0); cursor: pointer; clear: none;" /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><b>setup&nbsp;</b>부분은 따로 손대지 않고&nbsp;<b>loop&nbsp;</b>부분에서만 코드를 살짝 수정해 주도록 하겠습니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">아래가 기본&nbsp;<b>loop&nbsp;</b>구문으로 3개의 if 문에 각각 알림, 연결 끊김, 연결됨에 해당하는 동작이 설정되어 있습니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><img src="https://blogfiles.pstatic.net/MjAxOTA1MTZfMTkg/MDAxNTU3OTkyMjgwMTAy.mkSiRPvL5TXgc1qTN-6_70g9HWanpgvvrQAQY3ESagYg.csuTSxrJsLCjaSAGpL0i8UkGHK7x910EGqW20E8Lr6gg.PNG.elepartsblog/03-1.png?type=w2" width="614" height="383" id="MjAxOTA1MTZfMTkg/MDAxNTU3OTkyMjgwMTAy.mkSiRPvL5TXgc1qTN-6_70g9HWanpgvvrQAQY3ESagYg.csuTSxrJsLCjaSAGpL0i8UkGHK7x910EGqW20E8Lr6gg.PNG.elepartsblog/03-1.png" alt="" class="_photoImage" data-lazy-src="" style="border: 1px solid rgb(0, 0, 0); cursor: pointer; clear: none;" /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">위 코드에 각각 동작 테스트를 위한 시리얼 출력을 추가해 주도록 하겠습니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">또한, 블루투스 알림 전송 주기가&nbsp;<span style="color: #ff0000;"><b>3ms</b></span>로 설정되어 있는데 이를 좀 늦추도록 하겠습니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">아래가 변경된 코드입니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><img src="https://blogfiles.pstatic.net/MjAxOTA1MTZfNDkg/MDAxNTU3OTkyMjgwMzUz.2meaA1cydN8L84hMl4KSTpXmgzCwp-n93JITJaAawMwg._blW3ISFredLZPc9HAdwe0ybCbUM-i6qgHm6Gpte5U0g.PNG.elepartsblog/03-2.png?type=w2" width="695" height="439" id="MjAxOTA1MTZfNDkg/MDAxNTU3OTkyMjgwMzUz.2meaA1cydN8L84hMl4KSTpXmgzCwp-n93JITJaAawMwg._blW3ISFredLZPc9HAdwe0ybCbUM-i6qgHm6Gpte5U0g.PNG.elepartsblog/03-2.png" alt="" class="_photoImage" data-lazy-src="" style="border: 1px solid rgb(0, 0, 0); cursor: pointer; clear: none;" /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">알림 부분에서 value++; 전에 아래의 구문을 추가해 준 뒤 딜레이를 늘려줍니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><b><span style="color: #ff0000;">Serial.println(value, HEX);&nbsp;</span></b></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">그리고 disconnecting 및 connecting 안내를 시리얼 출력으로 추가해 주시면 됩니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><span style="color: #ff0000;"><b>Serial.println("disconnecting");</b></span></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><span style="color: #ff0000;"><b>Serial.println("connecting");</b></span></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">이제 컴파일을 한 뒤<b>&nbsp;nRF Connect</b>&nbsp;앱을 실행시켜 줍니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">앱을 켜면 자동으로 스캔을 시도하며, 만일 스캔이 되지 않은 경우 빨간 화살표 부분의 글자가 SCAN 일 때 해당 글자를 눌러 주시면 됩니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><img src="https://blogfiles.pstatic.net/MjAxOTA1MTZfMjg1/MDAxNTU3OTkyMjgwNjY3.MwChW9AzIyAn25HMyWnDpc41WR4DEA5j-GeJ0Utpk_kg.twzUKvXMPpWLsDJrbeV-oslvvyyENZT9o-YwUNjNbVsg.JPEG.elepartsblog/04-1.jpg?type=w2" width="432" height="579" id="MjAxOTA1MTZfMjg1/MDAxNTU3OTkyMjgwNjY3.MwChW9AzIyAn25HMyWnDpc41WR4DEA5j-GeJ0Utpk_kg.twzUKvXMPpWLsDJrbeV-oslvvyyENZT9o-YwUNjNbVsg.JPEG.elepartsblog/04-1.jpg" alt="" class="_photoImage" data-lazy-src="" style="border: 1px solid rgb(0, 0, 0); cursor: pointer; clear: none;" /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">오류 등으로 스캔이 잘 되지 않는 것 같다면 우측 상단 점 세 개(메뉴)를 눌러 Refresh를 해 주시면 스캔 결과가 리셋됩니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">검색이 된 경우 ESP32로 적힌 기기를 발견할 수 있으며, 우측의 CONNECT를 눌러 연결해 주시면 됩니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">아래는 ESP32 연결 화면입니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><img src="https://blogfiles.pstatic.net/MjAxOTA1MTZfNzkg/MDAxNTU3OTkyMjgwOTA4.sbHtqP9IywT604vHgKNhW9rUG9gaM75-v9ZCt-IzyxYg.Jqq4L4BGmBYzVDZE8WciwthQW4fvEc9K1o424T62sK0g.JPEG.elepartsblog/04-2.jpg?type=w2" width="431" height="585" id="MjAxOTA1MTZfNzkg/MDAxNTU3OTkyMjgwOTA4.sbHtqP9IywT604vHgKNhW9rUG9gaM75-v9ZCt-IzyxYg.Jqq4L4BGmBYzVDZE8WciwthQW4fvEc9K1o424T62sK0g.JPEG.elepartsblog/04-2.jpg" alt="" class="_photoImage" data-lazy-src="" style="border: 1px solid rgb(0, 0, 0); cursor: pointer; clear: none;" /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">빨간 원 부분에 연결된 기기명을 확인 가능하며 사각형 부분의 UUID가 예제 코드에 정의되어있는 값과 동일한 것을 확인 가능합니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">&gt; 예제코드의 UUID 정의부분</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><img src="https://blogfiles.pstatic.net/MjAxOTA1MTZfMTI0/MDAxNTU3OTkyMjgxMTcz.KmQT0P78rWnGIRE_zSwYZ3TBqRM1FhwmiXryQNAQeYIg.RsOtr2Pj9k5V6i2VPfzu28N75RHTNXnUPIJqcgAejQQg.PNG.elepartsblog/04-2-.png?type=w2" width="591" height="145" id="MjAxOTA1MTZfMTI0/MDAxNTU3OTkyMjgxMTcz.KmQT0P78rWnGIRE_zSwYZ3TBqRM1FhwmiXryQNAQeYIg.RsOtr2Pj9k5V6i2VPfzu28N75RHTNXnUPIJqcgAejQQg.PNG.elepartsblog/04-2-.png" alt="" class="_photoImage" data-lazy-src="" style="border: 1px solid rgb(0, 0, 0); cursor: pointer; clear: none;" /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">접속 상태는 원 상단의 DISCONNECT 버튼을 눌려 끊을 수 있습니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">연결을 끊으면 DISCONNECT 버튼이 CONNECT 버튼으로 바뀌며, 다시 누르면 연결됩니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">위에서 시리얼 출력을 추가해 주었으므로 시리얼 모니터를 확인하시면 아래와 같이 로그가 생성됩니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><img src="https://blogfiles.pstatic.net/MjAxOTA1MTZfMjIw/MDAxNTU3OTkyMjgxNDE1.lG18puA_XeFmpYdoAyWYH4FX2vvgfJFS_HKfMWvrg9sg.ECLaP0BhpZPIgmrW_HXwaQX_lBgzgMyw0CMy2xoIZCEg.PNG.elepartsblog/04-2-2.png?type=w2" width="648" height="244" id="MjAxOTA1MTZfMjIw/MDAxNTU3OTkyMjgxNDE1.lG18puA_XeFmpYdoAyWYH4FX2vvgfJFS_HKfMWvrg9sg.ECLaP0BhpZPIgmrW_HXwaQX_lBgzgMyw0CMy2xoIZCEg.PNG.elepartsblog/04-2-2.png" alt="" class="_photoImage" data-lazy-src="" style="border: 1px solid rgb(0, 0, 0); cursor: pointer; clear: none;" /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><span style="color: #ff0000;">※ 좌측 [(시간표시) -&gt;]는 타임 스태프 표시 옵션을 켜두면 표시됩니다.</span></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">숫자 0,1,2는 notify로 전송되는 값이며 아래에서 확인하는 방법을 보도록 하겠습니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">Unknown Service 부분을 누르면 창이 확장되며, 데이터 수신 버튼이 생성됩니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><img src="https://blogfiles.pstatic.net/MjAxOTA1MTZfMTk0/MDAxNTU3OTkyMjgxNjI4.JEqAfnKi68NMDTkDhAstVPaDwh7MtptPxfTIlwtDD4Qg.O9eb8UpFtyM-if3MvziU41kBCZ7smAgaYKTCYmfm5icg.JPEG.elepartsblog/04-3.jpg?type=w2" width="430" height="592" id="MjAxOTA1MTZfMTk0/MDAxNTU3OTkyMjgxNjI4.JEqAfnKi68NMDTkDhAstVPaDwh7MtptPxfTIlwtDD4Qg.O9eb8UpFtyM-if3MvziU41kBCZ7smAgaYKTCYmfm5icg.JPEG.elepartsblog/04-3.jpg" alt="" class="_photoImage" data-lazy-src="" style="border: 1px solid rgb(0, 0, 0); cursor: pointer; clear: none;" /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">위의&nbsp;<span style="color: #ff0000;"><b>빨간 원 부분이 데이터 수신(1회 / 연속) 버튼</b></span>입니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">해당 버튼을 누르면<b><span style="color: #0075c8;">&nbsp;파란 사각형 부분에 ESP32가 블루투스 notify로 보내는 값이 표시</span></b>됩니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">ESP32에서는 수신 여부와 관계없이 주기적으로 데이터를 보내고 있으므로 1회 수신을 누를 때마다 값이 쭉쭉 커지는 것을 확인 가능합니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">연속 수신 버튼을 누른 뒤 ESP32의 시리얼 모니터를 확인하시면 송신 데이터가 동일하게 올라가는 것을 확인하실 수 있습니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><img src="https://blogfiles.pstatic.net/MjAxOTA1MTZfMjEw/MDAxNTU3OTkyMjgxOTU5.rtUcFwBWHiUTLSUsz7-cUgHxF6P2lA7gjFBP4SgdNU8g.-rJlgV9G2fV8y4yKGtLYcBv0Z5mTDB7qPPVrLbw6UxQg.PNG.elepartsblog/04-3-2.png?type=w2" width="740" height="291" id="MjAxOTA1MTZfMjEw/MDAxNTU3OTkyMjgxOTU5.rtUcFwBWHiUTLSUsz7-cUgHxF6P2lA7gjFBP4SgdNU8g.-rJlgV9G2fV8y4yKGtLYcBv0Z5mTDB7qPPVrLbw6UxQg.PNG.elepartsblog/04-3-2.png" alt="" class="_photoImage" data-lazy-src="" style="border: 1px solid rgb(0, 0, 0); cursor: pointer; clear: none;" /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><span style="color: #ff0000;">※ 시리얼 모니터의 값이 123456이면 앱의 value는 56-34-12 형태로 표시됩니다.</span></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">간단히 확인 가능한 데이터 송신 예제는 이것으로 마치도록 하겠습니다.</p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;"><br /></p>
<p style="padding: 0px; line-height: 1.5; color: #557a74; font-family: 돋움; text-align: justify; background-color: #ffffff;">이외에도 다른 BLE 예제를 nRF 앱으로 테스트하시면 스마트폰에서 ESP32로 데이터를 보내는 예제 코드 등을 확인해 보실 수 있습니다.</p>
<p>
   <p>&nbsp;</p>
   </p>
<div class="autosourcing-stub-extra" style="line-height: 1.5; zoom: 1; opacity: 1;">
   <p style="margin: 11px 0px 7px; padding: 0px; line-height: 1.5; font-size: 12px; font-family: Dotum; font-style: normal; font-weight: normal;"><strong style="padding: 0px 7px 0px 0px;">[출처]</strong><span>&nbsp;</span><a href="https://blog.naver.com/elepartsblog/221539140298" target="_blank" style="text-decoration: none;">ESP32 사용해보기 - 04. 블루투스 예제 동작 테스트</a><span style="padding: 0px 7px 0px 5px;">|</span><strong style="padding: 0px 7px 0px 0px;">작성자</strong><span>&nbsp;</span><a href="https://blog.naver.com/elepartsblog" target="_blank" style="text-decoration: none;">미디어엘레파츠</a></p>
   </div>