INSERT INTO `g5_write_tech` VALUES (289,-289,'',289,0,0,'','','html1','[Arduino] HM-11 관련','<p><span style=\"background-color: #ffffff; color: #454545; font-family: Raleway, Arial, sans-serif; font-size: 24px; letter-spacing: 1px;\">비컨 DIY와 활용: 미아방지 목걸이 만들기</span></p>\r\n<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;\">\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">비컨 관련된 기술이, 그 중 특히 iBeacon이 근래들어 주목을 받긴 했지만 아직 일반에 보급되진 못하고 있습니다. 대기업을 포함한 여러 IT 업체들이 사전 작업을 하고 있지만 가시적인 움직임은 아직 지지부진 합니다. 주변에 깔린 비컨 기기도 거의 없구요. 그래서 더욱 메이커가 도전해 볼만한 분야가 아닌가 합니다.</p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">비컨은 굉장히 간단한 기술이라 비교적 쉽게 활용할 수 있는 기술입니다. Bluetooth Low Energy를 활용해서 UUID, Major, Minor 등등 비컨 기기의 고유 ID와 카테고리 전송파워와 같은 정보를 주변에 broadcast 해줄 뿐입니다. 이걸 휴대폰 앱에서 받아서 원하는 처리를 하면 됩니다. 비컨을 활용해서 어떤 서비스를 만들 것인가에 대한 아이디어가 중요합니다.</p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">여기서는 비컨 기기를 직접 만들고 활용하는 방법에 대해서 적어보려고 합니다. iBeacon을 지원하는 BLE(Bluetooth Low Energy) 모듈을 이용해서 비컨을 만들고 만든 비컨을 목걸이 형태로 제작해서 ‘미아방지 목걸이’로 활용하는 방법입니다.</p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">&nbsp;</p>\r\n   <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. 비컨 만들기 준비물</strong></h1>\r\n   <h4 style=\"box-sizing: inherit; font-family: Raleway, Arial, sans-serif; line-height: 1; color: #454545; margin: 15px 0px 10px; font-size: 18px; clear: both;\"><strong style=\"box-sizing: inherit;\"># BLE 모듈</strong></h4>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">Ebay, Aliexpress 등에서 ‘ibeacon module’로 검색하면 각종 iBeacon 모듈들을 보실 수 있습니다. 제가 사용한 BLE 모듈은 아래와 같습니다.</p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\"><a href=\"http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/09/ble_12.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 wp-image-1092 size-medium\" src=\"http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/09/ble_12-300x300.jpg\" alt=\"ble_12\" width=\"300\" srcset=\"http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/09/ble_12-300x300.jpg 300w, http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/09/ble_12-150x150.jpg 150w, http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/09/ble_12-100x100.jpg 100w, http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/09/ble_12.jpg 500w\" sizes=\"(max-width: 300px) 100vw, 300px\" style=\"box-sizing: inherit; border: 0px; vertical-align: middle; max-width: 100%; height: auto; margin-top: 20px; margin-bottom: 20px;\" /></a></p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\"><span style=\"box-sizing: inherit; color: #000000;\">TI-CC2540 칩을 사용하고 HM-10 모듈로 판매되는 제품과 호환됩니다. 원래 목적은 BLE 통신용이지만 최신 펌웨어에서&nbsp;iBeacon 모드를 지원하기 때문에 비컨으로 활용하실 수 있습니다. [</span><strong style=\"box-sizing: inherit;\"><a href=\"http://www.ebay.com/itm/231189452585?_trksid=p2059210.m2749.l2649&amp;ssPageName=STRK%3AMEBIDX%3AIT\" target=\"_blank\" data-cke-saved-href=\"http://www.ebay.com/itm/231189452585?_trksid=p2059210.m2749.l2649&amp;ssPageName=STRK%3AMEBIDX%3AIT\" style=\"box-sizing: inherit; background-color: transparent; color: #0782c1; text-decoration-line: none; transition: color 0.35s ease 0s;\"><span style=\"box-sizing: inherit; color: #000000;\">링크</span></a></strong><span style=\"box-sizing: inherit; color: #000000;\">]로 가시면 제품에 대한 상세 스펙과 가격을 확인하실 수 있습니다. 아직 제품이 많이 사용되지는 않아서인지 가격이 15$ 내외에 형성되어 있습니다.(HM-10으로 검색하시면 훨씬 저렴한 모듈들도 많습니다.)</span></p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\"><span style=\"box-sizing: inherit; color: #000000;\">위 사진에서 보시다시피 모듈이 인터페이스 보드에 붙어있는 제품을 사시는 것이 처음에 테스트 할 때는 편하실겁니다. 충분히 테스트를 마치고나면 인터페이스 보드 제거하고 사용하시면 됩니다. (대신 3.3v 전원을 사용해야하고 납땜이 굉장히 어렵습니다)</span></p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\"><span style=\"box-sizing: inherit; color: #000000;\">• BT Version: Bluetooth Specification V4.0 BLE</span><br style=\"box-sizing: inherit; color: #6e6e6e;\" /><span style=\"box-sizing: inherit; color: #000000;\">• Send and receive no bytes limit</span><br style=\"box-sizing: inherit; color: #6e6e6e;\" /><span style=\"box-sizing: inherit; color: #000000;\">• Working frequency: 2.4GHz ISM band</span><br style=\"box-sizing: inherit; color: #6e6e6e;\" /><span style=\"box-sizing: inherit; color: #000000;\">• Modulation method: GFSK(Gaussian Frequency Shift Keying)</span><br style=\"box-sizing: inherit; color: #6e6e6e;\" /><span style=\"box-sizing: inherit; color: #000000;\">• RF Power: 0.01mw-5mw, can modify through AT&nbsp;</span><span style=\"box-sizing: inherit; color: #000000;\">Command</span><br style=\"box-sizing: inherit; color: #6e6e6e;\" /><span style=\"box-sizing: inherit; color: #000000;\">• Speed: Asynchronous: 6K Bytes, Synchronous: 6K Bytes</span><br style=\"box-sizing: inherit; color: #6e6e6e;\" /><span style=\"box-sizing: inherit; color: #000000;\">• Security: Authentication and encryption</span><br style=\"box-sizing: inherit; color: #6e6e6e;\" /><span style=\"box-sizing: inherit; color: #000000;\">• Service: Central &amp; Peripheral UUID FFE0,FFE1</span><br style=\"box-sizing: inherit; color: #6e6e6e;\" /><span style=\"box-sizing: inherit; color: #000000;\">• Power: +3.3VDC 50mA</span><br style=\"box-sizing: inherit; color: #6e6e6e;\" /><span style=\"box-sizing: inherit; color: #000000;\">• Open space have 100 Meters with iphone4s</span><br style=\"box-sizing: inherit; color: #6e6e6e;\" /><span style=\"box-sizing: inherit; color: #000000;\">• Power: In sleep mode 400uA~1.5mA, Active mode 8.5mA.</span><br style=\"box-sizing: inherit; color: #6e6e6e;\" /><span style=\"box-sizing: inherit; color: #000000;\">• Working temperature:–5 ~ +65 Centigrade</span><br style=\"box-sizing: inherit; color: #6e6e6e;\" /><span style=\"box-sizing: inherit; color: #000000;\">• Dimension: 26.9mm x 13mm x 2.2mm</span></p>\r\n   <h4 style=\"box-sizing: inherit; font-family: Raleway, Arial, sans-serif; line-height: 1; color: #454545; margin: 15px 0px 10px; font-size: 18px; clear: both;\"><a href=\"http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/10/hm_10.png\" style=\"box-sizing: inherit; background-color: transparent; color: #454545; text-decoration-line: none; transition: color 0.35s ease 0s;\" target=\"_blank\"><img class=\"alignnone size-full wp-image-1124\" src=\"http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/10/hm_10.png\" alt=\"hm_10\" width=\"565\" srcset=\"http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/10/hm_10.png 565w, http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/10/hm_10-300x165.png 300w\" sizes=\"(max-width: 565px) 100vw, 565px\" style=\"box-sizing: inherit; border: 0px; vertical-align: middle; max-width: 100%; height: auto; margin-top: 20px; margin-bottom: 20px;\" /></a></h4>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">&nbsp;</p>\r\n   <h4 style=\"box-sizing: inherit; font-family: Raleway, Arial, sans-serif; line-height: 1; color: #454545; margin: 15px 0px 10px; font-size: 18px; clear: both;\"><strong style=\"box-sizing: inherit;\"># 코인 배터리</strong></h4>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">BLE 자체가 저전력 블루투스 이므로 코인 배터리로도 1~2년의 동작시간을 확보할 수 있도록 설계되어 있습니다.&nbsp;제가 사용한 BLE 모듈은 auto sleep 모드에서 평균 0.18mA의 전력을 소비합니다. 알카라인 전지 3개가 1800mAh 라고 가정하면 약 10,000 시간을 버틸 수 있고, 1년이 넘게 사용 가능합니다. 크기를 위해 240mAh CR2032 코인 전지를 사용하면 약 55일을 사용할 수 있습니다. 아래 가이드대로&nbsp;&nbsp;iBeacon 전용 모드로 설정할 경우 소비전력이 좀 더 줄어서 더 오래갈 것으로 예상합니다.</p>\r\n   <h4 style=\"box-sizing: inherit; font-family: Raleway, Arial, sans-serif; line-height: 1; color: #454545; margin: 15px 0px 10px; font-size: 18px; clear: both;\"><strong style=\"box-sizing: inherit;\"># 코일 배터리 홀더</strong></h4>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">코인배터리를 적당히 고정시킬 수 있는 홀더를 구매하거나 만듭니다.</p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">&nbsp;</p>\r\n   <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>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">BLE 모듈을 구하시면 먼저 비컨 기기로 바꾸는 과정을 거쳐야 합니다.&nbsp;<span style=\"box-sizing: inherit; color: #ff0000;\"><strong style=\"box-sizing: inherit;\">AT command</strong></span>&nbsp;라고 부르는 명령어를 serial 통신으로 전송하면 블루투스 모듈 내부 설정을 변경할 수 있습니다.</p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\"><strong style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit; color: #ff0000;\">주의!! :</span><span style=\"box-sizing: inherit; color: #000000;\">&nbsp;BLE 모듈을 iBeacon으로 바꿔주는 AT command 는 최신 펌웨어에서 제공합니다. 따라서 모듈을 구매하실 때 iBeacon 모드를&nbsp;지원하는지 seller 에게 문의해 보는 것이 좋습니다. 2014년 9월 최신 펌웨어 버전은 v531 입니다. 문서상으로 볼 때 v529 (14년 6월) 이상이 되어야 할 듯 합니다.</span></strong></p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">AT command를 보내는 방법은 여러가지가 있는데.. FTDI(USB to UART) 모듈을 통해서 PC와 연결한 뒤 PC에서 전용 프로그램으로 할 수 있고, 블루투스로&nbsp;<a href=\"http://www.jnhuamao.cn/showNews.asp?id=63\" target=\"_blank\" style=\"box-sizing: inherit; background-color: transparent; color: #009688; text-decoration-line: none; transition: color 0.35s ease 0s;\"><strong style=\"box-sizing: inherit;\">휴대폰 앱과 연결</strong></a>해서 앱에서도 가능합니다. 여기서는 아두이노를 이용해서 AT command를 전송하고 설정을 변경해 보겠습니다.</p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px; color: #525252;\"><span style=\"box-sizing: inherit; color: #000000;\">아두이노는 PC와 연결된 상태에서(USB serial 로) D2, D3 핀을 이용해서 블루투스 모듈과 연결합니다. 그리고 블루투스 모듈과의 통신은 SoftwareSerial을 사용합니다.</span></p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px; color: #525252;\"><strong style=\"box-sizing: inherit;\">연결방법 :</strong>&nbsp;(<strong style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit; color: #ff0000;\">아두이노&nbsp;</span>-&gt; BLE 모듈</strong>)&nbsp;<strong style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit; color: #ff0000;\">D2&nbsp;</span>-&gt; TX, &nbsp;<span style=\"box-sizing: inherit; color: #ff0000;\">D3&nbsp;</span>-&gt; RX, &nbsp;<span style=\"box-sizing: inherit; color: #ff0000;\">5V&nbsp;</span>-&gt; VCC, &nbsp;<span style=\"box-sizing: inherit; color: #ff0000;\">GND&nbsp;</span>-&gt; GND</strong></p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px; color: #525252;\"><span style=\"box-sizing: inherit; color: #000000;\">만약 인터페이스 보드 없는 HM-10 모듈을 사용하신다면 아래 이미지를 참고하셔서 연결하세요.</span></p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px; color: #525252;\"><a href=\"http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/10/hm_10_conn.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 wp-image-1123 size-full\" src=\"http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/10/hm_10_conn.png\" alt=\"hm_10_conn\" width=\"579\" srcset=\"http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/10/hm_10_conn.png 579w, http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/10/hm_10_conn-300x201.png 300w, http://www.hardcopyworld.com/ngine/aduino/wp-content/uploads/sites/3/2014/10/hm_10_conn-90x60.png 90w\" sizes=\"(max-width: 579px) 100vw, 579px\" style=\"box-sizing: inherit; border: 0px; vertical-align: middle; max-width: 100%; height: auto; margin-top: 20px; margin-bottom: 20px;\" /></a></p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px; color: #525252;\"><span style=\"box-sizing: inherit; color: #000000;\">그리고 아두이노에 아래 소스코드를 올립니다.</span></p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">&nbsp;</p>\r\n   <div id=\"crayon-5cc29e31b4231085225143\" 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;\">\r\n      <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: 360px; 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>\r\n      <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;\">\r\n         <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;\">\r\n            <tbody style=\"box-sizing: inherit;\">\r\n               <tr class=\"crayon-row\" style=\"box-sizing: inherit; background: 0px center; padding: 0px !important; border: none !important; vertical-align: top !important; margin: 0px !important;\">\r\n                  <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;\">\r\n                     <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;\">\r\n                        <div class=\"crayon-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5cc29e31b4231085225143-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>\r\n                        </div>\r\n                     </td>\r\n                  <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;\">\r\n                     <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;\">\r\n                        <div class=\"crayon-line\" id=\"crayon-5cc29e31b4231085225143-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-p\" style=\"box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #b85c00 !important;\">#include &lt;SoftwareSerial.h&gt;</span></div>\r\n                        <div class=\"crayon-line crayon-striped-line\" id=\"crayon-5cc29e31b4231085225143-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;\">&nbsp;</div>\r\n                        <div class=\"crayon-line\" id=\"crayon-5cc29e31b4231085225143-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-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;\">SoftwareSerial </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;\">mySerial</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-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;\">2</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-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;\">3</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;\">// RX, TX</span></div>\r\n                        <div class=\"crayon-line crayon-striped-line\" id=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-line\" id=\"crayon-5cc29e31b4231085225143-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;\"><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><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>\r\n                        <div class=\"crayon-line crayon-striped-line\" id=\"crayon-5cc29e31b4231085225143-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-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>\r\n                        <div class=\"crayon-line\" id=\"crayon-5cc29e31b4231085225143-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-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-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;\">// Open serial communications and wait for port to open:</span></div>\r\n                        <div class=\"crayon-line crayon-striped-line\" id=\"crayon-5cc29e31b4231085225143-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-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;\">Serial</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-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;\">begin</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-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;\">9600</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>\r\n                        <div class=\"crayon-line\" id=\"crayon-5cc29e31b4231085225143-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-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;\">Serial</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-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;\">println</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-s\" style=\"box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #008000 !important;\">\"Goodnight moon!\"</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>\r\n                        <div class=\"crayon-line crayon-striped-line\" id=\"crayon-5cc29e31b4231085225143-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;\">&nbsp;</div>\r\n                        <div class=\"crayon-line\" id=\"crayon-5cc29e31b4231085225143-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;\"><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-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;\">// set the data rate for the SoftwareSerial port</span></div>\r\n                        <div class=\"crayon-line crayon-striped-line\" id=\"crayon-5cc29e31b4231085225143-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-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;\">mySerial</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-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;\">begin</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-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;\">9600</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>\r\n                        <div class=\"crayon-line\" id=\"crayon-5cc29e31b4231085225143-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-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>\r\n                        <div class=\"crayon-line crayon-striped-line\" id=\"crayon-5cc29e31b4231085225143-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;\">&nbsp;</div>\r\n                        <div class=\"crayon-line\" id=\"crayon-5cc29e31b4231085225143-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-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</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;\">// run over and over</span></div>\r\n                        <div class=\"crayon-line crayon-striped-line\" id=\"crayon-5cc29e31b4231085225143-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;\"><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>\r\n                        <div class=\"crayon-line\" id=\"crayon-5cc29e31b4231085225143-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-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-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;\">// Receive from bluetooth and send it to PC</span></div>\r\n                        <div class=\"crayon-line crayon-striped-line\" id=\"crayon-5cc29e31b4231085225143-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;</span><span class=\"crayon-st\" style=\"box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #800080 !important;\">if</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-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;\">mySerial</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-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;\">available</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>\r\n                        <div class=\"crayon-line\" id=\"crayon-5cc29e31b4231085225143-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-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-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;\">Serial</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-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;\">write</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;\">mySerial</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-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;\">read</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><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>\r\n                        <div class=\"crayon-line crayon-striped-line\" id=\"crayon-5cc29e31b4231085225143-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>\r\n                        <div class=\"crayon-line\" id=\"crayon-5cc29e31b4231085225143-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-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-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;\">// Receive from PC and send it to bluetooth</span></div>\r\n                        <div class=\"crayon-line crayon-striped-line\" id=\"crayon-5cc29e31b4231085225143-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-st\" style=\"box-sizing: inherit; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #800080 !important;\">if</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-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;\">Serial</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-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;\">available</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>\r\n                        <div class=\"crayon-line\" id=\"crayon-5cc29e31b4231085225143-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-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-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;\">mySerial</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-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;\">write</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;\">Serial</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-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;\">read</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><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>\r\n                        <div class=\"crayon-line crayon-striped-line\" id=\"crayon-5cc29e31b4231085225143-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-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>\r\n                        </div>\r\n                     </td>\r\n                  </tr>\r\n               </tbody>\r\n            </table>\r\n         </div>\r\n      </div>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">&nbsp;</p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px; color: #525252;\"><span style=\"box-sizing: inherit; color: #000000;\">소스를 보시면 아시겠지만 간단한 에코 시스템 만드는겁니다. USB를 통해 PC에서 받은 데이터를 BLE 모듈로 보내주고, BLE에서 받은 데이터는 PC로 보내주는 코드입니다. 이 코드를 컴파일해서 올리고&nbsp;<strong style=\"box-sizing: inherit;\">[아두이노 IDE -&gt; 도구 -&gt;&nbsp;<span style=\"box-sizing: inherit; color: #ff0000;\">시리얼 모니터</span>]</strong>&nbsp;를 실행하면 시리얼 모니터에 입력하는 값이 BLE로 전송되고 BLE에서 전송받은 데이터가 아래에 표시됩니다. 시리얼 모니터를 이용해서 AT Command를 전송하면 BLE 모듈을 설정할 수 있습니다.</span></p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px; color: #525252;\"><span style=\"box-sizing: inherit; color: #000000;\">비컨이 정상적으로 설정되었는지 테스트 하기 위해서는 iBeacon 스캐너 앱이 필요합니다. 하드카피월드에서 제작한 아래 앱 다운로드 받고 사용하시면 됩니다.</span></p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px; color: #525252;\"><strong style=\"box-sizing: inherit;\">Auto Beacon</strong>&nbsp;<strong style=\"box-sizing: inherit;\"><a href=\"http://www.hardcopyworld.com/gnuboard5/bbs/board.php?bo_table=project_hardcopy&amp;wr_id=10\" style=\"box-sizing: inherit; background-color: transparent; color: #000000; text-decoration-line: none; transition: color 0.35s ease 0s;\" target=\"_blank\">매뉴얼</a>,&nbsp;<a href=\"https://play.google.com/store/apps/details?id=com.wiredfactory.bluewave\" style=\"box-sizing: inherit; background-color: transparent; color: #000000; text-decoration-line: none; transition: color 0.35s ease 0s;\" target=\"_blank\">앱 다운로드</a>&nbsp;</strong></p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px; color: #525252;\"><span style=\"box-sizing: inherit; color: #000000;\">준비가 되었으면 아래 순서대로 비컨 설정해보세요.</span></p>\r\n   <ol style=\"box-sizing: inherit; margin: 0px 0px 0px 20px; list-style-position: initial; list-style-image: initial; padding: 0px; color: #525252;\">\r\n      <li style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit; color: #000000;\">BLE와 아두이노를 위 설명대로 연결.</span></li>\r\n      <li style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit; color: #000000;\">소스코드를 컴파일 및 업로드</span></li>\r\n      <li style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit; color: #000000;\">업로드 완료되면 시리얼 모니터 실행 (아두이노 IDE -&gt; 도구 -&gt; 시리얼 모니터)</span></li>\r\n      <li style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit; color: #000000;\">아래 붉은 글씨로 적힌&nbsp;<span style=\"box-sizing: inherit; color: #ff0000;\"><strong style=\"box-sizing: inherit;\">AT command</strong></span>&nbsp;를 순서대로 입력합니다. 커맨드가 제대로 설정된 경우&nbsp;<span style=\"box-sizing: inherit; color: #0000ff;\"><strong style=\"box-sizing: inherit;\">OK…</strong></span>&nbsp;와 같은 응답이 시리얼모니터에 표시됩니다.</span></li>\r\n      <li style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit; color: #000000;\">시리얼 모니터에&nbsp;<span style=\"box-sizing: inherit; color: #ff0000;\"><strong style=\"box-sizing: inherit;\">AT+RENEW</strong></span>&nbsp;입력 (공장초기화)</span></li>\r\n      <li style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit; color: #ff0000;\"><strong style=\"box-sizing: inherit;\">AT+RESET</strong></span>&nbsp;(BLE 모듈을 리셋)</li>\r\n      <li style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit; color: #ff0000;\"><strong style=\"box-sizing: inherit;\">AT</strong></span>&nbsp;(OK 응답이 오는지 확인)</li>\r\n      <li style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit; color: #ff0000;\"><strong style=\"box-sizing: inherit;\">AT+MARJ0x1234</strong></span>&nbsp;(iBeacon의 Major 값을 0x1234 로 설정, 16진수, 원하는 값 넣으셔도 되고 이 과정 생략해도 됨)</li>\r\n      <li style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit; color: #ff0000;\"><strong style=\"box-sizing: inherit;\">AT+MINO0xFA01</strong></span>&nbsp;(iBeacon의 Minor 값을 oxFA01로 설정, 16진수,원하는 값 넣으셔도 되고 이 과정 생략해도 됨)</li>\r\n      <li style=\"box-sizing: inherit;\"><span style=\"box-sizing: inherit; color: #ff0000;\"><strong style=\"box-sizing: inherit;\">A','http://www.hardcopyworld.com/ngine/aduino/index.php/archives/1108','http://robomecha.co.kr/product/detail.html?product_no=309&cate_no=93&display_group=1#none',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 14:59:35',0,'2019-04-26 14:59:35','210.101.103.92','','','','','','','','','','','',''),(290,-290,'',290,0,0,'','','html1','[ETC] MQ-135 Gas sensor','<h3 class=\"post-title entry-title\" itemprop=\"name\" style=\"margin: 0.75em 0px 0px; position: relative; font-variant-numeric: normal; font-variant-east-asian: normal; font-weight: normal; font-stretch: normal; font-size: 22px; line-height: normal; font-family: &quot;Trebuchet MS&quot;, Trebuchet, Verdana, sans-serif; color: #666666; background-color: #ffffff;\">Cheap CO2 meter using the MQ135 sensor with AVR ATmega</h3>\r\n<div class=\"post-header\" style=\"line-height: 1.6; margin: 0px 0px 1.5em; font-size: 10.8px; color: #666666; font-family: &quot;Trebuchet MS&quot;, Trebuchet, Verdana, sans-serif; background-color: #ffffff;\">\r\n   <div class=\"post-header-line-1\">\r\n      <div class=\"post-share-buttons goog-inline-block\" style=\"position: relative; display: inline-block; margin-top: 0.5em; vertical-align: middle;\">&nbsp;</div>\r\n      <span class=\"post-icons\"></span></div>\r\n   </div>\r\n<div class=\"post-body entry-content\" id=\"post-body-4722799349967621343\" itemprop=\"description articleBody\" style=\"width: 546px; font-size: 13.2px; line-height: 1.4; position: relative; color: #666666; font-family: &quot;Trebuchet MS&quot;, Trebuchet, Verdana, sans-serif; background-color: #ffffff;\"><b>MQ135</b>&nbsp;is an&nbsp;<b>Air Quality Sensor</b>&nbsp;suitable for detecting of NH3, Alcohol, Benzene and other gases.<br /><br />\r\n   <div class=\"separator\" style=\"clear: both; text-align: center;\"><a href=\"http://2.bp.blogspot.com/-xqvZeI9HXTQ/UuPyblIDjjI/AAAAAAAAD_8/IKy93OyU3Qk/s1600/mq135_pinout.jpg\" imageanchor=\"1\" style=\"text-decoration-line: none; color: #888888; margin-left: 1em; margin-right: 1em;\" target=\"_blank\"><img border=\"0\" height=\"91\" src=\"https://2.bp.blogspot.com/-xqvZeI9HXTQ/UuPyblIDjjI/AAAAAAAAD_8/IKy93OyU3Qk/s1600/mq135_pinout.jpg\" width=\"400\" style=\"border: 1px solid rgb(238, 238, 238); position: relative; padding: 5px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; box-shadow: rgba(0, 0, 0, 0.1) 1px 1px 5px;\" /></a></div>\r\n   <br />The description below, is what i derive from the poor datasheet of this sensor, it may be uncorrect, so if you have suggestions please leave me a feedback.<br /><br /><span style=\"color: orange;\">update -&nbsp;</span><span style=\"color: orange;\">Here you can find a way to estimate the correlation function of MQ sensors, and&nbsp;</span><span style=\"color: orange;\">extrapolate coefficients from the datasheet curves</span><span style=\"color: orange;\">:</span><br /><a href=\"http://davidegironi.blogspot.com/2017/05/mq-gas-sensor-correlation-function.html\" style=\"text-decoration-line: none; color: #888888;\" target=\"_blank\">http://davidegironi.blogspot.com/2017/05/mq-gas-sensor-correlation-function.html</a><br /><span style=\"color: orange;\">update -&nbsp;</span><span style=\"color: orange;\">Here a temperature and humidity correlation method for the MQ sensors;</span><br /><a href=\"http://davidegironi.blogspot.com/2017/07/mq-gas-sensor-correlation-function.html\" style=\"text-decoration-line: none; color: #888888;\" target=\"_blank\">http://davidegironi.blogspot.com/2017/07/mq-gas-sensor-correlation-function.html</a><br /><br />The \"<i>sensitivity characteristics of the MQ-135</i>\" figure of the datasheet, you can see it below, it is used to convert the output of the sensor to the related ppm physical physical charateristic&nbsp;for the gas under test.<br /><br />\r\n   <div class=\"separator\" style=\"clear: both; text-align: center;\"><a href=\"http://4.bp.blogspot.com/-fjA7HqHs3ZM/UuPydeWHiOI/AAAAAAAAEAU/wk8l7zRa3_E/s1600/mq135_sensitivity_characteristics.jpg\" imageanchor=\"1\" style=\"text-decoration-line: none; color: #888888; margin-left: 1em; margin-right: 1em;\" target=\"_blank\"><img border=\"0\" height=\"382\" src=\"https://4.bp.blogspot.com/-fjA7HqHs3ZM/UuPydeWHiOI/AAAAAAAAEAU/wk8l7zRa3_E/s1600/mq135_sensitivity_characteristics.jpg\" width=\"400\" style=\"border: 1px solid rgb(238, 238, 238); position: relative; padding: 5px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; box-shadow: rgba(0, 0, 0, 0.1) 1px 1px 5px;\" /></a></div>\r\n   <br />The graphic above seems a power function<br /><i>y = a*x^b</i><br />so<br /><i>ppm = a*(Rs/Ro)^b</i><br />using power regression, we can obtain scaling factor (a), and exponent (b), for the gas we would like to measure<br /><br />Then<br /><i>Ro = Rs * sqrt(a/ppm, b) = Rs * exp( ln(a/ppm) / b )</i><br />\r\n   <div><br /></div>\r\n   <div>So, if we want to calibrate a sensor, we \"just\" need a know amount of a certain gas, then we can read the resistance output value from the sensor (Rs), and we can compute the calibrated Ro value.<br />We know the current amount of&nbsp;<b>CO2 gas in atmosphere</b>&nbsp;<a href=\"http://co2now.org/\" style=\"text-decoration-line: none; color: #888888;\" target=\"_blank\">http://co2now.org/</a>, we can use this as a reference for calibration.</div>\r\n   <div><br /></div>\r\n   <div>Datasheet tell us even detecting concentration scope for a certain gas, so we can compute the limit for Rs/Ro.</div>\r\n   <div><br /></div>\r\n   <div><i>Rs/Ro_limit = (ppm/a) ^ (1/b)</i></div>\r\n   <div><br /></div>\r\n   <div>Now, because i want to build a CO2 meter, let\'s try to calibrate this sensor for measure CO2.</div>\r\n   <div><br /></div>\r\n   <div>For CO2, if we measure points graph and do power regression we can obtain the function</div>\r\n   ppm = 116.6020682 (Rs/Ro)^-2.769034857<br />we also know that the current amount of CO2 gas in atmosphere is (unfortunately) 392ppm, so, heating the sensor for 24 hours, and leaving it in open air, if we measure 26954ohm as the resistance output we can Ro should be&nbsp;41763.<br />Datasheet does not tell us much for detecting concentration scope for this gas, the figure is from 10 to 200ppm, but we can suppose a limit from 10 to 2000ppm.<br /><br />The above derivation seems to works quite well, but for estimating the scaling factor, and exponent in a more precise way, i\'ve logged raw adc data from MQ135 and correlated to a MHZ14 NDIR infrared sensor.<br /><br />Data was logged on a xively datastream.<br /><br />\r\n   <div class=\"separator\" style=\"clear: both; text-align: center;\"><a href=\"http://3.bp.blogspot.com/-w_hY6hGNolk/UuPycyTAVNI/AAAAAAAAEAQ/FWf09sFVpos/s1600/mq135_co2_correlation.jpg\" imageanchor=\"1\" style=\"text-decoration-line: none; color: #888888; margin-left: 1em; margin-right: 1em;\" target=\"_blank\"><img border=\"0\" height=\"210\" src=\"https://3.bp.blogspot.com/-w_hY6hGNolk/UuPycyTAVNI/AAAAAAAAEAQ/FWf09sFVpos/s1600/mq135_co2_correlation.jpg\" width=\"400\" style=\"border: 1px solid rgb(238, 238, 238); position: relative; padding: 5px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; box-shadow: rgba(0, 0, 0, 0.1) 1px 1px 5px;\" /></a></div>\r\n   <br />You can see the correlation results above.<br />Correlation is done by a matlab script using power regression and polynomial curve fitting.<br />We have to convert raw value to calculated resistance.<br />And then, because we will later use a Ro, we \"impose\" a arbitrary Ro, such that scaling factor and exponent can be used in the math of our microcontroller.<br />Imposing a Ro of 41000, obtained scaling factor in my experiment is: 56.0820, and exponent is -5.9603.<br />Using this parameters now we should obtain a better response for our sensor.<br />The Ro calibration is again important because one sensor can differ from other.<br />The previous reading of 26954ohm return, using those new correlated scaling factor and exponet values, &nbsp;us a value of&nbsp;683ppm, without any calibration of the Ro.<br /><br />I\'ve checked the xively datastream with the new correlated function, and it seams to repond a little better than the datasheet one, even if reading does not always respond as is expected.<br /><br />I\'ve checked this method against 5 sensors, 4 of them, after the Ro has been calibrated, seems to fit the same response curve, 1 not.<br />Because MQ135 are electro-chemical sensor, i do not expect all the sensors has the same curve.<br /><br />With the code you can find the&nbsp;<b>matlab script</b>, and the&nbsp;<b>speadsheet helper</b>&nbsp;for computations.<br /><br />\r\n   <div class=\"separator\" style=\"clear: both; text-align: center;\"><a href=\"http://4.bp.blogspot.com/-0FYTzIz5EeA/VC04-fQo-nI/AAAAAAAAExU/xUfW7lC2wkY/s1600/atmega_mq135_sample.png\" imageanchor=\"1\" style=\"text-decoration-line: none; color: #888888; margin-left: 1em; margin-right: 1em;\" target=\"_blank\"><img border=\"0\" height=\"287\" src=\"https://4.bp.blogspot.com/-0FYTzIz5EeA/VC04-fQo-nI/AAAAAAAAExU/xUfW7lC2wkY/s1600/atmega_mq135_sample.png\" width=\"400\" style=\"border: 1px solid rgb(238, 238, 238); position: relative; padding: 5px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; box-shadow: rgba(0, 0, 0, 0.1) 1px 1px 5px;\" /></a></div>\r\n   <br /><b>ChangeLog</b><br />\r\n   <ul style=\"padding: 0px 2.5em; margin: 0.5em 0px; line-height: 1.4;\">\r\n      <li style=\"padding: 0px; margin: 0px 0px 0.25em;\">01b: fixed inconsistent value of the R3 resistor between schematics and code (thanks to&nbsp;<i>Emmanuel Pierre</i>&nbsp;for reporting this bug)&nbsp;</li>\r\n      <li style=\"padding: 0px; margin: 0px 0px 0.25em;\">01: first version.</li>\r\n      </ul>\r\n   <br /><b>Code</b><br />\r\n   <ul style=\"padding: 0px 2.5em; margin: 0.5em 0px; line-height: 1.4;\">\r\n      <li style=\"padding: 0px; margin: 0px 0px 0.25em;\"><a href=\"https://sourceforge.net/projects/davidegironi/files/avr-lib/avr_lib_mq135_01b.zip/download\" target=\"_blank\" style=\"text-decoration-line: none; color: #888888;\">avr_lib_mq135_01b.zip</a></li>\r\n      <li style=\"padding: 0px; margin: 0px 0px 0.25em;\"><strike><a href=\"https://sourceforge.net/projects/davidegironi/files/avr-lib/avr_lib_mq135_01.zip/download\" target=\"_blank\" style=\"text-decoration-line: none; color: #888888;\">avr_lib_mq135_01.zip</a></strike></li>\r\n      </ul>\r\n   </div>','http://davidegironi.blogspot.com/2014/01/cheap-co2-meter-using-mq135-sensor-with.html#.XMKeXOgzZjF','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:00:06',0,'2019-04-26 15:00:06','210.101.103.92','','','','','','','','','','','',''),(291,-291,'',291,0,0,'','','html1','[Android] No Launcher activity found! 에러와 함께 실행되지 않을 경우','<p><span style=\"color: #404040; font-family: 굴림;\">No Launcher activity found! 에러와 함께 실행되지 않을 경우&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">Programming/Android&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">안드로이드 앱을 실행할 때, \"No Launcher activity found!\"가 나올 경우...&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">아래와 같이 AndroidManifest.xml파일을 수정해 주면 된다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">AndroidManifest.xml파일에 메인 액티비티가 되어줄 액티비티에 다음 내용을 추가하면 해결&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&lt;activiry blabla..&gt;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&lt;intent-filter&gt;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; &nbsp; &nbsp; &lt;action android:name=\"android.intent.action.MAIN\"&gt;&lt;/action&gt;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; &nbsp; &nbsp; &lt;category android:name=\"android.intent.category.LAUNCHER\"&gt;&lt;/category&gt;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&lt;/intent-filter&gt;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&lt;/activity&gt;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">참조 URL :&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><a href=\"http://sir.co.kr/bbs/board.php?bo_table=pg_tip&amp;wr_id=12716\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://sir.co.kr/bbs/board.php?bo_table=pg_tip&amp;wr_id=12716</a><span style=\"color: #404040; font-family: 굴림;\">&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><a href=\"http://androidhuman.tistory.com/262\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://androidhuman.tistory.com/262</a><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&lt;&lt; 이건 intent-filter에 대한 설명.</span></p>','','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:00:20',0,'2019-04-26 15:00:20','210.101.103.92','','','','','','','','','','','',''),(292,-292,'',292,0,0,'','','html1','[Windows] 키보드로 프로그램 창 옮기기','<table width=\"100%\" cellpadding=\"5\" style=\"font-family: 굴림;\">\r\n   <tbody>\r\n      <tr>\r\n         <td class=\"lh\" height=\"100\" style=\"color: #222222; line-height: 18px; word-break: break-all;\"><span class=\"content\" style=\"color: #404040;\">Alt + Space + M 을 누른뒤에 방향키 로 움직이면 된다.</span><a href=\"http://geoworld.cafe24.com/gnu3/?doc=bbs/gnuboard.php&amp;bo_table=Computer&amp;page=6&amp;wr_id=31152\" style=\"text-decoration-line: none; color: #3a4e40;\" target=\"_blank\"></a><a href=\"http://geoworld.cafe24.com/gnu3/?doc=bbs/gnuboard.php&amp;bo_table=Computer&amp;page=6&amp;wr_id=31152\" style=\"text-decoration-line: none; color: #3a4e40;\" target=\"_blank\"></a></td>\r\n         </tr>\r\n      <tr></tr>\r\n      </tbody>\r\n   </table>','','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:00:30',0,'2019-04-26 15:00:30','210.101.103.92','','','','','','','','','','','',''),(293,-293,'',293,0,0,'','','html1','[ETC] LED 저항계산','<p><span style=\"color: #404040; font-family: 굴림;\">*출처 : &gt;&gt; 지식인&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">12V -- 저항 -- 저항 -- RLED -- RLED -- RLED&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">12V -----저항 ------&nbsp; GLRD -- GLED -- GLED&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">12V -----저항 ------&nbsp; BLRD -- BLED -- BLED&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: 굴림;\">Green과 Blue LED는 동작전압이 3.2V입니다. 따라서 Green과 Blue LED에 붙은 저항은&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">R = (12V - 3.2Vx3)/0.02A = 120옴이 됩니다. 반면에 Red LED는 동작전압이 2.2V 입니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">따라서 R = (12V - 2.2Vx3)/0.02A = 270옴이 됩니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">이때 각 저항에서 발생하는 손실전력을 따지면 P = I^2 x R 에서 120옴에서는 0.048W가 되지만&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">270옴에서는 0.108W가 됩니다. 즉 RED LED에 달린 저항은 약 2배정도의 전력이 손실되고, 2배이상 저항에서 열이 난다라는 것입니다. 따라서 RED LED용 저항은 2개를 사용해서 열을 분산시키고, Green과 Blue는 저항한개로도 충분히 감당할수 있기때문에 1개만 사용한 것입니다.&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: 굴림;\">1. LED 1개 연결할 경우. (1:1 저항이라고 함)&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; - 가정1 : LED1에 흐르는 전류는 20mA, 3.2V 정도라 가정.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; - 가정 2 : 보통 차량에 다이를 많이 하니, 14V(시동시)라 가정하면...&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; - 계산 : 모두들 V = IR이라는 공식 알고 계실듯..&nbsp; 중학교에도...나오는...&nbsp; 공식.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; R1에서 소비되는 전압 : (14-3.2) = (20mA) * R1,&nbsp; &nbsp; R1 = 10.8/0.02 = 540 Ω&nbsp; !!!&nbsp; 정말 간단하죠잉...&nbsp; ㅋㅋㅋ&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">2. LED 2개 연결할 경우 (2:1 저항이라고 함)&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; - 가정은 위와 동일.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; - 계산 : LED 2개에서 6.4V(3.2*2)를 소비하니...&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (14-6.4V) = (20mA) * R1,&nbsp; R1 = (7.6V)/(0.02A) = 380 Ω&nbsp; -&gt;&nbsp; 정말 간단하죠잉...&nbsp; ㅋㅋ&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">3. Power LED 저항 계산 법.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; Power LED 역시 계산 방법은 동일하다.&nbsp; 다만, 높은 전류를 필요하기 때문에 저항에 높은 전류가 흐른다.&nbsp; 따라서 저항 역시 전력저항을 사용해야 한다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; - 가정 : LED 스펙은...&nbsp; 3.5V, 500mA라 한다면...(이 경우 1.75W가 되겠네요..)&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; - 계산 : (14-3.5V) = (500mA) * R1,&nbsp; R1 = (10.5V)/(0.5A),&nbsp; R1 = 21 Ω&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; &nbsp; 이 때, R1의 전력은 10.5V * 0.5A = 5.25W가 되겠네요.&nbsp; 이보다는 큰 전력의 저항을 사용하셔야 겠네요.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; &nbsp; 음...대략 10W 정도의 저항을 쓰면 될듯.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">4. LED DIY 시 주의점.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; - LED의 전류/전압 곡선은 특정 구간을 지나면 전압을 조금만 올려도 급격히 전류가 증가하기 때문에 LED에 무리를 많이 줄 수 있고,&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; &nbsp; 열이 많이 발생하여 LED 파손까지 될 수 있다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; &nbsp; 따라서 저항은 계산 저항 보다는 약간 크게 해 주는 편이 좋을듯 하다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; - 열이 많이 발생할 수 있기 때문에 많은 LED를 서로 직렬로 해 주는 것은 좋지 않다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; &nbsp; 반듯이 저항 1개 정도는 사용해야 한다. 즉, 모두 LED를 직렬로하여 저항을 없앨 수도 있는데, 이 경우 하나의 LED가 파손될 경우 전류 값이&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; &nbsp; 급격히 증가하여 나머지 LED 역시 바로 파손된다.&nbsp; 따라서 저항은 반듯이 사용, 그리고 LED는 하나의 Power LED를 사용하는 것 보다는 여러개를 사용하여&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; &nbsp; 광량을 늘릴 필요가 있다.&nbsp; 바로 열 때문에...&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">5. LED 저항 구하는 공식.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; &nbsp; R1 = (Vcc-V_led)/(전류, A)&nbsp; 입니다.</span></p>','https://kin.naver.com/qna/detail.nhn?d1id=11&dirId=1118&docId=211822918&qb=cmdiIGxlZCDsoIDtla0=&enc=utf8&section=kin&rank=2&search_sort=0&spq=1&pid=S7AlxdoRR2ZsstuLKg0sssssssG-391303&sid=VLigMwpyVo0AAGha7fg','http://blog.daum.net/mymin011/16',3,4,13,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:00:55',1,'2019-04-26 15:00:55','210.101.103.92','','','','','','','','','','','',''),(294,-294,'',294,0,0,'','','html1','[ETC] 스케치업 파일(skp)을 캐드 파일(dwg.dxf)로 변환때 불일치','<p><span style=\"color: #404040; font-family: 굴림;\">1. cad로 익스포트시 선이 삐죽삐죽 나가는 문제&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">이건 Export옵션에서 조절 가능합니다. 스케치업상에 있는 일종의 표현하는 기능인데 활용도는 떨어집니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">File - Export - 2d Graphic (DWG)까지는 가셨다면 오른쪽 하단에 Options창이 보이실겁니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">그곳에서 Extension Lines / Show extensions 클릭 해제 하시면됩니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">2. 선이 삐뚤하게 보이는 문제&nbsp;</span><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: 굴림;\">스케치업은 기본적으로 투시도로 모델링이 표현됩니다. 이때문에 화면그대로 export를 했을경우 선이 소실점으로 기울거나 삐뚤하게 표현되는것이죠.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">도면처럼 반듯한 라인을 원하신다면 Camera - Parallel Projection을 체크하시고 export하시면 됩니다.</span></p>','https://kin.naver.com/qna/detail.nhn?d1id=1&dirId=10406&docId=210142524&qb=7Iqk7LyA7LmY7JeFIGR4Zg==&enc=utf8&section=kin&rank=1&search_sort=0&spq=0&pid=SKkCwdpySDNssat4b5osssssssl-498909&sid=VMbkrgpyVmcAAHba-zw','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:01:14',0,'2019-04-26 15:01:14','210.101.103.92','','','','','','','','','','','',''),(295,-295,'',295,0,0,'','','html1','[Arduino] MQ-135 Google Link','<p><a href=\"http://jasper.sikken.nl/arduinosensor/index.html\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://jasper.sikken.nl/arduinosensor/index.html</a><span style=\"color: #404040; font-family: 굴림;\">&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><a href=\"https://hackaday.io/project/3475-sniffing-trinket/log/12363-mq135-arduino-library\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">https://hackaday.io/project/3475-sniffing-trinket/log/12363-mq135-arduino-library</a><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: 굴림;\">***************&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">2018.1 신규 정보 링크&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><a href=\"http://analog2u.tistory.com/52\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://analog2u.tistory.com/52</a></p>','','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:01:43',1,'2019-04-26 15:01:43','210.101.103.92','','','','','','','','','','','',''),(296,-296,'',296,0,0,'','','html1','[Arduino] gp2y1010au0f 먼지값 변환','<p><span style=\"color: #404040; font-family: 굴림;\">Anolog pin input ranges from 0-1024&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">Sensor range is 0-0.6 mg/m3&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">This sensor seems to range from 500mV (no dust)&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">Every 0.1mg of dust = 500mV&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">So, voltage ranges from 500mV to 3500mV&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">So max output without remapping is 3500/5000 * 1024 = 717 (pretty much what I saw).&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">My output in mg/m3 is therefore = ((((dustVal/717)*3500)-500)/500) * 0.1&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">EG reading on Analog 1 = 412 = 0.3mg/m3</span></p>','http://forum.arduino.cc/index.php?topic=77456.0','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:01:58',0,'2019-04-26 15:01:58','210.101.103.92','','','','','','','','','','','',''),(297,-297,'',297,0,0,'','','html1','[Arduino] PM 1001 Sensor Source','<p><span style=\"color: #404040; font-family: 굴림;\">#include &lt;SoftwareSerial.h&gt;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">SoftwareSerial dustSerial = SoftwareSerial(2, 3);&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">byte send_data[] = {0x11, 0x01, 0x01, 0xED};&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">byte receive_data[16];&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">void setup(){&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; Serial.begin(9600);&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; dustSerial.begin(9600);&nbsp;</span><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: 굴림;\">void loop(){&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; for(int i = 0; i &lt; 4; i++){ // send data&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; &nbsp; dustSerial.write(send_data[i]);&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; }&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; delay(100);&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; for(int i = 0; i &lt; 16; i++){&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; &nbsp; receive_data[i] = dustSerial.read();&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; &nbsp; //printIn2Hexadecimal(receive_data[i]);&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; }&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; //Serial.println();&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; double df = 0.0;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; df = receive_data[3] * 255.0 * 255.0 * 255.0&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; &nbsp; &nbsp; + receive_data[4] * 255.0 * 255.0&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; &nbsp; &nbsp; + receive_data[5] * 255.0&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; &nbsp; &nbsp; + receive_data[6];&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; Serial.print(df);&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; double density = df * 3528.0 / 100000.0;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; Serial.print(\" \");&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; Serial.println(density);&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; delay(1000);&nbsp;</span><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: 굴림;\">void printIn2Hexadecimal(byte data){&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; char a = data / 16, b = data % 16;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; Serial.print((int)a, HEX);&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; Serial.print((int)b, HEX);&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; Serial.print(\" \");&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">}</span></p>','','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:02:08',0,'2019-04-26 15:02:08','210.101.103.92','','','','','','','','','','','',''),(298,-298,'',298,0,0,'','','html1','[Android] 안드로이드 강좌모음 - 9축센서 설명 포함','<span style=\"color: #404040; font-family: 굴림;\">1. 안드로이드 프로그래밍 강좌 모음</span><span style=\"color: #404040; font-family: 굴림;\">&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><a href=\"http://www.tipssoft.com/bulletin/board.php?bo_table=old_bbs&amp;wr_id=501\" target=\"_new\" style=\"font-family: 굴림; text-decoration-line: none; color: #3a4e40;\">http://www.tipssoft.com/bulletin/board.php?bo_table=old_bbs&amp;wr_id=501</a><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: 굴림;\">2. 센서 - 가속도 센서 사용하기</span><span style=\"color: #404040; font-family: 굴림;\">&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><a href=\"http://www.tipssoft.com/bulletin/board.php?bo_table=FAQ&amp;wr_id=1046\" target=\"_new\" style=\"font-family: 굴림; text-decoration-line: none; color: #3a4e40;\">http://www.tipssoft.com/bulletin/board.php?bo_table=FAQ&amp;wr_id=1046</a>','','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:02:31',0,'2019-04-26 15:02:31','210.101.103.92','','','','','','','','','','','',''),(299,-299,'',299,0,0,'','','html1','[ETC] ESP8266 WiFi 모듈 참조링크들','<p><span style=\"color: #404040; font-family: 굴림;\">1.&nbsp;</span><a href=\"http://blog.naver.com/damtaja/220316737162\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://blog.naver.com/damtaja/220316737162</a><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: 굴림;\">2.&nbsp;</span><a href=\"http://blog.naver.com/redflag2k/220167115524\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://blog.naver.com/redflag2k/220167115524</a><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: 굴림;\">3.&nbsp;</span><a href=\"http://blog.naver.com/ajkun/220214336816\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://blog.naver.com/ajkun/220214336816</a><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: 굴림;\">4.&nbsp;</span><a href=\"http://arsviator.blogspot.kr/2015/01/iot-esp8266.html?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed:+arsviator+\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://arsviator.blogspot.kr/2015/01/iot-esp8266.html?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed:+arsviator+</a><span style=\"color: #404040; font-family: 굴림;\">(%EA%B8%B0%EC%88%A0+%EC%97%AC%ED%96%89%EC%9E%90+(ArsViator))&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">5.&nbsp;</span><a href=\"http://www.hardcopyworld.com/ngine/aduino/index.php/archives/1257\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://www.hardcopyworld.com/ngine/aduino/index.php/archives/1257</a><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: 굴림;\">6.&nbsp;</span><a href=\"http://blog.naver.com/damtaja/220311479276\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://blog.naver.com/damtaja/220311479276</a><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: 굴림;\">7.&nbsp;</span><a href=\"https://hojunpark.wordpress.com/2015/09/02/esp8266-%EC%9C%BC%EB%A1%9C-%EA%B0%80%EB%B3%8D%EA%B2%8C-wifi-%EB%93%A4%EC%9D%B4%EB%8C%80%EA%B8%B0/\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">https://hojunpark.wordpress.com/2015/09/02/esp8266-%EC%9C%BC%EB%A1%9C-%EA%B0%80%EB%B3%8D%EA%B2%8C-wifi-%EB%93%A4%EC%9D%B4%EB%8C%80%EA%B8%B0/</a><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: 굴림;\">8.&nbsp;</span><a href=\"http://allaboutee.com/2014/12/30/esp8266-and-arduino-webserver/\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://allaboutee.com/2014/12/30/esp8266-and-arduino-webserver/</a><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: 굴림;\">9.&nbsp;</span><a href=\"http://www.hardcopyworld.com/gnuboard5/bbs/board.php?bo_table=tech_comm&amp;wr_id=11\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://www.hardcopyworld.com/gnuboard5/bbs/board.php?bo_table=tech_comm&amp;wr_id=11</a><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: 굴림;\">10.&nbsp;</span><a href=\"http://deneb21.tistory.com/274%C2%A0\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://deneb21.tistory.com/274&nbsp;</a><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&lt;-- AT커맨드 활용 참조</span></p>','','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:02:41',0,'2019-04-26 15:02:41','210.101.103.92','','','','','','','','','','','',''),(300,-300,'',300,0,0,'','','html1','[ETC] Solenoid valve 참고링크','<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>\r\n<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;\">\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">&nbsp;</p>\r\n   <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>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">솔레노이드란 원통형으로 감은 전기 코일을 의미합니다. 원통형으로 코일을 감으면 원통 내부에 자기장이 형성되는데 여기에 철과 같은 자성 물질을 접근시키면 원통의 축 방향으로 이동하게 됩니다. 즉, 코일에 전기를 넣으면 왕복 운동을 만들 수 있습니다. 일반적인 전기 모터가 전기에너지를 회전 운동으로 변환시켜 주는 것과 기본 원리는 비슷합니다.</p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">솔레노이드 모터는 의외로 다양한 곳에 사용이 됩니다. 집에서 사용하는 도어락이나 원격으로 자동차 문을 제어하는 데에도 사용됩니다.</p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">솔레노이드 모터를 응용한 것이 솔레노이드 밸브입니다. 솔레노이드 밸브를 통해 수족관에 들어가는 물의 양을 제어하거나 칵테일 기계, 커피머신 등등 유체를 제어하는 곳에 사용이 가능합니다.</p>\r\n   <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>\r\n   <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>\r\n   <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>\r\n   <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>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">&nbsp;</p>\r\n   <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>\r\n   <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>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">여기서 사용된 트랜지스터는 전압이 아닌 전류로 제어가 됩니다. 그래서 아두이노에서 base pin 으로 들어가는 전류가 특정 크기 이내로 제한이 되도록 하기 위해 R1 (2.2kohm) 저항을 달아줍니다. base pin 은 아두이노의 디지털 핀 어느 것에나 연결하면 됩니다.</p>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">그림을 유심히보시면 모터의 하단 +, – 라인에 다이오드가 달려 있는 것이 보이실겁니다. 릴레이, 솔레노이드, 모터와 같이 코일을 사용하는 모듈에는 다이오드를 반드시 사용해야하고 다이오드 없이 집을 비워서는 안됩니다! 이런 모듈들은 전원이 차단&nbsp;될 때 수백 볼트에 이르는 역전압(reverse voltage)이 순간적으로 발생해서 트랜지스터를 먹통으로 만듭니다. 다이오드는 전류가 한 방향으로만 흐르도록 함으로써 역전압이 코일로 다시 돌아가도록 하고 트랜지스터를 보호합니다.</p>\r\n   <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>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">다이오드는 띠가 있는 쪽이 솔레노이드의 전원 입력쪽(V+)를 향하도록 해야합니다.</p>\r\n   <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>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">&nbsp;</p>\r\n   <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>\r\n   <p style=\"box-sizing: inherit; margin-bottom: 10px;\">&nbsp;</p>\r\n   <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;\">\r\n      <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>\r\n      <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;\">\r\n         <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;\">\r\n            <tbody style=\"box-sizing: inherit;\">\r\n               <tr class=\"crayon-row\" style=\"box-sizing: inherit; background: 0px center; padding: 0px !important; border: none !important; vertical-align: top !important; margin: 0px !important;\">\r\n                  <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;\">\r\n                     <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;\">\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        </div>\r\n                     </td>\r\n                  <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;\">\r\n                     <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;\">\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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>\r\n                        <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','http://www.hardcopyworld.com/ngine/aduino/index.php/archives/1059','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:03:02',0,'2019-04-26 15:03:02','210.101.103.92','','','','','','','','','','','',''),(301,-301,'',301,0,0,'','','html1','[Arduino] 아뒤노에서 타이머 인터럽트 (Timer interrupt in Arduino)','<h3 class=\"post-title entry-title\" itemprop=\"name\" style=\"margin: 0.75em 0px 0px; position: relative; font-variant-numeric: normal; font-variant-east-asian: normal; font-weight: normal; font-stretch: normal; font-size: 22px; line-height: normal; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; color: #222222; background-color: #ffffff;\">아뒤노에서 타이머 인터럽트 (Timer interrupt in Arduino)</h3>\r\n<div class=\"post-header\" style=\"line-height: 1.6; margin: 0px 0px 1.5em; font-size: 10.8px; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; background-color: #ffffff;\">\r\n   <div class=\"post-header-line-1\">&nbsp;</div>\r\n   </div>\r\n<div class=\"post-body entry-content\" id=\"post-body-8391996968504595727\" itemprop=\"description articleBody\" style=\"width: 700px; font-size: 13.2px; line-height: 1.4; position: relative; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; background-color: #ffffff;\">\r\n   <div class=\"imageblock center\" style=\"text-align: center; clear: both;\"><img alt=\"\" src=\"https://lh6.googleusercontent.com/proxy/6f6KsyVr3-WKg8SPgfitGQJrKLkEtIX_SCvT8dHpEecA8PKOPYUb4w417URtriNs3AMTGjsM0DF1u7h7dICd2ZArxqtRmuRUgqeIAvg=s0-d\" style=\"padding: 5px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border: 1px solid rgb(238, 238, 238); box-shadow: rgba(0, 0, 0, 0.1) 1px 1px 5px; width: 500px; height: 500px;\" /></div>\r\n   <br /><br />아뒤노가 임베디드 환경을 처음 접하는 사람들에게 매우 쉬운 환경임에 틀림없지만 조금만 복잡한 작업을 하려고만 하면 제약사항이 꽤 많아진다.&nbsp;<br />특히 가장 아쉬운게&nbsp;<span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">attachInterrupt()</span>를 통해서 외부 인터럽트 2개(Arduino Mega에서는 6개로 늘어났다)만 사용할 수 있다는 점이다.<br /><br />단순하게 센서값을 읽어서 그 값에 따라 LED나 모터를 구동하는건 별 문제가 없지만 동시에 여러개의 입력을 기다리면서 그와 별도로 작업을 처리하거나 해야 한다면 타이머 인터럽트는 거의 필수적이 되어 버린다.<br /><br />물론 atmega의 타이머 관련 레지스터(TCCR2, ASSR 등등)를 직접 제어하면 인터럽트를 사용할 수 있지만 이 경우 아뒤노의 장점(?)이 사라져 버린다.<br />그래서 아뒤노 라이브러리 섹션의 contributed libraries (아뒤노 사용자들이 만든 라이브러리들)에 보면 MsTimer2가 있다. Atmega의 timer 2를 사용해서 ms 단위의 해상도로 타이머 인터럽트를 걸어줄 수 있다.<br />현재 Atmega 1280, 328, 48/88/168, 128/8을 사용한 arduino 및 arduino clone에서 사용할 수 있다.<br /><br />이 라이브러리를 사용하려면&nbsp;<a target=\"_blank\" href=\"http://www.arduino.cc/playground/Main/MsTimer2\" style=\"text-decoration-line: none; color: #7c93a1;\">MsTimer2</a>를 다운받아 압축을 해제한 다음 만들어 진 폴더를 아뒤노가 설치된 폴더 내의&nbsp;<span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">hardware/libraries</span>&nbsp;에 복사해 주면 그것으로 설치가 끝난다. 그리고 스케치북에&nbsp;<span style=\"font-family: &quot;courier new&quot;, courier, monospace; color: #ff0000;\">#include &lt;MsTimer2.h&gt;&nbsp;</span>를 넣어주면 된다.<br /><br />set, start, stop 이렇게 단 3개의 메쏘드만 있어 사용법은 매우 쉽다.<br />먼저&nbsp;<span class=\"wikiword\" style=\"font-family: &quot;courier new&quot;, courier, monospace;\">MsTimer2</span><span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">::set(unsigned long ms, void (*f)())</span>&nbsp;을 사용해서 타이머를 설정해 준다. 이 함수에는 두개의 파라메터가 필요하다. 첫번째는 타이머 시간(ms 단위, 즉 여기에 1000을 넣어주면 1초마다 한번씩 타이머 인터럽트가 발생한다.), 두번째는 인터럽트 서비스 루틴(인터럽트가 발생했을 때 호출할 함수) 이름이다.<br />set()을 이용해서 타이머를 설정했으면&nbsp;<span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">MsTimer2::start()&nbsp;</span>를 호출해주면 타이머가 동작하기 시작해 정해진 시간마다 인터럽트 서비스 루틴이 실행된다.<br />타이머 동작을 멈추려면&nbsp;<span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">MsTimer2::stop()</span>을 호출해주면 된다.<br /><br />타이머 인터럽트가 왜 유용한가는 아래의 예제를 보면 잘 알수있다.<br />0.5초마다 LED를 깜빡이게 하는 프로그램이다.<br /><br />\r\n   <pre style=\"font-family: &quot;courier new&quot;, courier, monospace;\"><font size=\"2\">boolean output = HIGH;</font></pre>\r\n   <font size=\"2\"><span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">void setup() {</span><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /></font>\r\n   <pre style=\"font-family: &quot;courier new&quot;, courier, monospace;\"><font size=\"2\">  pinMode(13, OUTPUT);<br />}<br /><br />void loop() {<br />  digitalWrite(13, output);<br />  output = !output;<br />  delay(500);<br />}</font></pre>\r\n   <font size=\"2\"><span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">---------------------------------------</span><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /></font>\r\n   <pre><font size=\"2\"><span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">// Toggle LED on pin 13 each second</span><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /><span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">#include &lt;MsTimer2.h&gt;</span><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /><span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">void flash() {</span><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /><span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">  static boolean output = HIGH;</span><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /><span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">  digitalWrite(13, output);</span><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /><span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">  output = !output;</span><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /><span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">}</span><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /><span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">void setup() {</span><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /><span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">  pinMode(13, OUTPUT);</span><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /><span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">  MsTimer2::set(500, flash); // 500ms period</span><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /><span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">  MsTimer2::start();</span><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /><span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">}</span><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /><span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">void loop() {</span><br style=\"font-family: &quot;courier new&quot;, courier, monospace;\" /><span style=\"font-family: &quot;courier new&quot;, courier, monospace;\">}</span></font><br /></pre>\r\n   둘 다 같은 동작을 한다. 그런데 위의 경우와 같이 타이머 인터럽트를 사용하지 않은 경우 0.5초동안 다른 일을 하지 못하고 단지 기다려야 한다. 그에 비해 아래쪽 프로그램의 경우는 LED를 토글하는걸 인터럽트 서비스 루틴(여기서는 flash())에서 처리해주기 때문에 따로 0.5초를 기다릴 필요가 없이 그 동안 다른 일을 할 수 있게 된다. (loop() 함수에서 아무일도 하지 않는걸 확인할 수 있다. 여기에 다른 작업을 넣어주면 된다.)<br /><br />예를 들어 동작중에 시리얼 포트를 통해 시간을 입력받아 LED가 깜빡이는 간격을 조정하도록 만들려면 상당히 힘들어 지지만 아래쪽 프로그램의 경우 시리얼 포트를 통해 데이터를 입력받는 부분은 loop() 안에서 처리하게 하고 그 입력받은 값에 따라 타이머 설정만 바꿔주면 실제 깜빡이는건 타이머 인터럽트가 담당해 주기 때문에 매우 간단해진다.</div>','https://arsviator.blogspot.com/2009/06/%EC%95%84%EB%92%A4%EB%85%B8%EC%97%90%EC%84%9C-%ED%83%80%EC%9D%B4%EB%A8%B8-%EC%9D%B8%ED%84%B0%EB%9F%BD%ED%8A%B8-timer-interrupt-in.html','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:03:23',0,'2019-04-26 15:03:23','210.101.103.92','','','','','','','','','','','',''),(302,-302,'',302,0,0,'','','html1','[Arduino] 아두이노를 이용한 소프트웨어 디바운싱(debouncing)','<p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.8; font-family: 돋움; text-align: justify; background-color: #eeeeee;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\">택스위치에 대해서는 </span><a href=\"http://studymake.tistory.com/159\" target=\"_blank\" class=\"con_link\" style=\"text-decoration-line: none; overflow-wrap: break-word;\"><span style=\"font-size: 15px; font-family: Arial; color: #1155cc; text-decoration-line: underline; vertical-align: baseline; white-space: pre-wrap;\">이전 포스트</span></a><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\">에서 기본적인 내용을 다루었다. 여기에서는 인터럽트를 이용해서 스위치를 누를 때마다 LED가 토글(toggle)되는 프로그램을 작성하도록 하겠다. 즉, 스위치 신호의 폴링 에지 (falling edge)에서 LED의 출력 신호가 반전되도록 하는 프로그램을 작성하도록 하겠다.</span></p>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.8; font-family: 돋움; text-align: justify; background-color: #eeeeee;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\"> 터치센서와 다르게 기계적인 접점을 갖는 스위치는 점점이 붙거나 떨어지는 순간에 바운싱(bouncing) 현상이 있다. 이것은 접점이 붙거나 떨어지는 그 짧은 순간에 접점이 고속으로 여러 번 on/off 되는 현상을 말하며 기계적인 스위치라면 반드시 발생하는 현상이다. 이것은 &nbsp;짧은 순간(약 100ms 이내임)에 여러 번 접점이 붙었다가 떨어지는 것을 반복하므로 의도하지 않게 인터럽트가 여러 번 발생할 수 있으므로 이러한 바운싱 현상을 제거해야 올바르게 동작하는데 이것을 </span><span style=\"font-size: 15px; font-family: Arial; color: #0000ff; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;\">디바운싱(debouncing)</span><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\">이라고 한다.</span></p>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.8; font-family: 돋움; text-align: justify; background-color: #eeeeee;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;다음 그림에서 하단의 그림이 바운싱을 도시한 것이고 이것을 제거한 깨끗한 신호가 상단에 도시되어 있다.</span></p>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<div dir=\"ltr\" style=\"line-height: 1.5; font-family: 돋움; text-align: justify; background-color: #eeeeee; margin-left: 0pt;\">\r\n   <table class=\"__se_tbl_ext\" style=\"border-width: initial; border-style: none; border-color: initial;\"><colgroup><col width=\"275\" /><col width=\"292\" /></colgroup>\r\n      <tbody>\r\n         <tr style=\"height: 0px;\">\r\n            <td style=\"word-break: break-all; height: 0px; border-width: 0px; border-style: solid; border-color: #000000; vertical-align: top; padding: 7px;\">\r\n               <p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.2; text-align: justify;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\"><img src=\"https://lh3.googleusercontent.com/9Ooz_sAXCPzFtcyW3ceUmLCJgXcwyMMXUSmzf1Od3_uiFRgACijAc0jSnG4fHZeuk22ktfS76sa6uf5VJS-rCTdWiX8dc5Te6rEtJDpOrQ4-WdjmWPd0sM9mQ2mHOMRvPQ2MlRE\" class=\"__se_object\" s_type=\"attachment\" s_subtype=\"image\" width=\"259px;\" height=\"135px;\" jsonvalue=\"%7B%7D\" style=\"border: none; transform: rotate(0rad);\" /></span></p>\r\n               <p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.2; text-align: justify;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\">[그림 1] (a) 디바운싱 (b) 바운싱 현상</span></p>\r\n               </td>\r\n            <td style=\"word-break: break-all; height: 0px; border-width: 0px; border-style: solid; border-color: #000000; vertical-align: top; padding: 7px;\"><br />\r\n               <p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.2; text-align: justify;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\">&lt;- 디바운스된 신호</span></p>\r\n               <br /><br /><br />\r\n               <p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.2; text-align: justify;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\">&lt;- 기계적 접점의 바운싱 현상</span></p>\r\n               </td>\r\n            </tr>\r\n         </tbody>\r\n      </table>\r\n   </div>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.8; font-family: 돋움; text-align: justify; background-color: #eeeeee;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;디바운싱하는데 여러 가지 방법들이 알려져 있는데 크게 두 가지로 분류할 수 있으며 하드웨어적인 방법과 소프트웨어적인 것이다. 하드웨어적인 방법은 RC 저역 필터를 슈미트트리거나 디지털 인버터에 직결한 후 이 신호를 포트 핀에 연결하는 방법인데 아래의 회로도가 대표적인 것이다.</span></p>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<div dir=\"ltr\" style=\"line-height: 1.5; font-family: 돋움; text-align: justify; background-color: #eeeeee; margin-left: 0pt;\">\r\n   <table class=\"__se_tbl_ext\" style=\"border-width: initial; border-style: none; border-color: initial;\"><colgroup><col width=\"216\" /><col width=\"351\" /></colgroup>\r\n      <tbody>\r\n         <tr style=\"height: 0px;\">\r\n            <td style=\"word-break: break-all; height: 0px; border-width: 0px; border-style: solid; border-color: #000000; vertical-align: top; padding: 7px;\">\r\n               <p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.2; text-align: justify;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\"><img src=\"https://lh4.googleusercontent.com/AhHMieCiJgNy-NzybUCRyKCGkxVdsJ5SCYmvf94f1Dqk_mgjp41e-0065Aetk06I6iG80LB-aG7t9f-eX6OpW6WSGaa6D79AwWkBDWlpHLe97uz5HH1BGg2uW3MxDkIfCr5olJo\" class=\"__se_object\" s_type=\"attachment\" s_subtype=\"image\" width=\"203px;\" height=\"145px;\" jsonvalue=\"%7B%7D\" style=\"border: none; transform: rotate(0rad);\" /></span></p>\r\n               <p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.2; text-align: justify;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\">[그림 2] 디바운싱 회로</span></p>\r\n               </td>\r\n            <td style=\"word-break: break-all; height: 0px; border-width: 0px; border-style: solid; border-color: #000000; vertical-align: top; padding: 7px;\">\r\n               <p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.2; text-align: justify;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\">대표적인 디바운싱 회로도</span></p>\r\n               <br />\r\n               <p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.2; text-align: justify;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\"> RC 필터와 슈미트트리거가 직결되어 있다. 이 회로도를 사용하면 아두이노의 내부 풀업 저항은 사용하지 못한다.</span></p>\r\n               </td>\r\n            </tr>\r\n         </tbody>\r\n      </table>\r\n   </div>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.8; font-family: 돋움; text-align: justify; background-color: #eeeeee;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;하지만 아두이노와 같은 프로세서가 사용된다면 부가적인 디바운싱 회로 없이 소프트웨어적으로 이것을 구현하여 불필요한 인터럽트를 억제할 수 있다. 여기에서는 그 방법에 대해서 설명하도록 하겠다. &nbsp;기본적인 아이디어는 ISR 함수 안에서 바운싱이 없어질 때 까지 기다렸다가 스위치 신호를 다시 읽어서 정상 호출된 것인가 아닌가를 판별하는 것이다.</span></p>\r\n<h1 dir=\"ltr\" style=\"margin: 10pt 0px 0pt; padding: 0px; font-size: 32px; font-family: 돋움; text-align: justify; background-color: #eeeeee; line-height: 1.8;\"><span style=\"font-size: 21px; font-family: &quot;Trebuchet MS&quot;; color: #0000ff; vertical-align: baseline; white-space: pre-wrap;\">falling edge 의 경우 디바운싱</span></h1>\r\n<p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.8; font-family: 돋움; text-align: justify; background-color: #eeeeee;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;만약 INT0핀에 택스위치를 연결하고 &nbsp;폴링 에지에 인터럽트가 걸리도록 설정되었다고 가정하자.</span></p>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<div dir=\"ltr\" style=\"line-height: 1.5; font-family: 돋움; text-align: justify; background-color: #eeeeee; margin-left: 0pt;\">\r\n   <table class=\"__se_tbl_ext\" style=\"border-width: initial; border-style: none; border-color: initial; width: 567px;\"><colgroup><col width=\"*\" /></colgroup>\r\n      <tbody>\r\n         <tr style=\"height: 0px;\">\r\n            <td style=\"word-break: break-all; height: 0px; border-style: solid; border-color: #000000; vertical-align: top; padding: 7px;\">\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\">attachInterrupt(INT0, toggleLed, FALLING);</span></h5>\r\n               </td>\r\n            </tr>\r\n         </tbody>\r\n      </table>\r\n   </div>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.8; font-family: 돋움; text-align: justify; background-color: #eeeeee;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;ISR 함수 처음에 바운싱이 안정될 때 까지 일정시간(80ms 정도가 적당하다.) 지연시킨 후 다음과 같이 스위치 신호를 읽은 다음 그것으로 올바른 인터럽트 호출인가를 판단한다.</span></p>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<div dir=\"ltr\" style=\"line-height: 1.5; font-family: 돋움; text-align: justify; background-color: #eeeeee; margin-left: 0pt;\">\r\n   <table class=\"__se_tbl_ext\" style=\"border-width: initial; border-style: none; border-color: initial; width: 567px;\"><colgroup><col width=\"*\" /></colgroup>\r\n      <tbody>\r\n         <tr style=\"height: 0px;\">\r\n            <td style=\"word-break: break-all; height: 0px; border-style: solid; border-color: #000000; vertical-align: top; padding: 7px;\">\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\">void isr() {</span></h5>\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;&nbsp;&nbsp;_delay_ms(80);</span></h5>\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;&nbsp;&nbsp;if (digitalRead(SW)==HIGH) return;</span></h5>\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;&nbsp;&nbsp;&lt;실제 인터럽트 처리 루틴&gt;</span></h5>\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;&nbsp;&nbsp;,,,</span></h5>\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\">}</span></h5>\r\n               </td>\r\n            </tr>\r\n         </tbody>\r\n      </table>\r\n   </div>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.8; font-family: 돋움; text-align: justify; background-color: #eeeeee;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;이 코드를 보면 80ms 지연시킨 이후에 스위치 값을 읽어 HIGH라면 잘못 호출된 것으로 판단하고 아무 일도 않고 리턴한다. 즉, 이 경우는 rising edge의 바운싱 구간에서 호출된 것으로 판단하는 것이다. 반대로 80ms 지연시킨 이후에 스위치 값이 LOW라면 falling edge에서 정상 호출된 것으로 간주하고 이후에 있는 인터럽트 처리 루틴을 실행시키는 것이다.</span></p>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.8; font-family: 돋움; text-align: justify; background-color: #eeeeee;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;이 방법은 &nbsp;손으로 버튼을 조작하는 경우 정밀한 제어가 필요치 않으므로 필자의 경험상 너무 빠르게 버튼을 동작시키지 않는 한 대부분 정상 작동한다.</span></p>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.8; font-family: 돋움; text-align: justify; background-color: #eeeeee;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;이 설명에서 처음 소개하는 함수가 있는데 바로 _delay_ms() 함수이다. 이름을 보면 지연시키는 함수라는 것을 알 수 있을 텐데 왜 아두이노의 표준 함수인 delay() 함수 대신 이 함수를 사용했는지 의문이 들 것이다. ISR함수 안에서 아두이노의 시간관련 함수인 다음 함수들은 정상 동작하지 않는다.(주의!)</span></p>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<div dir=\"ltr\" style=\"line-height: 1.5; font-family: 돋움; text-align: justify; background-color: #eeeeee; margin-left: 0pt;\">\r\n   <table class=\"__se_tbl_ext\" style=\"border-width: initial; border-style: none; border-color: initial; width: 567px;\"><colgroup><col width=\"*\" /></colgroup>\r\n      <tbody>\r\n         <tr style=\"height: 0px;\">\r\n            <td style=\"word-break: break-all; height: 0px; border-style: solid; border-color: #000000; vertical-align: top; padding: 7px;\">\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\">delay(), delayMicrosecond(), millis(), micros()</span></h5>\r\n               </td>\r\n            </tr>\r\n         </tbody>\r\n      </table>\r\n   </div>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.8; font-family: 돋움; text-align: justify; background-color: #eeeeee;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\">이 함수들은 내부적으로 타이머 인터럽트를 사용하므로 ISR안에서는 작동할 수 없다. 이유는 ISR이 호출되는 순간 인터럽트가 자동으로 막히고 ISR의 끝나야 인터럽트가 다시 가능하게 되기 때문이다. avr에 대한 지식이 있다면 이해가 쉽게 가겠지만 일단은 위 함수들은 ISR 안에서 정상 동작하지 않는다고만 알아도 된다. 이것은 필자가 구글링을 해 보고 직접 실험으로 확인한 사실이다.</span></p>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.8; font-family: 돋움; text-align: justify; background-color: #eeeeee;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;반면에 _delay_ms()함수는 단순히 소트프웨어적으로 지연을 시켜주는 함수라서 ISR안에서도 정상 작동한다. 단, 이 함수를 사용하기 위해서는 다음과 같이 헤더 파일을 인클루드 시켜야 한다. (avr-gcc에서 사용되는 유틸리티 라이브러리이다.)</span></p>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<div dir=\"ltr\" style=\"line-height: 1.5; font-family: 돋움; text-align: justify; background-color: #eeeeee; margin-left: 0pt;\">\r\n   <table class=\"__se_tbl_ext\" style=\"border-width: initial; border-style: none; border-color: initial; width: 567px;\"><colgroup><col width=\"*\" /></colgroup>\r\n      <tbody>\r\n         <tr style=\"height: 0px;\">\r\n            <td style=\"word-break: break-all; height: 0px; border-style: solid; border-color: #000000; vertical-align: top; padding: 7px;\">\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\">#include&lt;util/delay.h&gt;</span></h5>\r\n               </td>\r\n            </tr>\r\n         </tbody>\r\n      </table>\r\n   </div>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.8; font-family: 돋움; text-align: justify; background-color: #eeeeee;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\">전체 프로그램은 다음과 같다.</span></p>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<div dir=\"ltr\" style=\"line-height: 1.5; font-family: 돋움; text-align: justify; background-color: #eeeeee; margin-left: 0pt;\">\r\n   <table class=\"__se_tbl_ext\" style=\"border-width: initial; border-style: none; border-color: initial; width: 567px;\"><colgroup><col width=\"*\" /></colgroup>\r\n      <tbody>\r\n         <tr style=\"height: 0px;\">\r\n            <td style=\"word-break: break-all; height: 0px; border-style: solid; border-color: #000000; vertical-align: top; padding: 7px;\">\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\">#include&lt;util/delay.h&gt;</span></h5>\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\">#define SW 2</span></h5>\r\n               <br />\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\">void setup() {</span></h5>\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pinMode(LED_BUILTIN, OUTPUT);</span></h5>\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pinMode(SW, INPUT_PULLUP);</span></h5>\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attachInterrupt(INT0, toggleLed, FALLING);</span></h5>\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\">}</span></h5>\r\n               <br />\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\">void loop() {</span></h5>\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\">}</span></h5>\r\n               <br />\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\">void toggleLed() {</span></h5>\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;_delay_ms(80);</span></h5>\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;if (digitalRead(SW)==HIGH) return;</span></h5>\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));</span></h5>\r\n               <h5 dir=\"ltr\" style=\"margin: 0pt 0px; padding: 0px; font-size: 13px; line-height: 1.38; text-align: justify;\"><span style=\"font-size: 15px; font-family: Consolas; vertical-align: baseline; white-space: pre-wrap;\">}</span></h5>\r\n               </td>\r\n            </tr>\r\n         </tbody>\r\n      </table>\r\n   </div>\r\n<p><br style=\"font-family: 돋움; text-align: justify; background-color: #eeeeee;\" /></p>\r\n<p dir=\"ltr\" style=\"margin-top: 0pt; margin-bottom: 0pt; padding: 0px; line-height: 1.8; font-family: 돋움; text-align: justify; background-color: #eeeeee;\"><span style=\"font-size: 15px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;\"> &nbsp;스위치의 디바운싱은 고전적이만 해결하기 꽤 까다로운 문제이다. 하지만 여기서 소개한 방법을 사용하면 대부분의 경우 잘 동작한다.</span></p>\r\n<p>\r\n   <p>&nbsp;</p>\r\n   </p>\r\n<div class=\"autosourcing-stub-extra\" style=\"line-height: 1.5; zoom: 1; opacity: 1;\">\r\n   <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><a href=\"https://blog.naver.com/openengmath/220367189245\" target=\"_blank\" style=\"text-decoration: none;\">아두이노를 이용한 소프트웨어 디바운싱(debouncing) part 1/2</a><span style=\"padding: 0px 7px 0px 5px;\">|</span><strong style=\"padding: 0px 7px 0px 0px;\">작성자</strong><a href=\"https://blog.naver.com/openengmath\" target=\"_blank\" style=\"text-decoration: none;\">openengmath</a></p>\r\n   </div>','https://openengmath.blog.me/220367189245','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:04:08',0,'2019-04-26 15:04:08','210.101.103.92','','','','','','','','','','','',''),(303,-303,'',303,0,0,'','','html1','[Arduino] Dot matrix LED관련 링크','<p><a href=\"http://www.planetarduino.org/?cat=474\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://www.planetarduino.org/?cat=474</a><span style=\"color: #404040; font-family: 굴림;\">&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><a href=\"http://www.instructables.com/id/16x8-LED-dot-matrix-with-MAX7219-module/\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://www.instructables.com/id/16x8-LED-dot-matrix-with-MAX7219-module/</a><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: 굴림;\">*Dot matrix web desinger tool&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><a href=\"http://www.pial.net/8x8-dot-matrix-font-generator-based-on-javascript-and-html/\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://www.pial.net/8x8-dot-matrix-font-generator-based-on-javascript-and-html/</a></p>','','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:04:46',0,'2019-04-26 15:04:46','210.101.103.92','','','','','','','','','','','',''),(304,-304,'',304,0,0,'','','html1','[Arduino] mega보드 하드웨어 시리얼포트 사용','<p><span style=\"color: #404040; font-family: 굴림;\">HW Serial 사용법은 간단합니다.&nbsp;</span><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: 굴림;\">// #include &lt;SoftwareSerial.h&gt;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">// SoftwareSerial BTSerial(10, 11); // TX, RX&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">BTSerial 을 사용하고자 하시는 HW 시리얼로 바꾸시면 됩니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">BTSerial --&gt; Serial // HW Serial 1 을 사용하고자 하는 경우, 핀번호 (0, 1)&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">BTSerial --&gt; Serial1 // HW Serial 2 을 사용하고자 하는 경우, 핀번호 (19, 18)&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">BTSerial --&gt; Serial2 // HW Serial 3 을 사용하고자 하는 경우, 핀번호 (17, 16)&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">BTSerial --&gt; Serial3 // HW Serial 4 을 사용하고자 하는 경우, 핀번호 (15, 14)&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">ex)&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">Serial1.begin(9600);&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">if(Serial1.availbale()) {&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">switch(Serial1.read()) {&nbsp;</span><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: 굴림;\">}&nbsp;</span></p>','','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:04:58',0,'2019-04-26 15:04:58','210.101.103.92','','','','','','','','','','','',''),(305,-305,'',305,0,0,'','','html1','[Arduino] 메가에서 하드웨어 시리얼 사용하기','<p><span style=\"color: #404040; font-family: 굴림;\">HW Serial 사용법은 간단합니다.&nbsp;</span><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: 굴림;\">#include &lt;SoftwareSerial.h&gt;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">SoftwareSerial BTSerial(10, 11); // TX, RX&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">BTSerial 을 사용하고자 하시는 HW 시리얼로 바꾸시면 됩니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">BTSerial --&gt; Serial // HW Serial 1 을 사용하고자 하는 경우, 핀번호 (0, 1)&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">BTSerial --&gt; Serial1 // HW Serial 2 을 사용하고자 하는 경우, 핀번호 (19, 18)&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">BTSerial --&gt; Serial2 // HW Serial 3 을 사용하고자 하는 경우, 핀번호 (17, 16)&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">BTSerial --&gt; Serial3 // HW Serial 4 을 사용하고자 하는 경우, 핀번호 (15, 14)&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">ex)&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">Serial1.begin(9600);&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">if(Serial1.availbale()) {&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">switch(Serial1.read()) {&nbsp;</span><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: 굴림;\">}&nbsp;</span></p>','','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:05:07',0,'2019-04-26 15:05:07','210.101.103.92','','','','','','','','','','','',''),(306,-306,'',306,0,0,'','','html1','[Arduino] ESP8266 + Arduino + WiFi camera','<header class=\"entry-header\" style=\"padding: 0px; margin: 0px auto; width: 701.141px; color: #373737; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 15px; background-color: #ffffff;\">\r\n   <h1 class=\"entry-title\" style=\"padding: 15px 0px 0.3em; margin: 0px; font-style: inherit; border: 0px; font-family: inherit; font-size: 36px; outline: 0px; vertical-align: baseline; clear: both; color: #000000; line-height: 48px;\">ArduCAM now Supports ESP8266 Arduino Board with WIFI Websocket Camera Demo</h1>\r\n   <div class=\"entry-meta\" style=\"padding: 0px; margin: 0px; border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline; color: #666666; clear: both; line-height: 18px; position: absolute; top: 0px; left: 0px;\"><span class=\"sep\" style=\"padding: 0px; margin: 0px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">Posted on&nbsp;</span><a href=\"http://www.arducam.com/arducam-supports-esp8266-arduino-board-wifi-websocket-camera-demo/\" title=\"5:47 am\" rel=\"bookmark\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: bold; outline: 0px; vertical-align: baseline;\" target=\"_blank\">October 4, 2015</a><span class=\"by-author\" style=\"padding: 0px; margin: 0px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;<span class=\"sep\" style=\"padding: 0px; margin: 0px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">by&nbsp;</span><span class=\"author vcard\" style=\"padding: 0px; margin: 0px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\"><a class=\"url fn n\" href=\"http://www.arducam.com/author/fpga4u/\" title=\"View all posts by Lee Jackson\" rel=\"author\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: bold; outline: 0px; vertical-align: baseline;\" target=\"_blank\">Lee Jackson</a></span></span></div>\r\n   </header>\r\n<div class=\"entry-content\" style=\"padding: 1.625em 0px 0px; margin: 0px auto; border: 0px; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 15px; outline: 0px; vertical-align: baseline; width: 701.141px; color: #373737; background-color: #ffffff;\">\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">It is good news to hear that the&nbsp;<a href=\"https://github.com/esp8266/arduino\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\" target=\"_blank\">Arduino IDE support</a>&nbsp;was announced on the&nbsp;<a href=\"https://github.com/esp8266/arduino\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\" target=\"_blank\">ESP8266 community forum</a>, the source code can be found from&nbsp;.&nbsp;It is more than another Arduino board, but can be thought as a Arduino combined with a WIFI shield. With faster CPU speed and much smaller form of factor, most important the less than $10USD price is more attractive, you are worth to try although there are also some limitations.&nbsp;Setup is fairly simple with downloads for Linux, OS X, and Windows. More detail setup can be found from adafruit&nbsp;<a href=\"https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\" target=\"_blank\">guide.</a><span id=\"more-1093\" style=\"padding: 0px; margin: 0px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\"></span></p>\r\n   <div id=\"gallery-1\" class=\"gallery galleryid-1093 gallery-columns-3 gallery-size-thumbnail\" style=\"padding: 0px; margin: 0px auto 1.625em; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">\r\n      <dl class=\"gallery-item\" style=\"padding: 0px; margin: 10px 0px 0px; list-style: none; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline; float: left; text-align: center; width: 231.375px;\"><dt class=\"gallery-icon landscape\" style=\"padding: 0px; margin: 0px; list-style: none; border: 0px; font-family: inherit; font-style: inherit; font-weight: bold; outline: 0px; vertical-align: baseline;\"><a href=\"http://www.arducam.com/arducam-supports-esp8266-arduino-board-wifi-websocket-camera-demo/esp8266_demo/\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\" target=\"_blank\"><img width=\"150\" src=\"http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_demo-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" aria-describedby=\"gallery-1-1095\" srcset=\"http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_demo-150x150.jpg 150w, http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_demo-100x100.jpg 100w\" sizes=\"(max-width: 150px) 100vw, 150px\" style=\"padding: 6px; margin: 0px; vertical-align: bottom; border: 1px solid rgb(221, 221, 221); max-width: calc(100% - 14px); height: auto;\" /></a></dt>\r\n         <dd class=\"wp-caption-text gallery-caption\" id=\"gallery-1-1095\" style=\"padding: 0px; margin: 0px 0px 1.625em; list-style: none; border: 0px; font-family: Georgia, serif; font-size: 12px; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline; color: #666666;\">ArduCAM for ESP8266</dd>\r\n         </dl>\r\n      <dl class=\"gallery-item\" style=\"padding: 0px; margin: 10px 0px 0px; list-style: none; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline; float: left; text-align: center; width: 231.375px;\"><dt class=\"gallery-icon landscape\" style=\"padding: 0px; margin: 0px; list-style: none; border: 0px; font-family: inherit; font-style: inherit; font-weight: bold; outline: 0px; vertical-align: baseline;\"><a href=\"http://www.arducam.com/arducam-supports-esp8266-arduino-board-wifi-websocket-camera-demo/esp8266_websocket_demo/\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\" target=\"_blank\"><img width=\"150\" src=\"http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_websocket_demo-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" aria-describedby=\"gallery-1-1108\" srcset=\"http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_websocket_demo-150x150.jpg 150w, http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_websocket_demo-100x100.jpg 100w\" sizes=\"(max-width: 150px) 100vw, 150px\" style=\"padding: 6px; margin: 0px; vertical-align: bottom; border: 1px solid rgb(221, 221, 221); max-width: calc(100% - 14px); height: auto;\" /></a></dt>\r\n         <dd class=\"wp-caption-text gallery-caption\" id=\"gallery-1-1108\" style=\"padding: 0px; margin: 0px 0px 1.625em; list-style: none; border: 0px; font-family: Georgia, serif; font-size: 12px; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline; color: #666666;\">Arduino Websocket Camera</dd>\r\n         </dl>\r\n      <br style=\"padding: 0px; margin: 0px; clear: both;\" /></div>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">Now ArduCAM ports our camera libraries for ESP8266, you can use the ESP8266 module with ArduCAM modules to take high quality high resolution photos and save to SD card, or even to publish the photos to webpage.&nbsp;In this tutorial we will use ESP8266 arduino board to take photos and publish to webpage.</p>\r\n   <h1 style=\"padding: 0px; margin: 0px 0px 0.8125em; font-style: inherit; border: 0px; font-family: inherit; font-size: 15px; outline: 0px; vertical-align: baseline; clear: both; color: #000000;\">Websocket Background</h1>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">In order to transfer a photo to webpage, I have to briefly introduce the technology of websocket first. WebSocket is a protocol providing full-duplex communication channels over a single TCP connection. It is designed to be implemented in web browsers and web servers, so it can be used by any client and any platform like PCs, laptops, pads and smart phones. The standard HTTP protocol which is C/S based architecture, a client send a request to a server, the server send the information requested back to the client and close connection immediately. Unlike the standard HTTP protocol, the websocket protocol only use HTTP protocol for handshake stage, and keep the connection open afterward. It allows bi-directional conversation between a browser and the server. Detail websocket description can be found from&nbsp;<a href=\"https://en.wikipedia.org/wiki/WebSocket\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\" target=\"_blank\">wiki</a>.</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">In this demo, we create a websocket server on the ESP8266 arduino borad. It connects to a user defined WIFI router by DHCP, then you can connect to this server via your web browser.</p>\r\n   <h1 style=\"padding: 0px; margin: 0px 0px 0.8125em; font-style: inherit; border: 0px; font-family: inherit; font-size: 15px; outline: 0px; vertical-align: baseline; clear: both; color: #000000;\">Demo&nbsp;Prerequisite</h1>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">To complete this demo you need two items:</p>\r\n   <ul style=\"padding: 0px; margin: 0px 0px 1.625em 2.5em; list-style: square; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">\r\n      <li style=\"padding: 0px; margin: 0px; list-style: square; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\"><a href=\"http://www.uctronics.com/wifi-internet-development-board-based-on-esp8266-module-for-nodemcu-lua.html\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\" target=\"_blank\">ESP8266 arduino board</a></li>\r\n      <li style=\"padding: 0px; margin: 0px; list-style: square; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\"><a href=\"http://blog.uctronics.com/arducam-mini-released/\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\" target=\"_blank\">ArduCAM-Mini-2MP</a>&nbsp;camera module</li>\r\n      </ul>\r\n   <h1 style=\"padding: 0px; margin: 0px 0px 0.8125em; font-style: inherit; border: 0px; font-family: inherit; font-size: 15px; outline: 0px; vertical-align: baseline; clear: both; color: #000000;\"><strong style=\"padding: 0px; margin: 0px; border: 0px; font-family: inherit; font-style: inherit; outline: 0px; vertical-align: baseline;\">Hardware connection</strong></h1>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">The connection between the ESP8266 board and ArduCAM mini is shown as the following picture and table.</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\"><a href=\"http://blog.uctronics.com/arducam-supports-esp8266-arduino-board-wifi-websocket-camera-demo/esp8266_diagram-2/\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\" target=\"_blank\"><img class=\"alignleft wp-image-1204 size-medium\" src=\"http://blog.uctronics.com/wp-content/uploads/2015/10/ESP8266_diagram-1-174x300.jpg\" alt=\"\" width=\"174\" srcset=\"http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_diagram-1-174x300.jpg 174w, http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_diagram-1-300x518.jpg 300w, http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_diagram-1-593x1024.jpg 593w, http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_diagram-1.jpg 721w\" sizes=\"(max-width: 174px) 100vw, 174px\" style=\"padding: 6px; margin: 0.4em 1.625em 1.625em 0px; vertical-align: bottom; border: 1px solid rgb(221, 221, 221); display: inline; float: left; max-width: calc(100% - 14px); height: auto;\" /></a></p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\"><a href=\"http://blog.uctronics.com/arducam-supports-esp8266-arduino-board-wifi-websocket-camera-demo/esp8266_wiring_table-2/\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\" target=\"_blank\"><img class=\"alignleft wp-image-1206 size-medium\" src=\"http://blog.uctronics.com/wp-content/uploads/2015/10/ESP8266_wiring_table-1-300x190.jpg\" alt=\"\" width=\"300\" srcset=\"http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_wiring_table-1-300x190.jpg 300w, http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_wiring_table-1-473x300.jpg 473w, http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_wiring_table-1.jpg 516w\" sizes=\"(max-width: 300px) 100vw, 300px\" style=\"padding: 6px; margin: 0.4em 1.625em 1.625em 0px; vertical-align: bottom; border: 1px solid rgb(221, 221, 221); display: inline; float: left; max-width: calc(100% - 14px); height: auto;\" /></a></p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <h1 style=\"padding: 0px; margin: 0px 0px 0.8125em; font-style: inherit; border: 0px; font-family: inherit; font-size: 15px; outline: 0px; vertical-align: baseline; clear: both; color: #000000;\">Arduino Sketches and library</h1>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">Before running the demo sketch, you need to copy three libraries ArduCAM, UTFT4ArduCAM_SPI and ESP8266-Websocket to the Arduino libraries folder.</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">Open the demo sketch&nbsp;<a href=\"https://github.com/ArduCAM/Arduino/blob/master/ArduCAM/examples/ESP8266/ArduCAM_Mini_OV2640_websocket_server/ArduCAM_Mini_OV2640_websocket_server.ino\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\" target=\"_blank\">ArduCAM_Mini_OV2640_websocket_server.ino</a>, change the following line according to your own wifi AP router, then upload.</p>\r\n   <pre class=\"brush:cpp\" style=\"padding: 0.75em 1.625em; margin-top: 0px; margin-bottom: 1.625em; border: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: 1.5; font-family: &quot;Courier 10 Pitch&quot;, Courier, monospace; outline: 0px; vertical-align: baseline; background: rgb(244, 244, 244); overflow: auto;\">const char* ssid = \"your_ssid\";\r\nconst char* password = \"your_passpwd\";</pre>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\"><a href=\"http://blog.uctronics.com/wp-content/uploads/2015/10/ESP8266_sketch.jpg\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\" target=\"_blank\"><img class=\"alignleft wp-image-1101 size-full\" src=\"http://blog.uctronics.com/wp-content/uploads/2015/10/ESP8266_sketch.jpg\" alt=\"ESP8266_sketch\" srcset=\"http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_sketch.jpg 665w, http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_sketch-300x271.jpg 300w, http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_sketch-332x300.jpg 332w\" sizes=\"(max-width: 665px) 100vw, 665px\" style=\"padding: 6px; margin: 0.4em 1.625em 1.625em 0px; vertical-align: bottom; border: 1px solid rgb(221, 221, 221); display: inline; float: left; max-width: calc(100% - 14px); height: auto; width: auto;\" /></a><a href=\"http://blog.uctronics.com/wp-content/uploads/2015/10/ESP8266_upload.jpg\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\" target=\"_blank\"><img class=\"alignleft wp-image-1102 size-full\" src=\"http://blog.uctronics.com/wp-content/uploads/2015/10/ESP8266_upload.jpg\" alt=\"ESP8266_upload\" srcset=\"http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_upload.jpg 498w, http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_upload-300x363.jpg 300w, http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_upload-248x300.jpg 248w\" sizes=\"(max-width: 498px) 100vw, 498px\" style=\"padding: 6px; margin: 0.4em 1.625em 1.625em 0px; vertical-align: bottom; border: 1px solid rgb(221, 221, 221); display: inline; float: left; max-width: calc(100% - 14px); height: auto; width: auto;\" /></a></p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">The assigned IP address can be determined via serial monitor message.</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\"><a href=\"http://blog.uctronics.com/wp-content/uploads/2015/10/DHCP_IPaddress.jpg\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\" target=\"_blank\"><img class=\"alignleft wp-image-1103 size-full\" src=\"http://blog.uctronics.com/wp-content/uploads/2015/10/DHCP_IPaddress.jpg\" alt=\"DHCP_IPaddress\" srcset=\"http://www.arducam.com/wp-content/uploads/2015/10/DHCP_IPaddress.jpg 472w, http://www.arducam.com/wp-content/uploads/2015/10/DHCP_IPaddress-300x364.jpg 300w, http://www.arducam.com/wp-content/uploads/2015/10/DHCP_IPaddress-247x300.jpg 247w\" sizes=\"(max-width: 472px) 100vw, 472px\" style=\"padding: 6px; margin: 0.4em 1.625em 1.625em 0px; vertical-align: bottom; border: 1px solid rgb(221, 221, 221); display: inline; float: left; max-width: calc(100% - 14px); height: auto; width: auto;\" /></a></p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">&nbsp;</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">Provide you now have the IP address 192.168.1.105 for websocket server, and open the camera_demo.html located in your&nbsp;<strong style=\"padding: 0px; margin: 0px; border: 0px; font-family: inherit; font-style: inherit; outline: 0px; vertical-align: baseline;\">Arduino\\arduino-1.6.5-r5\\libraries\\ArduCAM\\examples\\ESP8266\\ArduCAM_Mini_OV2640_websocket_server\\html</strong>&nbsp;folder from your web browser. Change the websocket IP address get from the serial monitor marked in red box in the picture.</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\"><a href=\"http://blog.uctronics.com/wp-content/uploads/2015/10/ESP8266_webpage1.jpg\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\" target=\"_blank\"><img class=\"alignleft wp-image-1106 size-full\" src=\"http://blog.uctronics.com/wp-content/uploads/2015/10/ESP8266_webpage1.jpg\" alt=\"ESP8266_webpage\" srcset=\"http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_webpage1.jpg 884w, http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_webpage1-300x209.jpg 300w, http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_webpage1-430x300.jpg 430w\" sizes=\"(max-width: 884px) 100vw, 884px\" style=\"padding: 6px; margin: 0.4em 1.625em 1.625em 0px; vertical-align: bottom; border: 1px solid rgb(221, 221, 221); display: inline; float: left; max-width: calc(100% - 14px); height: auto; width: auto;\" /></a>Click the “Connect” button, you will see the websocket connection request from the serial monitor. After few seconds, the webpage will notify the successful connection established.</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\"><a href=\"http://blog.uctronics.com/wp-content/uploads/2015/10/ESP8266_websocket_request.jpg\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\" target=\"_blank\"><img class=\"alignleft wp-image-1107 size-full\" src=\"http://blog.uctronics.com/wp-content/uploads/2015/10/ESP8266_websocket_request.jpg\" alt=\"ESP8266_websocket_request\" srcset=\"http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_websocket_request.jpg 843w, http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_websocket_request-300x204.jpg 300w, http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_websocket_request-441x300.jpg 441w\" sizes=\"(max-width: 843px) 100vw, 843px\" style=\"padding: 6px; margin: 0.4em 1.625em 1.625em 0px; vertical-align: bottom; border: 1px solid rgb(221, 221, 221); display: inline; float: left; max-width: calc(100% - 14px); height: auto; width: auto;\" /></a></p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\">After that you can click the send button to send a websocket message to ESP8266. It will trigger the capture command on the ESP8266 arduino side, and it will send back the captured image and display on the webpage.</p>\r\n   <p style=\"padding: 0px; margin-bottom: 1.625em; color: #6b6b6b; line-height: 20px; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\"><a href=\"http://blog.uctronics.com/wp-content/uploads/2015/10/ESP8266_websocket_demo.jpg\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;\" target=\"_blank\"><img class=\"alignleft wp-image-1108 size-full\" src=\"http://blog.uctronics.com/wp-content/uploads/2015/10/ESP8266_websocket_demo.jpg\" alt=\"ESP8266_websocket_demo\" srcset=\"http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_websocket_demo.jpg 1015w, http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_websocket_demo-300x136.jpg 300w, http://www.arducam.com/wp-content/uploads/2015/10/ESP8266_websocket_demo-500x226.jpg 500w\" sizes=\"(max-width: 1015px) 100vw, 1015px\" style=\"padding: 6px; margin: 0.4em 1.625em 1.625em 0px; vertical-align: bottom; border: 1px solid rgb(221, 221, 221); display: inline; float: left; max-width: calc(100% - 14px); height: auto; width: auto;\" /></a></p>\r\n   </div>\r\n<footer class=\"entry-meta\" style=\"padding: 0px; margin: 0px auto; color: #666666; clear: both; line-height: 18px; width: 701.141px; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;\">This entry was posted in&nbsp;<a href=\"http://www.arducam.com/category/camera-module-demonstration/\" rel=\"category tag\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: bold; outline: 0px; vertical-align: baseline;\" target=\"_blank\">Camera Module Demonstration</a>&nbsp;and tagged&nbsp;<a href=\"http://www.arducam.com/tag/arducam-esp8266/\" rel=\"tag\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: bold; outline: 0px; vertical-align: baseline;\" target=\"_blank\">ArduCAM ESP8266</a>,&nbsp;<a href=\"http://www.arducam.com/tag/esp8266-websocket/\" rel=\"tag\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: bold; outline: 0px; vertical-align: baseline;\" target=\"_blank\">ESP8266 websocket</a>,&nbsp;<a href=\"http://www.arducam.com/tag/websocket-camera/\" rel=\"tag\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: bold; outline: 0px; vertical-align: baseline;\" target=\"_blank\">websocket camera</a>&nbsp;by&nbsp;<a href=\"http://www.arducam.com/author/fpga4u/\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: bold; outline: 0px; vertical-align: baseline;\" target=\"_blank\">Lee Jackson</a>. Bookmark the&nbsp;<a href=\"http://www.arducam.com/arducam-supports-esp8266-arduino-board-wifi-websocket-camera-demo/\" title=\"Permalink to ArduCAM now Supports ESP8266 Arduino Board with WIFI Websocket Camera Demo\" rel=\"bookmark\" style=\"padding: 0px; margin: 0px; text-decoration-line: none; color: #1982d1; border: 0px; font-family: inherit; font-style: inherit; font-weight: bold; outline: 0px; vertical-align: baseline;\" target=\"_blank\">permalink</a>.</footer>','http://www.arducam.com/arducam-supports-esp8266-arduino-board-wifi-websocket-camera-demo/','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:05:30',0,'2019-04-26 15:05:30','210.101.103.92','','','','','','','','','','','',''),(307,-307,'',307,0,0,'','','html1','[Java] 형변환에서 0xff 혹은.. 0xffff와 &를 왜 사용하는 걸까 (java)','<p><span style=\"color: #404040; font-family: 굴림;\">형변환에서 0xff 혹은.. 0xffff와 &amp;를 왜 사용하는 걸까 (java)&nbsp; C Sharp&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">2009.05.13. 15:51&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">복사</span><a href=\"http://blog.naver.com/mcpop77/150047524326\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://blog.naver.com/mcpop77/150047524326</a><span style=\"color: #404040; font-family: 굴림;\">&nbsp;</span><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: 굴림;\">package ByteOrder;&nbsp;</span><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: 굴림;\">// 형변환에서 0xff 혹은.. 0xffff와 &amp;를 왜 사용하는 걸까요?&nbsp;</span><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: 굴림;\">public class Test1 {&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;public static void main(String[] args) {&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; // int 192는 1byte표현(1byte는 256까지 표현가능)으로 가능하기 때문에 아래와 같이 쓸 수 있다..&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; // 그러나... 결과는..&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; // 즉, 값의 크기만으로는 192를 byte 타입에 담을 수 있으나.. 비트로 계산시 첫번째 1은 음수로 인식하기 때문에&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; // 직접적으로 byte로 표현하면 엉뚱한 값이 나온다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; // 이유는 byte가 비트로는 8비트여서 0 ~ 256까지 표현할 수 있을 것으나&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; // 실제는 -128 ~ 127까지 지원한다.. 즉, 최상위 비트를 부호를 표현하는데 쓴다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; int i = 192; // 2진수로 표현하면 11000000&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; byte b = (byte) i;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; System.out.println((int)b); // byte를 int로 표현하면 결과는 -64, 이유는 11000000의 첫번째 1을 음수 표현으로 인식하기 때문.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; // 그래서.. 11000000의 첫번째 1을 음수 표현이 아닌 정상적인 수로 인식하게 끔 만들 필요가 생겼다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; // 0xff와 &amp;을 이용하여 해결할 수 있는데..&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; // 여기서 중요한 것은..0xff는 4byte의 int라는 것이다..&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; // 즉, 0xff는 0000000 0000000 0000000 11111111 이라는 것이다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; // 결국 11000000과 0xff를 &amp; 연산하면 0000000 0000000 0000000 11000000 이것이 나온다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; // 즉, 11000000과 0xff를 &amp; 연산은 4byte의 int형이 되면서 정상적인 int 192가 된다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; int i2 = i &amp; 0xff;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; System.out.println(i2);&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; // 결론 :&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; // byte 데이타를 0xff(int형, 00000000 00000000 0000000 11111111)을 이용하여&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; // int형으로 변환하여 음수가 아닌 원래의 값으로 사용하기 위한 중간과정으로서 0xff와 &amp;을 이용한다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; // 즉, 0xff와 &amp;를 사용하는 이유는 비트 표현시 첫번째 1을 음수로 인식하는떼 따른 엉뚱한 값으로 표현되는 것을&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; // 방지하여 음수가 아닌 원래의 값으로 표현되도록 하기위한 방법이다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;}&nbsp;</span><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: 굴림;\">[출처] 형변환에서 0xff 혹은.. 0xffff와 &amp;를 왜 사용하는 걸까 (java)|작성자 mcpop77</span></p>','http://blog.naver.com/PostView.nhn?blogId=mcpop77&logNo=150047524326','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:05:55',0,'2019-04-26 15:05:55','210.101.103.92','','','','','','','','','','','',''),(308,-308,'',308,0,0,'','','html1','[Arduino] Arduino + App Inventor + BT RGB LED','<p><a href=\"http://stonez56.blogspot.kr/2015/02/arduino-project-android-control-color.html\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://stonez56.blogspot.kr/2015/02/arduino-project-android-control-color.html</a><span style=\"color: #404040; font-family: 굴림;\">&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><a href=\"http://stonez56.blogspot.tw/2014/09/arduino-android-led.html\" target=\"_new\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\">http://stonez56.blogspot.tw/2014/09/arduino-android-led.html</a></p>','','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:06:14',1,'2019-04-26 15:06:14','210.101.103.92','','','','','','','','','','','',''),(309,-309,'',309,0,0,'','','html1','[Arduino] 아두이노 float을 문자열로 변환','<p style=\"box-sizing: border-box; margin-bottom: 20px; font-family: &quot;Jeju Gothic&quot;, sans-serif; color: #666666; font-size: 13px; background-color: #ffffff;\">아두이노에서 아래처럼 sprintf을 이용하여 문자열로 변경하려고 할때<br style=\"box-sizing: border-box;\" />결과를 보면 ? 가 출력된다.</p>\r\n<pre style=\"box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; font-size: 1.076em; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; overflow-wrap: break-word; color: #333333; background-color: #f5f5f5; border: 1px solid rgb(204, 204, 204); border-radius: 4px;\">sprintf(pChrBuffer, \"%f\", fltValue);\r\n</pre>\r\n<p style=\"box-sizing: border-box; margin-bottom: 20px; font-family: &quot;Jeju Gothic&quot;, sans-serif; color: #666666; font-size: 13px; background-color: #ffffff;\">아두이노에서는 float형에 대해서 sprintf가 제대로 지원되지 않는듯하여,<br style=\"box-sizing: border-box;\" />확인하여 보니 아래 함수를 이용하면 변환할수 있다.</p>\r\n<pre style=\"box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; font-size: 1.076em; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; overflow-wrap: break-word; color: #333333; background-color: #f5f5f5; border: 1px solid rgb(204, 204, 204); border-radius: 4px;\">char * dtostrf(ouble __val, signed char __width, unsigned char __prec, char * __s);\r\n</pre>\r\n<pre style=\"box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; font-size: 1.076em; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; overflow-wrap: break-word; color: #333333; background-color: #f5f5f5; border: 1px solid rgb(204, 204, 204); border-radius: 4px;\">float fltValue = 123.456;\r\nchar pChrBuffer[50];\r\ndtostrf(fltValue , 5, 2, pChrBuffer);  // 5 : width, 2 : precision\r\n</pre>\r\n<p style=\"box-sizing: border-box; margin-bottom: 20px; font-family: &quot;Jeju Gothic&quot;, sans-serif; color: #666666; font-size: 13px; background-color: #ffffff;\">다른 방법으로는 String을 이용하여 아래와 같이 할수도 있다.</p>\r\n<pre style=\"box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; font-size: 1.076em; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; overflow-wrap: break-word; color: #333333; background-color: #f5f5f5; border: 1px solid rgb(204, 204, 204); border-radius: 4px;\">String strValue = String(fltValue);</pre>','http://blog.moramcnt.com/?p=672','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:06:36',0,'2019-04-26 15:06:36','210.101.103.92','','','','','','','','','','','',''),(310,-310,'',310,0,0,'','','html1','[Arduino] FTDI 칩 사용 불가 문제 해결법','<div class=\"se_component se_paragraph default\" style=\"margin-top: 24px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei; -webkit-font-smoothing: antialiased; word-break: normal; margin-left: 40px; margin-right: 40px; color: #8a837e; font-size: 13.3333px; background-color: #ffffff;\">\r\n   <div class=\"se_sectionArea\" style=\"position: relative; width: 705px; margin: 0px auto; max-width: none;\">\r\n      <div class=\"se_editArea\" style=\"position: relative;\">\r\n         <div class=\"se_viewArea se_ff_nanumgothic\" style=\"position: relative; font-family: 나눔고딕, nanumgothic, se_NanumGothic, AppleSDGothicNeo, sans-serif, simhei; overflow-wrap: break-word; line-height: 1.9;\">\r\n            <div class=\"se_editView\" style=\"position: relative;\">\r\n               <div class=\"se_textView se_fs_T3\" style=\"font-size: 16px;\">\r\n                  <p class=\"se_textarea\" style=\"padding: 0px; width: 705px; height: 540px; outline: 0px; border: none; background: 0px 0px; font-family: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; color: inherit; font-style: inherit; text-decoration: inherit; resize: none; overflow-wrap: break-word; word-break: break-all;\"><span style=\"background-color: inherit;\">알리에서 아두이노를 사거나, usb-serial 어댑터 등을 사용하는 제품 등에 발생하는 문제입니다.<br /></span><span style=\"background-color: inherit;\"><br /></span><span style=\"background-color: inherit;\">기존에 잘 쓰던 부품이 업데이트 된 드라이버를 사용하면 더이상 사용할 수 없도록 내부적으로 프로그래밍 되어 버립니다.<br /></span><span style=\"background-color: inherit;\"><br /></span><span style=\"background-color: inherit;\">따라서 이 제품을 이용해서 뭔가 송/수신을 할때 115200 BAUD RATE 으로 \" NON GENUINE DEVICE FOUND\" 라는 글자가 출력되게 됩니다.<br /></span><span style=\"background-color: inherit;\"><br /></span><span style=\"background-color: inherit;\">해결법은 다음과 같습니다<br /></span><span style=\"background-color: inherit;\"><br /></span><span style=\"background-color: inherit;\">이전 버전 드라이버 (2.10.00) 를 먼저 받아둡니다.</span><span style=\"background-color: inherit;\"></span><span style=\"background-color: inherit;\"><br /></span><span style=\"background-color: inherit;\"><a href=\"http://www.ftdichip.com/Drivers/CDM/CDM%20v2.10.00%20WHQL%20Certified.exe\" target=\"_blank\" class=\"se_link\" style=\"color: #608cba !important;\">http://www.ftdichip.com/Drivers/CDM/CDM%20v2.10.00%20WHQL%20Certified.exe</a><br /></span><span style=\"background-color: inherit;\"><br /></span><span style=\"background-color: inherit;\">장치관리자에서 해당 장치를 클릭하여&nbsp;<br /></span><span style=\"background-color: inherit;\">제조업체 : FTDI&nbsp;<br /></span><span style=\"background-color: inherit;\">라고 나와있는지 다시한번 확인합니다.<br /></span><span style=\"background-color: inherit;\"><br /></span><span style=\"background-color: inherit;\"></span><br /><span style=\"background-color: inherit;\"></span></p>\r\n                  </div>\r\n               </div>\r\n            </div>\r\n         </div>\r\n      </div>\r\n   </div>\r\n<div class=\"se_component se_image default\" style=\"margin-top: 30px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei; -webkit-font-smoothing: antialiased; margin-left: 40px; margin-right: 40px; color: #8a837e; font-size: 13.3333px; background-color: #ffffff;\">\r\n   <div class=\"se_sectionArea se_align-left\" style=\"position: relative; width: 705px; margin: 0px auto; max-width: none; font-size: 0px;\">\r\n      <div class=\"se_editArea\" style=\"position: relative;\">\r\n         <div class=\"se_viewArea\" style=\"position: relative; max-width: 343px;\"><a href=\"https://blog.naver.com/PostView.nhn?blogId=spctjs&amp;logNo=220600633839&amp;redirect=Dlog&amp;widgetTypeCall=true&amp;topReferer=http%3A%2F%2Fgeoworld.cafe24.com%2Fgnu3%2F%3Fdoc%3Dbbs%2Fgblink.php%26bo_table%3DComputer%26wr_id%3D31171%26index%3D2&amp;directAccess=false#\" class=\"se_mediaArea __se_image_link __se_link\" data-linktype=\"img\" data-linkdata=\"{&quot;imgId&quot; : &quot;SEDOC-1453074754106-833524549_image_0_img&quot;, &quot;src&quot; : &quot;https://postfiles.pstatic.net/20160118_240/spctjs_1453074483062yAGg2_PNG/%C0%CC%B9%CC%C1%F6_4.png&quot;, &quot;linkUse&quot; : &quot;false&quot;,&quot;link&quot; : &quot;&quot;}\" style=\"color: #000000; text-decoration-line: none; position: relative; display: block;\" target=\"_blank\"><img src=\"https://postfiles.pstatic.net/20160118_240/spctjs_1453074483062yAGg2_PNG/%C0%CC%B9%CC%C1%F6_4.png?type=w773\" data-lazy-src=\"\" data-width=\"343\" data-height=\"153\" data-attachment-id=\"INOE9IdobZSWHW4iGgVcOMC_TxjI\" alt=\"\" class=\"se_mediaImage __se_img_el\" id=\"SEDOC-1453074754106-833524549_image_0_img\" style=\"border: 0px; vertical-align: top; height: auto; width: 343px; max-width: 100%;\" /></a></div>\r\n         </div>\r\n      </div>\r\n   </div>\r\n<div class=\"se_component se_paragraph default\" style=\"margin-top: 30px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei; -webkit-font-smoothing: antialiased; word-break: normal; margin-left: 40px; margin-right: 40px; color: #8a837e; font-size: 13.3333px; background-color: #ffffff;\">\r\n   <div class=\"se_sectionArea\" style=\"position: relative; width: 705px; margin: 0px auto; max-width: none;\">\r\n      <div class=\"se_editArea\" style=\"position: relative;\">\r\n         <div class=\"se_viewArea se_ff_nanumgothic\" style=\"position: relative; font-family: 나눔고딕, nanumgothic, se_NanumGothic, AppleSDGothicNeo, sans-serif, simhei; overflow-wrap: break-word; line-height: 1.9;\">\r\n            <div class=\"se_editView\" style=\"position: relative;\">\r\n               <div class=\"se_textView se_fs_T3\" style=\"font-size: 16px;\">\r\n                  <p class=\"se_textarea\" style=\"padding: 0px; width: 705px; height: 600px; outline: 0px; border: none; background: 0px 0px; font-family: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; color: inherit; font-style: inherit; text-decoration: inherit; resize: none; overflow-wrap: break-word; word-break: break-all;\"><span style=\"background-color: inherit;\"><br /></span><span style=\"background-color: inherit;\">그 뒤, 드라이버 탭에 가서 드라이버를 \"제거\" 해 줍니다.<br /></span><span style=\"background-color: inherit;\"><br /></span><span style=\"background-color: inherit;\">다음&nbsp;<br /></span><span style=\"background-color: inherit;\"><a href=\"http://www.ftdichip.com/Support/Utilities.htm#FT_PROG\" target=\"_blank\" class=\"se_link\" style=\"color: #608cba !important;\">http://www.ftdichip.com/Support/Utilities.htm#FT_PROG</a><br /></span><span style=\"background-color: inherit;\"><br /></span><span style=\"background-color: inherit;\">여기 링크로 가서 FT_PROG 라는 프로그램을 다운받아 설치합니다.<br /></span><span style=\"background-color: inherit;\">이 프로그램을 이용하여 칩에 저장되어있는 product ID 를 변경하도록 할것입니다.<br /></span><span style=\"background-color: inherit;\"><br /></span><span style=\"background-color: inherit;\">프로그램을 설치한뒤&nbsp;<br /></span><span style=\"background-color: inherit;\">1. 돋보기 모양의 scan 클릭<br /></span><span style=\"background-color: inherit;\">2. Product ID 가 0000 임을 확인&nbsp;<br /></span><span style=\"background-color: inherit;\">3.&nbsp;왼쪽의 USB Device Descriptor 클릭하여 Product ID 를 6001로 변경&nbsp;<br /></span><span style=\"background-color: inherit;\">4. 번개모양 아이콘 Program Device 를 눌러 값을 저장<br /></span><span style=\"background-color: inherit;\">5. 그 뒤, 위에서 다운받은 2.10.00 드라이버 설치<br /></span><span style=\"background-color: inherit;\">6. 장치 뺐다 끼우면 정상 작동&nbsp;<br /></span><span style=\"background-color: inherit;\"><br /></span><span style=\"background-color: inherit;\">순으로 진행하면 됩니다.<br /></span><span style=\"background-color: inherit;\"><br /></span><span style=\"background-color: inherit;\"><br /></span><span style=\"background-color: inherit;\"></span><span style=\"background-color: inherit;\"></span><span style=\"background-color: inherit;\"></span></p>\r\n                  </div>\r\n               </div>\r\n            </div>\r\n         </div>\r\n      </div>\r\n   </div>\r\n<div class=\"se_component se_image default\" style=\"margin-top: 30px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei; -webkit-font-smoothing: antialiased; margin-left: 40px; margin-right: 40px; color: #8a837e; font-size: 13.3333px; background-color: #ffffff;\">\r\n   <div class=\"se_sectionArea se_align-justify\" style=\"position: relative; width: 705px; margin: 0px auto; text-align: justify; max-width: none; font-size: 0px;\">\r\n      <div class=\"se_editArea\" style=\"position: relative;\">\r\n         <div class=\"se_viewArea\" style=\"position: relative;\"><a href=\"https://blog.naver.com/PostView.nhn?blogId=spctjs&amp;logNo=220600633839&amp;redirect=Dlog&amp;widgetTypeCall=true&amp;topReferer=http%3A%2F%2Fgeoworld.cafe24.com%2Fgnu3%2F%3Fdoc%3Dbbs%2Fgblink.php%26bo_table%3DComputer%26wr_id%3D31171%26index%3D2&amp;directAccess=false#\" class=\"se_mediaArea __se_image_link __se_link\" data-linktype=\"img\" data-linkdata=\"{&quot;imgId&quot; : &quot;SEDOC-1453074754106-833524549_image_1_img&quot;, &quot;src&quot; : &quot;https://postfiles.pstatic.net/20160118_84/spctjs_1453074630294FWLoc_PNG/%C0%CC%B9%CC%C1%F6_6.png&quot;, &quot;linkUse&quot; : &quot;false&quot;,&quot;link&quot; : &quot;&quot;}\" style=\"color: #000000; text-decoration-line: none; position: relative; display: block;\" target=\"_blank\"><img src=\"https://postfiles.pstatic.net/20160118_84/spctjs_1453074630294FWLoc_PNG/%C0%CC%B9%CC%C1%F6_6.png?type=w773\" data-lazy-src=\"\" data-width=\"742\" data-height=\"687\" data-attachment-id=\"It1xDr9e_6wjcRtFReEMhzPbAxmg\" alt=\"\" class=\"se_mediaImage __se_img_el\" id=\"SEDOC-1453074754106-833524549_image_1_img\" style=\"border: 0px; vertical-align: top; height: auto; width: 705px;\" /></a></div>\r\n         </div>\r\n      </div>\r\n   </div>\r\n<div class=\"se_component se_paragraph default\" style=\"margin-top: 30px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei; -webkit-font-smoothing: antialiased; word-break: normal; margin-left: 40px; margin-right: 40px; color: #8a837e; font-size: 13.3333px; background-color: #ffffff;\">\r\n   <div class=\"se_sectionArea\" style=\"position: relative; width: 705px; margin: 0px auto; max-width: none;\">\r\n      <div class=\"se_editArea\" style=\"position: relative;\">\r\n         <div class=\"se_viewArea se_ff_nanumgothic\" style=\"position: relative; font-family: 나눔고딕, nanumgothic, se_NanumGothic, AppleSDGothicNeo, sans-serif, simhei; overflow-wrap: break-word; line-height: 1.9;\">\r\n            <div class=\"se_editView\" style=\"position: relative;\">\r\n               <div class=\"se_textView se_fs_T3\" style=\"font-size: 16px;\">\r\n                  <p class=\"se_textarea\" style=\"padding: 0px; width: 705px; height: 60px; outline: 0px; border: none; background: 0px 0px; font-family: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; color: inherit; font-style: inherit; text-decoration: inherit; resize: none; overflow-wrap: break-word; word-break: break-all;\"><span style=\"background-color: inherit; color: #000000;\"><br /></span><span style=\"background-color: inherit; color: #000000;\">출처 :&nbsp;<a href=\"http://internetofhomethings.com/homethings/?tag=not-genuine-device-found\" target=\"_blank\" class=\"se_link\" style=\"color: #608cba !important;\">http://internetofhomethings.com/homethings/?tag=not-genuine-device-found</a><br /></span></p>\r\n                  </div>\r\n               </div>\r\n            </div>\r\n         </div>\r\n      </div>\r\n   </div>\r\n<div class=\"se_component se_oglink default\" style=\"margin-top: 30px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei; -webkit-font-smoothing: antialiased; vertical-align: middle; position: relative; margin-left: 40px; margin-right: 40px; color: #8a837e; font-size: 13.3333px; background-color: #ffffff;\">\r\n   <div class=\"se_sectionArea se_align-left\" style=\"position: relative; width: 705px; margin: 0px auto; max-width: none; font-size: 0px; line-height: 1.2;\">\r\n      <div class=\"se_editArea\" id=\"SEDOC-1453074754106-833524549_oglink_0\" style=\"position: relative;\">\r\n         <div class=\"se_viewArea se_og_wrap\" style=\"position: relative; display: inline-block; width: 480px; background: url(&quot;../img/theme_bg/bg_component_light.png&quot;) rgb(248, 248, 248);\"><a class=\"se_og_box\" href=\"http://internetofhomethings.com/homethings/?tag=not-genuine-device-found\" target=\"_blank\" style=\"color: #000000; text-decoration-line: none; box-shadow: rgba(0, 0, 0, 0.12) 0px 2px 8px 0px; overflow: hidden; position: relative; width: 480px; height: 130px; display: table; table-layout: fixed;\">\r\n               <div class=\"se_og_thumb\" style=\"overflow: hidden; position: relative; clear: both; text-align: center; display: table-cell; width: 130px;\"><img src=\"https://dthumb-phinf.pstatic.net/?src=%22http%3A%2F%2Finternetofhomethings.com%2Fhomethings%2Fwp-content%2Fuploads%2F2015%2F10%2Fheader2.jpg%22&amp;type=ff120\" alt=\"\" style=\"border: 0px; vertical-align: middle; width: 130px; min-height: 110px;\" /></div>\r\n               </a>\r\n            <div class=\"se_og_txt\" style=\"vertical-align: middle; position: relative; width: 350px; padding: 21px 30px 21px 20px; box-sizing: border-box; display: table-cell;\"><a class=\"se_og_box\" href=\"http://internetofhomethings.com/homethings/?tag=not-genuine-device-found\" target=\"_blank\" style=\"color: #000000; text-decoration-line: none; box-shadow: rgba(0, 0, 0, 0.12) 0px 2px 8px 0px; overflow: hidden; position: relative; width: 480px; height: 130px; display: table; table-layout: fixed;\">\r\n                  <div class=\"se_og_tit\" style=\"font-size: 15px; color: #444444; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: break-all;\">Internet of Home Things » Tag » NOT GENUINE DEVICE FOUND</div>\r\n                  <div class=\"se_og_desc\" style=\"margin-top: 9px; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; word-break: break-all; color: #666666;\">&nbsp;</div>\r\n                  </a>\r\n               <div class=\"se_og_cp\" style=\"margin-top: 9px; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; word-break: break-all; color: #608cba;\"><a class=\"se_og_box\" href=\"http://internetofhomethings.com/homethings/?tag=not-genuine-device-found\" target=\"_blank\" style=\"color: #000000; text-decoration-line: none; box-shadow: rgba(0, 0, 0, 0.12) 0px 2px 8px 0px; overflow: hidden; position: relative; width: 480px; height: 130px; display: table; table-layout: fixed;\">internetofhomethings.com</a>\r\n                  <div class=\"autosourcing-stub-extra\" style=\"zoom: 1; opacity: 1;\"><a class=\"se_og_box\" href=\"http://internetofhomethings.com/homethings/?tag=not-genuine-device-found\" target=\"_blank\" style=\"color: #000000; text-decoration-line: none; box-shadow: rgba(0, 0, 0, 0.12) 0px 2px 8px 0px; overflow: hidden; position: relative; width: 480px; height: 130px; display: table; table-layout: fixed;\"></a>\r\n                     <p style=\"margin-top: 11px; margin-bottom: 7px; padding: 0px; font-size: 12px; font-family: Dotum;\"><a class=\"se_og_box\" href=\"http://internetofhomethings.com/homethings/?tag=not-genuine-device-found\" target=\"_blank\" style=\"color: #000000; text-decoration-line: none; box-shadow: rgba(0, 0, 0, 0.12) 0px 2px 8px 0px; overflow: hidden; position: relative; width: 480px; height: 130px; display: table; table-layout: fixed;\"><span style=\"font-weight: 600; padding: 0px 7px 0px 0px;\">[출처]</span>&nbsp;</a><a href=\"https://blog.naver.com/spctjs/220600633839\" target=\"_blank\" style=\"color: #000000; text-decoration-line: none;\">FTDI 칩 사용 불가 문제 해결법</a><span style=\"padding: 0px 7px 0px 5px;\">|</span><span style=\"font-weight: 600; padding: 0px 7px 0px 0px;\">작성자</span>&nbsp;<a href=\"https://blog.naver.com/spctjs\" target=\"_blank\" style=\"color: #000000; text-decoration-line: none;\">aa</a></p>\r\n                     </div>\r\n                  </div>\r\n               </div>\r\n            </div>\r\n         </div>\r\n      </div>\r\n   </div>','https://internetofhomethings.com/homethings/?tag=not-genuine-device-found','https://blog.naver.com/spctjs/220600633839?proxyReferer=http%3A%2F%2Fgeoworld.cafe24.com%2Fgnu3%2F%3Fdoc%3Dbbs%2Fgblink.php%26bo_table%3DComputer%26wr_id%3D31171%26index%3D2',0,0,2,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:07:19',2,'2019-04-26 15:07:19','210.101.103.92','','','','','','','','','','','',''),(311,-311,'',311,0,0,'','','html1','[Linux] 라즈베리파이에서 이미지파일 시간값으로 저장하기','<table width=\"100%\" cellpadding=\"5\" style=\"font-family: 굴림;\">\r\n   <tbody>\r\n      <tr>\r\n         <td class=\"lh\" height=\"100\" style=\"color: #222222; line-height: 18px; word-break: break-all;\"><span class=\"content\" style=\"color: #404040;\">raspistill -t 2000&nbsp;-o `date +%Y-%m-%d-%H-%M`.jpg</span></td>\r\n         </tr>\r\n      </tbody>\r\n   </table>','','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:07:42',0,'2019-04-26 15:07:42','210.101.103.92','','','','','','','','','','','',''),(312,-312,'',312,0,0,'','','html1','[Linux] scp를 통한 파일원격전송시 Password묻지않기','<p><span style=\"color: #404040; font-family: 굴림;\">*기본적인 scp 파일전송 방법&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">scp /home/my/*.jpg&nbsp;&nbsp;</span><a href=\"mailto:user_id@test.co.kr:~/upload\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\" target=\"_blank\">user_id@test.co.kr:~/upload</a><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: 굴림;\">*순서 1. 전송을 요청하는 측(client)에서 공개키를 생성&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">ssh-keygen -t rsa(엔터 3번 = 기본경로저장, 접속시 PWD 묻지 않음)&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">-key생성&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">*순서 2. client의 공개키를 서버측(받는곳)에 전달&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">scp -P 22 .ssh/id_rsa.pub&nbsp;</span><a href=\"mailto:user_id@test.co.kr:~.ssh\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\" target=\"_blank\">user_id@test.co.kr:</a>~/<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: 굴림;\">*순서 3. 서버측에서 접근허가 설정(서버측에 로긴한 상태에서 작업)&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">cat ./id_rsa.pub &gt;&gt; ~.ssh/authorized_keys&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">rm -rf ./id_rsa_pub&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">chmod 744 ~.ssh/authorized_keys&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">이후에는 Password를 묻지 않음&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">*crontab을 통해 정기적으로 파일전송 예제&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">A#)crontab -e&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">05 00 15 * * scp /A_test/fw.tar&nbsp;</span><a href=\"mailto:root@203.84.244.57:/B_test\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\" target=\"_blank\">root@203.84.244.57:/B_test</a><span style=\"color: #404040; font-family: 굴림;\">/&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">01 00 15 * * tar zcvf /A_test/fw1.tar /A_test/file1 /A_test/file2&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">@ 발생순서는 아래부터 매월 15일 00시 1분에 tar 작업, 매월 15일 00시 5분에 scp를 통한 전송&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">@ 시간= 분.시.일.월.주</span></p>\r\n<p><span style=\"color: #404040; font-family: 굴림;\">&nbsp;</span></p>\r\n<p><span style=\"color: #404040; font-family: 굴림;\">============================================================================================</span></p>\r\n<p><span style=\"color: #404040; font-family: 굴림;\">[2020.2.26 에어텍 서버(CentOS)에서 SCP 수정사항]</span></p>\r\n<p><font color=\"#404040\" face=\"굴림\">1. 라즈베리파이에서 키 생성 및 서버에 파일전송</font></p>\r\n<p><font color=\"#404040\" face=\"굴림\">&gt;ssh-keygen -t rsa</font></p>\r\n<p><font color=\"#404040\" face=\"굴림\">&gt;scp ~/.ssh/id_rsa.pub FWRM@45.115.155.254:~/</font></p>\r\n<p><font color=\"#404040\" face=\"굴림\"><br /></font></p>\r\n<p><font color=\"#404040\" face=\"굴림\">2. 서버에서 key 파일 설정(FWRM@45.115.155.254 서버에서 작업)</font></p>\r\n<p><font color=\"#404040\" face=\"굴림\">cat ./id_rsa.pub &gt;&gt; ~/.ssh/authorized_keys</font></p>\r\n<p><font color=\"#404040\" face=\"굴림\"><br /></font></p>\r\n<p><font color=\"#404040\" face=\"굴림\">3. 라즈베리파이에서 sshpass 설치</font></p>\r\n<p><font color=\"#404040\" face=\"굴림\">&gt;sudo apt-get install sshpass</font></p>\r\n<p><font color=\"#404040\" face=\"굴림\"><br /></font></p>\r\n<p><font color=\"#404040\" face=\"굴림\">4. 라즈베리파이에서 image_still.sh 수정</font></p>\r\n<p><font color=\"#404040\" face=\"굴림\">기존&gt; scp /home/pi/weatherDIR/pic/${picname} FWRM@45.115.155.254:~/pic</font></p>\r\n<p>&nbsp;</p>\r\n<p><font color=\"#404040\" face=\"굴림\">수정 &gt; sshpass -p123fwrm scp /home/pi/weatherDIR/pic/${picname} FWRM@45.115.155.254:~/pic</font></p>','https://blog.naver.com/idea_mind/220136240526','',1,0,17,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:08:01',0,'2019-04-26 15:08:01','210.101.103.92','','','','','','','','','','','',''),(313,-313,'',313,0,0,'','','html1','[Linux] 공인IP 확인방법','<p><span style=\"color: #404040; font-family: 굴림;\">curl ipecho.net/plain; echo&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">curl -s checkip.dyndns.org|sed -e \'s/.*Current IP Address: //\' -e \'s/&lt;.*$//\'</span></p>','','',0,0,2,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:08:11',0,'2019-04-26 15:08:11','210.101.103.92','','','','','','','','','','','',''),(314,-314,'',314,0,0,'','','html1','[Linux] 라즈베리파이 무선랜 고정ip설정','<p><span style=\"color: #404040; font-family: 굴림;\">/etc/network/interfaces&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">allow-hotplug wlan0&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">iface wlan0 inet static&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; wpa-ssid mLTE2252&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; wpa-psk&nbsp; mexus2252&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; address&nbsp; 192.168.1.99&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; network&nbsp; 192.168.1.0&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; netmask&nbsp; 255.255.255.0&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; gateway&nbsp; 192.168.1.1&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp; broadcast 192.168.1.255</span></p>','','',0,0,4,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:08:20',0,'2019-04-26 15:08:20','210.101.103.92','','','','','','','','','','','',''),(315,-315,'',315,0,0,'','','html1','[Linux] crontab 자동실행 작성예','<p><span style=\"color: #404040; font-family: 굴림;\">* 에어텍 날씨관측용 라즈베리파이 crontab&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">*/10 *&nbsp; * * *&nbsp; root&nbsp; &nbsp; /home/pi/crontab_work/image_still.sh&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">*/10 *&nbsp; * * *&nbsp; root&nbsp; &nbsp; scp /home/pi/Pictures/*.jpg&nbsp;</span><a href=\"mailto:FWRM@121.189.186.105:~/picture\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\" target=\"_blank\">FWRM@121.189.186.105:~/picture</a><span style=\"color: #404040; font-family: 굴림;\">/&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">*/30 *&nbsp; * * *&nbsp; root&nbsp; &nbsp; rm -rf /home/pi/Pictures/*.jpg&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">*/2&nbsp; *&nbsp; * * *&nbsp; root&nbsp; &nbsp; /home/pi/crontab_work/ip_check.sh&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">*/2&nbsp; *&nbsp; * * *&nbsp; root&nbsp; &nbsp; scp /home/pi/crontab_work/ip_list.txt&nbsp;</span><a href=\"mailto:FWRM@121.189.186.105\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\" target=\"_blank\">FWRM@121.189.186.105</a><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: 굴림;\">---------------------------------------------------------------------&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">@reboot 명령을 통하여 실행하고 하는 명령어를 입력합니다.&nbsp;</span><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: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">@reboot /home/test/test/programstart.sh</span></p>','','',0,0,3,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:08:30',0,'2019-04-26 15:08:30','210.101.103.92','','','','','','','','','','','',''),(316,-316,'',316,0,0,'','','html1','[Linux] 리눅스에서 시리얼 콘솔 사용하기','<p><a href=\"mailto:root@server\" style=\"text-decoration-line: none; color: #3a4e40; font-family: 굴림;\" target=\"_blank\">root@server</a><span style=\"color: #404040; font-family: 굴림;\">:~# dmesg | grep tty&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">[&nbsp; &nbsp; 0.000000] console [tty0] enabled&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">[&nbsp; &nbsp; 4.213555] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">[&nbsp; &nbsp; 4.213643] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">[&nbsp; &nbsp; 4.213850] 00:06: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">[&nbsp; &nbsp; 4.213963] 00:07: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">다음과 같이 두개의 serial port가 존재함을 알 수 있다. 대부분 ttyS0에 연결되어 있을 가능성이 높다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">이후는 screen 명령어를 통해서 시리얼포트에 접속하면 된다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">#screen /dev/ttyS0 9600&nbsp;</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: 굴림;\">ctl - a d&nbsp;</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: 굴림;\">creen 을 이용하는 방법외에 조금 더 고전적인 방식은 cu 명령어를 이용해도 된다. 이것은 오래전 통신 방법으로 이용되던 UUCP 연결때 사용하는 것인데, 이것도 콘솔로 이용가능하다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\"># cu --help&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">Taylor UUCP 1.07, copyright (C) 1991, 92, 93, 94, 1995, 2002 Ian Lance Taylor&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">Usage: cu [options] [system or phone-number]&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\"># cu -s 9600 -l /dev/ttyS0&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">cu: open (/dev/ttyS0): Permission denied&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">cu: /dev/ttyS0: Line in use&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">위와 같이 해 보았더니 퍼미션 에러가 발생한다. 퍼미션을 확인해 보니 root 소유이다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\"># ls -l /dev/ttyS0&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">crw------- 1 root root 4, 64 2011-02-01 02:19 /dev/ttyS0&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">uucp 로 변경하고 실행하니 깔끔히 접속된다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\"># chown uucp /dev/ttyS0&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\"># cu -s 9600 -l /dev/ttyS0&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">Connected.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">console&gt;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">그리고 빠져나갈때는 ~. 를 입력하면 된다.</span></p>','http://www.packetinside.com/2011/02/blog-post_22.html','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:08:45',0,'2019-04-26 15:08:45','210.101.103.92','','','','','','','','','','','',''),(317,-317,'',317,0,0,'','','html1','[Linux] [Bash shell script 쉘스크립트] 파일 데이터 MySQL에 삽입하기 (Move file data to MySQL)','<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\"><span style=\"margin: 0px; padding: 0px; font-size: 9pt; border: 0px; vertical-align: baseline; line-height: 15.6px;\">종종 파일 데이터를 MySQL의 특정 테이블에 넣고싶을때가 있다.</span></div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\">이는 그 작업을 위한 간단한 스크립트 이다.</div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\"><span style=\"margin: 0px; padding: 0px; font-size: 9pt; border: 0px; vertical-align: baseline; line-height: 15.6px;\"><br /></span></div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\">입력 쿼리를 하나의 String으로 축적하여 한방에 날리는 것이다.</div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\">그 쿼리수가 너무나 많을경우에는 시간이 오래걸릴 수 있으므로 적당히 count를 나누어서 여러번 실행시키는것도 좋은방법이다.</div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\"><span style=\"margin: 0px; padding: 0px; font-size: 9pt; border: 0px; vertical-align: baseline; line-height: 15.6px;\"><br /></span></div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\"><br /></div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\">==============&nbsp;<b>file_to_mysql.sh&nbsp;</b><span style=\"margin: 0px; padding: 0px; font-size: 9pt; border: 0px; vertical-align: baseline; line-height: 15.6px;\">==============</span></div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\"><span style=\"margin: 0px; padding: 0px; font-size: 9pt; border: 0px; vertical-align: baseline; line-height: 15.6px;\">readFile=$1</span></div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\"><span style=\"margin: 0px; padding: 0px; font-size: 9pt; border: 0px; vertical-align: baseline; line-height: 15.6px;\"><br /></span></div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\"><b style=\"color: #009900; line-height: 15.6px;\"># MySQL information</b></div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\">\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">HOST=\"localhost\"</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">USER=\"root\"</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">PWD=\"root\"</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">DB=\"test_db\"</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">TARGET_TABLE=\"test_table\"</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\"><br /></div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\"><br /></div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">if [ $# -ne 1 ]; then</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">&nbsp; echo \"Usage: &lt;filePath&gt;\"</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">&nbsp; echo \"Description: Read file and save into DB\"</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">&nbsp; exit</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">fi</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\"><br /></div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">query=\"\"</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">count=0</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">tmpFile=\"file_to_mysql.tmp\"</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\"><br /></div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\"><b><font color=\"#009900\"># remove DOS newline character</font></b></div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">tr -d \'\\r\' &lt; $readFile &gt; $tmpFile</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\"><br /></div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\"><font color=\"#009900\"><b># accumulate queries</b></font></div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">while read line ; do</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\"># &nbsp;echo \"$line\"</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">&nbsp; data1=`echo $line | awk \'{print $1}\'` &nbsp;<font color=\"#009900\"><b># line의 첫번째 element 선택</b></font></div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">&nbsp; data1=`echo $data1 | sed -e \'s/^ *//\' -e \'s/ *$//\'` &nbsp;<b style=\"font-size: 9pt; line-height: 15.6px; color: #009900;\"># element의 앞뒤 공백 제거</b></div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">&nbsp; data2=`echo $line | awk \'{print $2}\'`</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">&nbsp; data2=`echo $data2 | sed -e \'s/^ *//\' -e \'s/ *$//\'`</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\"># &nbsp;echo \"$data1\"</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\"># &nbsp;echo \"$data2\"</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\"><br /></div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">&nbsp; if [ -z $data1 ]; then</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">&nbsp; &nbsp; continue</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">&nbsp; else</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">&nbsp; &nbsp; query=$query\"INSERT IGNORE INTO $TARGET_TABLE (field1,field2) VALUES (\'$data1\', \'$data2\');\"</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">&nbsp; &nbsp; count=$[count+1]</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">&nbsp; fi</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">done &lt; $tmpFile</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\"><br /></div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\"><font color=\"#009900\"><b># insert data into database</b></font></div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">mysqlInfo=\"-h$HOST -u$USER -p$PWD $DB\"</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\"><font color=\"#ff0000\"><b>echo \"$query\" | mysql $mysqlInfo&nbsp;</b></font><b style=\"font-size: 9pt; line-height: 15.6px; color: #009900;\"># 쿼리 실행하는 부분</b></div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\"><br /></div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">rm $tmpFile 2&gt; /dev/null</div>\r\n   <div style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;\">echo \"[FINISHED] DB Insert finished.\"</div>\r\n   </div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\"><span style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; line-height: 15.6px;\">==============</span><span style=\"margin: 0px; padding: 0px; font-size: 9pt; border: 0px; vertical-align: baseline; line-height: 15.6px;\">==============</span><span style=\"margin: 0px; padding: 0px; font-size: 9pt; border: 0px; vertical-align: baseline; line-height: 15.6px;\">==============</span></div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\"><span style=\"margin: 0px; padding: 0px; font-size: 9pt; border: 0px; vertical-align: baseline; line-height: 15.6px;\"><br /></span></div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\">위와 같이&nbsp;<b>file_to_mysql.sh</b>&nbsp;를 생성하였을때,</div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\">data1 과 data2를 라인단위로 공백을 두고 가지고 있는 파일&nbsp;<b>insert_data.txt</b>를&nbsp;<span style=\"margin: 0px; padding: 0px; font-size: 9pt; border: 0px; vertical-align: baseline; line-height: 15.6px;\">DB에 넣는 방법은 아래와 같다.</span></div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\"><br /></div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\"><span style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; line-height: 15.6px;\">==============</span><span style=\"margin: 0px; padding: 0px; font-size: 9pt; border: 0px; vertical-align: baseline; line-height: 15.6px;\">==============</span><span style=\"margin: 0px; padding: 0px; font-size: 9pt; border: 0px; vertical-align: baseline; line-height: 15.6px;\">==============</span></div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\"><span style=\"margin: 0px; padding: 0px; font-size: 9pt; border: 0px; vertical-align: baseline; line-height: 15.6px;\"><br /></span></div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\"><span style=\"margin: 0px; padding: 0px; font-size: 9pt; border: 0px; vertical-align: baseline; line-height: 15.6px;\">[shell]$&nbsp;<b><font color=\"#3333ff\">./file_to_mysql.sh insert_data.txt</font></b></span></div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\"><span style=\"margin: 0px; padding: 0px; font-size: 9pt; border: 0px; vertical-align: baseline; line-height: 15.6px;\"><br /></span></div>\r\n<div style=\"margin: 0px; padding: 0px; font-size: 13px; border: 0px; vertical-align: baseline; color: #1f1f1f; font-family: &quot;맑은 고딕&quot;, &quot;malgun gothic&quot;, 돋움, dotum, AppleGothic, sans-serif; background-color: #ffffff;\"><span style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; line-height: 15.6px;\">==============</span><span style=\"margin: 0px; padding: 0px; font-size: 9pt; border: 0px; vertical-align: baseline; line-height: 15.6px;\">==============</span><span style=\"margin: 0px; padding: 0px; font-size: 9pt; border: 0px; vertical-align: baseline; line-height: 15.6px;\">==============</span></div>','','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:08:59',0,'2019-04-26 15:08:59','210.101.103.92','','','','','','','','','','','',''),(318,-318,'',318,0,0,'','','html1','[Linux] MYSQL 텍스트파일의 데이터를 특정 테이블에 저장하기','<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><span style=\"font-size: 10pt;\"><span style=\"font-size: 10pt;\"><strong><font color=\"#3a32c3\">1)&nbsp;텍스트파일의 데이터를 특정 테이블에 저장하기 - mysqlimport</font></strong></span></span></p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><span style=\"font-size: 10pt;\"><span style=\"font-size: 10pt;\"><font color=\"#000000\">MYSQL의 mysqlimport유틸리티를 이용하면 리눅스 쉘상태에서 한번의 명령으로 특정 텍스트 파일의 전체내용을 MYSQL의 특정 데이터베이스의 특정 테이블에 입력을 할 수가 있다.</font></span></span></p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><span style=\"font-size: 10pt;\">이 방법은 텍스트파일에 저장되어 있는 크기가 작은 전체 데이터들을 특정 데이터베이스에 편리하게 입력하기 위한 방법으로 주로 사용되고 있다.</span></p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><span style=\"font-size: 10pt;\">아래는 mysqlimport를 사용하는 형식이다.</span></p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><span style=\"font-size: 10pt;\"><span style=\"font-size: 10pt;\"></span></span>&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><span style=\"font-size: 10pt;\"><span style=\"font-size: 10pt;\"><strong>사용 형식 : mysqlimport -u MYSQL사용자 -p 데이터베이스명 텍스트파일명</strong></span></span></p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><span style=\"font-size: 10pt;\"><span style=\"font-size: 10pt;\"></span></span>&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><span style=\"font-size: 10pt;\">위의 형식과 같이 실행하면 \"텍스트파일명\"에 저장되어 있는 데이터가 \"데이터베이스명\"의 특정 \"테이블\"의 데이터로 입력된다.</span></p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><span style=\"font-size: 10pt;\">그런데 위의 형식에서 한가지 이상한 점이 있을 것이다. 즉, 텍스트파일의 데이터가 입력될 데이터베이스명은 지정이 되어 있는데 실제로 저장될 테이블명이 지정되어 있지 않다는 것이다.</span></p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><span style=\"font-size: 10pt;\"><span style=\"font-size: 10pt;\"><u>위의 형식에서 데이터가 저장될 테이블이름은 \"텍스트파일명\"과 동일한 테이블이 된다. 즉, mysqlimport를 이용하여 텍스트파일의 데이터를 특정 데이터베이스의 테이블에 저장할 때에는 \"텍스트파일명\"과 \"테이블명\"이 동일해야 한다. 그리고 저장될 테이블은 이미 생성되어 있어야 한다.</u></span></span></p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><span style=\"font-size: 10pt;\"><span style=\"font-size: 10pt;\"></span></span>&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><span style=\"font-size: 10pt;\">이제 앞에서 설명한 mysqlimport를 이용하여 특정 텍스트파일의 내용을 특정 데이터베이스의 테이블로 입력해 보도록 하겠다.</span></p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><span style=\"font-size: 10pt;\">아래는 이번 예를 설명하기 위한 간단한 텍스트파일이다. 텍스트 파일의 이름은 addressbook이다.&nbsp;<font color=\"#ff0000\">(여기서&nbsp;주의할 것은&nbsp;파일 위치이다. mysqlimport에서&nbsp;텍스트파일에&nbsp;경로설정이 없으면 아래 위치에 있어야 함. /data/\'DB명\')</font>&nbsp;이 텍스트파일의 내용을 cat 명령어로 확인한 것이다.</span></p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><span style=\"font-size: 10pt;\"><span style=\"font-size: 10pt;\"></span></span></p>\r\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" width=\"526\" bgcolor=\"#b7bbb5\" height=\"40\" style=\"color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px;\">\r\n   <tbody>\r\n      <tr bgcolor=\"#ffffff\">\r\n         <td width=\"526\" style=\"margin: 0px; padding: 0px; outline: none; line-height: 1.5;\">[root@file bin]#&nbsp;<strong>pwd<br /><font color=\"#ff0000\">/usr/local/mysql/data/temp_db</font></strong><br />[root@file bin]#<br />[root@file bin]# cat addressbook<br />KIMJINSOO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;011-111-1111&nbsp;&nbsp;&nbsp; SEOUL&nbsp;&nbsp; A+<br />KIMDONGMIN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;011-111-2222&nbsp;&nbsp;&nbsp; BUSAN&nbsp;&nbsp; B+<br />KIMYOUNGHO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 011-111-3333&nbsp;&nbsp;&nbsp; SEOUL&nbsp;&nbsp; C+<br />KIMMINJA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;011-111-4444&nbsp;&nbsp;&nbsp; SEOUL&nbsp;&nbsp; D+<br />[root@file bin]#</td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">텍스트파일을 생성할 때에는 가능한 TAB키를 이용하여 각 필드사이를 띄우시기 바란다. 물론 TAB키를 이용하지 않고 띄워도 입력은 되지만 아무런 에러없이 정확한 입력을 하려면 TAB키를 이용하여 각 필드데이터 사이를 띄우는 것이 좋다.</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">그리고 다음은 addressbook이라는 텍스트파일의 내용을 temp_db라는 데이터베이스의 addressbook이라는 테이블로 입력을 하기 위하여 mysqlimport를 사용한 것이다.</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" width=\"526\" bgcolor=\"#b7bbb5\" height=\"40\" style=\"color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px;\">\r\n   <tbody>\r\n      <tr bgcolor=\"#ffffff\">\r\n         <td width=\"526\" style=\"margin: 0px; padding: 0px; outline: none; line-height: 1.5;\">\r\n            <p style=\"padding: 0px; outline: none;\">[root@file bin]#pwd</p>\r\n            <p style=\"padding: 0px; outline: none;\">/usr/local/mysql/bin</p>\r\n            <p style=\"padding: 0px; outline: none;\">[root@file bin]#&nbsp;<strong>./mysqlimport -u&nbsp;root -p temp_db addressbook<br /></strong>Enter password:</p>\r\n            <p style=\"padding: 0px; outline: none;\">temp_db.addressbook: Records: 4&nbsp; Deleted: 0&nbsp; Skipped: 0&nbsp; Warnings: 0<br />[root@file bin]#</p>\r\n            </td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">위의 mysqlimport명령문의 사용결과를 보면 \"temp_db.addressbook: Records: 4&nbsp; Deleted: 0&nbsp; Skipped: 0&nbsp; Warnings: 0\" 과 같다. 이는 temp_db라는 데이터베이스의 addressbook이라는 테이블에 4개의 Record가 저장 되었으며 입력되지 않은 데이터 없이 모두 정상적으로 입력이 되었다는 것을 알수 있다.&nbsp;<u>만약, 텍스트파일이 확장자를 포함할 때(addressbook.txt)에는 텍스트파일의 확장자를 제외한 앞부분이 저장될 테이블이름이 된다.</u></p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">그리고 다음은 위와 같이 mysqlimport를 이용하여 addressbook텍스트파일의 전체 내용을 temp_db데이터베이스의 addressbook테이블에 저장하였으므로 실제로 입력이 되어있는가를 확인하기 위하여 MYSQL로 접속하여 확인한 것이다.</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" width=\"526\" bgcolor=\"#b7bbb5\" height=\"40\" style=\"color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px;\">\r\n   <tbody>\r\n      <tr bgcolor=\"#ffffff\">\r\n         <td width=\"526\" style=\"margin: 0px; padding: 0px; outline: none; line-height: 1.5;\">\r\n            <p style=\"padding: 0px; outline: none;\">[root@file bin]# pwd<br />/usr/local/mysql/bin<br />[root@file bin]# ./mysql -u&nbsp;root -p temp_db<br />Enter password:<br />Welcome to the MySQL monitor.&nbsp; Commands end with ; or \\g.<br />Your MySQL connection id is 1205 to server version: 4.1.19-log</p>\r\n            <p style=\"padding: 0px; outline: none;\">Type \'help;\' or \'\\h\' for help. Type \'\\c\' to clear the buffer.</p>\r\n            <p style=\"padding: 0px; outline: none;\">mysql&gt; select * from addressbook;<br />+------------+--------------+---------+-------+<br />| name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | tel&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;| address | grade |<br />+------------+--------------+---------+-------+<br />| KIMJINSOO&nbsp; | 011-111-1111 | SEOUL&nbsp;&nbsp; | A+&nbsp;&nbsp;&nbsp; |<br />| KIMDONGMIN | 011-111-2222 | BUSAN&nbsp;&nbsp; | B+&nbsp;&nbsp;&nbsp; |<br />| KIMYOUNGHO | 011-111-3333 | SEOUL&nbsp;&nbsp; | C+&nbsp;&nbsp;&nbsp; |<br />| KIMMINJA&nbsp;&nbsp; | 011-111-4444 | SEOUL&nbsp;&nbsp; | D+&nbsp;&nbsp;&nbsp; |<br />+------------+--------------+---------+-------+<br />4 rows in set (0.00 sec)</p>\r\n            <p style=\"padding: 0px; outline: none;\">mysql&gt;<br />mysql&gt; exit<br />Bye<br />[root@file bin]#</p>\r\n            </td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">위의 예를 보면 temp_db라는 데이터베이스로 접속하여 \"select * from addressbook\"이라는 SQL문을 이용하여 입력된 4개의 레코드값들을 확인한 것이다. 텍스트 파일의 내용과 동일한 데이터들이 모두 정상적으로 저장되어 있다는 것을 확인할 수 있다.</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><span style=\"font-size: 10pt;\"><span style=\"font-size: 10pt;\"><strong><font color=\"#3a32c3\">2)&nbsp;텍스트파일의 데이터를 특정 테이블에 저장하기 - load data local infile문<br /></font></strong></span></span></p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><span style=\"font-size: 10pt;\"><span style=\"font-size: 10pt;\"><font color=\"#000000\">다른 방법으로 load data local infile문이 있으며, 아래 사항과 같이 실행하면 된다.</font></span></span></p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><span style=\"font-size: 10pt;\"><span style=\"font-size: 10pt;\"></span></span><span style=\"font-size: 10pt;\"><span style=\"font-size: 10pt;\"></span></span><span style=\"font-size: 10pt;\"><span style=\"font-size: 10pt;\"></span></span></p>\r\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" width=\"526\" bgcolor=\"#b7bbb5\" height=\"40\" style=\"color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px;\">\r\n   <tbody>\r\n      <tr bgcolor=\"#ffffff\">\r\n         <td width=\"526\" style=\"margin: 0px; padding: 0px; outline: none; line-height: 1.5;\">\r\n            <p style=\"padding: 0px; outline: none;\">[root@file bin]# mysql -u&nbsp;root -p&nbsp;temp_db<br />Enter password:<br />Welcome to the MySQL monitor.&nbsp; Commands end with ; or \\g.<br />Your MySQL connection id is 1287 to server version: 4.1.19-log</p>\r\n            <p style=\"padding: 0px; outline: none;\">Type \'help;\' or \'\\h\' for help. Type \'\\c\' to clear the buffer.</p>\r\n            <p style=\"padding: 0px; outline: none;\">mysql&gt;&nbsp;<strong>load data local infile \"addressbook\" into table addressbook;<br /></strong>Query OK, 4 rows affected (0.00 sec)<br />Records: 4&nbsp; Deleted: 0&nbsp; Skipped: 0&nbsp; Warnings: 0</p>\r\n            <p style=\"padding: 0px; outline: none;\">mysql&gt;<br />mysql&gt; exit<br />Bye<br />[root@file bin]#</p>\r\n            </td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">여기에서도 테이블에 넣을 텍스트파일의 위치는 1)번 방법과 같이 아래 위치에 있어야 한다. (별도 경로 설정이 없을 경우)</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><span style=\"font-size: 10pt;\"><span style=\"font-size: 10pt;\"></span></span></p>\r\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" width=\"526\" bgcolor=\"#b7bbb5\" height=\"40\" style=\"color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px;\">\r\n   <tbody>\r\n      <tr bgcolor=\"#ffffff\">\r\n         <td width=\"526\" style=\"margin: 0px; padding: 0px; outline: none; line-height: 1.5;\">[root@file bin]#&nbsp;<strong>pwd<br /><font color=\"#3a32c3\">/usr/local/mysql/data/temp_db</font></strong><br />[root@file bin]#<br />[root@file bin]# cat addressbook<br />KIMJINSOO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; 011-111-1111&nbsp;&nbsp;&nbsp; SEOUL&nbsp;&nbsp; A+<br />KIMDONGMIN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 011-111-2222&nbsp;&nbsp;&nbsp; BUSAN&nbsp;&nbsp; B+<br />KIMYOUNGHO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 011-111-3333&nbsp;&nbsp;&nbsp; SEOUL&nbsp;&nbsp; C+<br />KIMMINJA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; 011-111-4444&nbsp;&nbsp;&nbsp; SEOUL&nbsp;&nbsp; D+<br />[root@file bin]#</td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">위 명령어에 대한 달리 표현해서 실행시킬 수 도 있다.</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" width=\"526\" bgcolor=\"#b7bbb5\" height=\"40\" style=\"color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px;\">\r\n   <tbody>\r\n      <tr bgcolor=\"#ffffff\">\r\n         <td width=\"526\" style=\"margin: 0px; padding: 0px; outline: none; line-height: 1.5;\">\r\n            <p style=\"padding: 0px; outline: none;\">1번) mysql&gt; LOAD DATA local infile \"/usr/local/backup.txt\" into table TEST<br />2번) mysql&gt; LOAD DATA local infile \"[파일명]\" into table [테이블] FILEDS TERMINATED BY \"[구분자]\"</p>\r\n            </td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">1번은&nbsp;파일의 경로을 설정한 경우로 /usr/local/backup.txt란 파일을 TEST란 테이블에 삽입하는 명령이다.<br />2번은 fileds terminated by \"[구분자]\"처럼 사용하면 해당 구분자로 구분되어 삽입된다.</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><strong><font color=\"#3a32c3\">가. 에러 발생 경우 1</font></strong></p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">위 명령어를 실행했는데, 아래와 같은 에러가 나면 MySQL 버전 문제가 아니라 INFILE 문제이다.</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" width=\"526\" bgcolor=\"#b7bbb5\" height=\"40\" style=\"color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px;\">\r\n   <tbody>\r\n      <tr bgcolor=\"#ffffff\">\r\n         <td width=\"526\" style=\"margin: 0px; padding: 0px; outline: none; line-height: 1.5;\">mysql&gt; load data local infile \"addressbook\" into table addressbook;<br /><font color=\"#ff0000\">ERROR 1148 (42000): The used command is not allowed with this MySQL version</font></td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">이럴때에는 local_infile 변수가 사용가능한지 확인을 하고,</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" width=\"526\" bgcolor=\"#b7bbb5\" height=\"40\" style=\"color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px;\">\r\n   <tbody>\r\n      <tr bgcolor=\"#ffffff\">\r\n         <td width=\"526\" style=\"margin: 0px; padding: 0px; outline: none; line-height: 1.5;\">\r\n            <p style=\"padding: 0px; outline: none;\">mysql&gt; show variables like \'local%\';<br />+---------------+-------+<br />| Variable_name | Value |<br />+---------------+-------+<br />| local_infile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;| ON&nbsp;&nbsp;&nbsp; |<br />+---------------+-------+<br />1 row in set (0.00 sec)</p>\r\n            <p style=\"padding: 0px; outline: none;\">mysql&gt;</p>\r\n            </td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">접속시 아래의 붉은 글씨부분의 옵션을 추가로 넣어 접속하면 된다.&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" width=\"526\" bgcolor=\"#b7bbb5\" height=\"40\" style=\"color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px;\">\r\n   <tbody>\r\n      <tr bgcolor=\"#ffffff\">\r\n         <td width=\"526\" style=\"margin: 0px; padding: 0px; outline: none; line-height: 1.5;\">&nbsp;mysql -u아이디 -p&nbsp;<font color=\"#ff0000\">--local-infile=1</font></td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\"><strong><font color=\"#3a32c3\">나. 에러 발생 경우 2</font></strong></p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">데이터들이 전부 들어가지 않고 skip되는 경우가 발생할 수 있는데, 해결책은 필드명도 함께 적어주면 안전하게 들어 간다. 데이터 파일에 해당 필드값이 없는경우에 테이블 필드명을 함께 적어주면 해결이 된다.</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"padding: 0px; outline: none; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" width=\"526\" bgcolor=\"#b7bbb5\" height=\"40\" style=\"color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px;\">\r\n   <tbody>\r\n      <tr bgcolor=\"#ffffff\">\r\n         <td width=\"526\" style=\"margin: 0px; padding: 0px; outline: none; line-height: 1.5;\">\r\n            <p style=\"padding: 0px; outline: none;\">기존방식</p>\r\n            <p style=\"padding: 0px; outline: none;\">mysql&gt;&nbsp;load data local&nbsp; infile \"zipcode.txt\" into table zipcode;</p>\r\n            <p style=\"padding: 0px; outline: none;\"><br />변경방식</p>\r\n            <p style=\"padding: 0px; outline: none;\">mysql&gt;&nbsp;load data local infile \"zipcode.txt\" into table zipcode(ZIPCODE,SIDO,GUGUN,DONG,RI,BUNJI);</p>\r\n            </td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p><br style=\"color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\" /><br style=\"color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\" /><span style=\"color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">출처:&nbsp;</span><a href=\"https://koronaii.tistory.com/202\" style=\"color: #333333; text-decoration-line: none; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\" target=\"_blank\">https://koronaii.tistory.com/202</a><span style=\"color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff;\">&nbsp;[Some Time]</span></p>','https://koronaii.tistory.com/202','',0,0,2,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:09:35',0,'2019-04-26 15:09:35','210.101.103.92','','','','','','','','','','','',''),(319,-319,'',319,0,0,'','','html1','[Arduino] 라즈베리파이에서 아두이노로 시리얼 송신하기','<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; text-align: justify; line-height: 2;\"><span style=\"font-size: 10pt; color: #212121;\">이전에&nbsp;</span><span style=\"font-size: 10pt; color: #212121;\">아두이노에서 설정한 문자열을 라즈베리파이를 통해 Serial로 연결하여 수신받는 예제를 확인해 보았다. 이번에는 반대로 라즈베리파이에서 텍스트파일을 읽어와 아두이노에 뿌려줄 수 있는</span><span style=\"font-size: 10pt; color: #212121;\">&nbsp;통신을 구축</span><span style=\"font-size: 10pt; color: #212121;\">해보도록 하자. 필자의 경우에는&nbsp;</span><span style=\"font-size: 10pt; color: #212121;\">라즈베리파이에 있는</span><span style=\"font-size: 10pt; color: #212121;\">&nbsp;파일을 아두이노 SD카드에 전송하고자하는 특수한 목적 때문에 본 예제를 활용했을뿐 실상 잘 쓰이는 방법이</span><span style=\"font-size: 10pt; color: #212121;\">&nbsp;아니기 때문에 그냥 이렇게도 가능하구나 정도만 이해하고 넘어가도 될 듯 하다.</span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; text-align: justify; line-height: 2;\"><br /></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; text-align: justify; line-height: 2;\"><span style=\"font-size: 10pt; color: #212121;\">예제의 경우 이전과 같은 예제를 활용하였으며 파일을 읽어 아두이노에 전송하기 위해 약간의 수정을 가했다. 따라서 수정된 부분에 대한 설명을 위해 C언어 파일 입출력에 대한 간단한 개념을 기술하였고 이를 통해 아두이노와 직접 통신하는 부분까지 진행해보자.</span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; text-align: justify; line-height: 2;\"><br /></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; line-height: 2;\"><br /></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; line-height: 2;\"><span style=\"font-size: 10pt; color: #212121;\"><b>1. 파일 문자열 송신 예제</b></span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; line-height: 2;\"><br /></p>\r\n<div class=\"colorscripter-code\" style=\"margin: 0px; padding: 0px; color: #010101; overflow: auto; line-height: 2; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace !important; position: relative !important;\">\r\n   <table class=\"colorscripter-code-table\" cellspacing=\"0\" cellpadding=\"0\" style=\"margin: 0px; padding: 0px; border-width: initial; border-style: none; border-color: initial; background-color: #fafafa; border-radius: 4px;\">\r\n      <tbody>\r\n         <tr>\r\n            <td style=\"margin: 0px; padding: 6px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; color: #7f7f7f; border-right: 2px solid rgb(229, 229, 229);\">\r\n               <div style=\"margin: 0px; padding: 0px; word-break: normal; text-align: right; color: #666666; line-height: 15.6px; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace !important;\">\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">1</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">2</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">3</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">4</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">5</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">6</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">7</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">8</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">9</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">10</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">11</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">12</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">13</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">14</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">15</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">16</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">17</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">18</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">19</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">20</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">21</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">22</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">23</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">24</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">25</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">26</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">27</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">28</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">29</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">30</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">31</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">32</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">33</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">34</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">35</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">36</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">37</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">38</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">39</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">40</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">41</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">42</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">43</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">44</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">45</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">46</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">47</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">48</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">49</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">50</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">51</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">52</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">53</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">54</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">55</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">56</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">57</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">58</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">59</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">60</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">61</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">62</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">63</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">64</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">65</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">66</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">67</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">68</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">69</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">70</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">71</div>\r\n                  </div>\r\n               </td>\r\n            <td style=\"margin: 0px; padding: 6px 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; color: #7f7f7f;\">\r\n               <div style=\"margin: 0px; padding: 0px; color: #010101; line-height: 15.6px; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace !important;\">\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #0086b3;\">#ifdef</span>&nbsp;RaspberryPi&nbsp;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #0086b3;\">#include</span>&nbsp;<span style=\"color: #ff3399;\">&lt;</span>stdio.h<span style=\"color: #ff3399;\">&gt;</span>&nbsp;<span style=\"color: #999999;\">//for&nbsp;printf</span></div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #0086b3;\">#include</span>&nbsp;<span style=\"color: #ff3399;\">&lt;</span>stdint.h<span style=\"color: #ff3399;\">&gt;</span>&nbsp;<span style=\"color: #999999;\">//uint8_t&nbsp;definitions</span></div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #0086b3;\">#include</span>&nbsp;<span style=\"color: #ff3399;\">&lt;</span>stdlib.h<span style=\"color: #ff3399;\">&gt;</span>&nbsp;<span style=\"color: #999999;\">//for&nbsp;exit(int);</span></div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #0086b3;\">#include</span>&nbsp;<span style=\"color: #ff3399;\">&lt;</span><span style=\"color: #0099cc;\">string</span>.h<span style=\"color: #ff3399;\">&gt;</span>&nbsp;<span style=\"color: #999999;\">//for&nbsp;errno</span></div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #0086b3;\">#include</span>&nbsp;<span style=\"color: #ff3399;\">&lt;</span>errno.h<span style=\"color: #ff3399;\">&gt;</span>&nbsp;<span style=\"color: #999999;\">//error&nbsp;output</span></div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #0086b3;\">#include</span>&nbsp;<span style=\"color: #ff3399;\">&lt;</span>wiringPi.h<span style=\"color: #ff3399;\">&gt;</span></div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #0086b3;\">#include</span>&nbsp;<span style=\"color: #ff3399;\">&lt;</span>wiringSerial.h<span style=\"color: #ff3399;\">&gt;</span></div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #0099cc;\">char</span>&nbsp;device[]<span style=\"color: #ff3399;\">=</span>&nbsp;<span style=\"color: #993333;\">\"/dev/ttyACM0\"</span>;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #0099cc;\">int</span>&nbsp;fd;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #ff3399;\">unsigned</span>&nbsp;<span style=\"color: #0099cc;\">long</span>&nbsp;baud&nbsp;<span style=\"color: #ff3399;\">=</span>&nbsp;<span style=\"color: #308ce5;\">9600</span>;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #ff3399;\">unsigned</span>&nbsp;<span style=\"color: #0099cc;\">long</span>&nbsp;time<span style=\"color: #ff3399;\">=</span><span style=\"color: #308ce5;\">0</span>;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #0099cc;\">char</span>&nbsp;strHello[]&nbsp;<span style=\"color: #ff3399;\">=</span>&nbsp;<span style=\"color: #993333;\">\"HELLO\"</span>;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #0099cc;\">char</span>&nbsp;cTemp[<span style=\"color: #308ce5;\">512</span>]&nbsp;<span style=\"color: #ff3399;\">=</span>&nbsp;{<span style=\"color: #308ce5;\">0</span>};</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #0099cc;\">int</span>&nbsp;ch;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #0099cc;\">char</span>&nbsp;Endc;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #999999;\">//prototypes</span></div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #0099cc;\">int</span>&nbsp;main(<span style=\"color: #ff3399;\">void</span>);</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #ff3399;\">void</span>&nbsp;loop(<span style=\"color: #ff3399;\">void</span>);</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #ff3399;\">void</span>&nbsp;setup(<span style=\"color: #ff3399;\">void</span>);</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #ff3399;\">void</span>&nbsp;setup(){</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;<span style=\"color: #0099cc;\">printf</span>(<span style=\"color: #993333;\">\"%s&nbsp;\\n\"</span>,&nbsp;<span style=\"color: #993333;\">\"Raspberry&nbsp;Startup!\"</span>);</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;fflush(stdout);</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;<span style=\"color: #999999;\">//get&nbsp;filedescriptor</span></div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;<span style=\"color: #ff3399;\">if</span>&nbsp;((fd&nbsp;<span style=\"color: #ff3399;\">=</span>&nbsp;serialOpen&nbsp;(device,&nbsp;baud))&nbsp;<span style=\"color: #ff3399;\">&lt;</span>&nbsp;<span style=\"color: #308ce5;\">0</span>){</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;fprintf&nbsp;(stderr,&nbsp;<span style=\"color: #993333;\">\"Unable&nbsp;to&nbsp;open&nbsp;serial&nbsp;device:&nbsp;%s\\n\"</span>,&nbsp;strerror&nbsp;(errno))&nbsp;;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;exit(<span style=\"color: #308ce5;\">1</span>);&nbsp;<span style=\"color: #999999;\">//error</span></div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;}</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;<span style=\"color: #999999;\">//setup&nbsp;GPIO&nbsp;in&nbsp;wiringPi&nbsp;mode</span></div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;<span style=\"color: #ff3399;\">if</span>&nbsp;(wiringPiSetup&nbsp;()&nbsp;<span style=\"color: #ff3399;\">=</span><span style=\"color: #ff3399;\">=</span>&nbsp;<span style=\"color: #ff3399;\">-</span><span style=\"color: #308ce5;\">1</span>){</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;fprintf&nbsp;(stdout,&nbsp;<span style=\"color: #993333;\">\"Unable&nbsp;to&nbsp;start&nbsp;wiringPi:&nbsp;%s\\n\"</span>,&nbsp;strerror&nbsp;(errno))&nbsp;;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;exit(<span style=\"color: #308ce5;\">1</span>);&nbsp;<span style=\"color: #999999;\">//error</span></div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;}</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">}</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #999999;\">//&nbsp;main&nbsp;function&nbsp;for&nbsp;normal&nbsp;c++&nbsp;programs&nbsp;on&nbsp;Raspberry</span></div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #0099cc;\">int</span>&nbsp;main(){</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;setup();</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;FILE&nbsp;<span style=\"color: #ff3399;\">*</span>&nbsp;fp<span style=\"color: #ff3399;\">=</span>fopen(<span style=\"color: #993333;\">\"/home/pi/Desktop/Work/transfer.txt\"</span>,<span style=\"color: #993333;\">\"rt\"</span>);</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;<span style=\"color: #ff3399;\">if</span>(fp<span style=\"color: #ff3399;\">=</span><span style=\"color: #ff3399;\">=</span>NULL){</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #0099cc;\">printf</span>(<span style=\"color: #993333;\">\"file&nbsp;open&nbsp;fail\\n\"</span>);</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #ff3399;\">return</span>&nbsp;<span style=\"color: #ff3399;\">-</span><span style=\"color: #308ce5;\">1</span>;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">}<span style=\"color: #ff3399;\">else</span>{&nbsp;&nbsp;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;<span style=\"color: #0099cc;\">printf</span>(<span style=\"color: #993333;\">\"file&nbsp;open&nbsp;success\\n\"</span>);&nbsp;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;<span style=\"color: #ff3399;\">while</span>(fgets(cTemp,&nbsp;<span style=\"color: #ff3399;\">sizeof</span>(cTemp),fp)&nbsp;<span style=\"color: #ff3399;\">!</span><span style=\"color: #ff3399;\">=</span>&nbsp;NULL){</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;serialPuts&nbsp;(fd,&nbsp;cTemp);</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #0099cc;\">printf</span>(cTemp);</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">}</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #ff3399;\">if</span>(feof(fp)&nbsp;<span style=\"color: #ff3399;\">!</span><span style=\"color: #ff3399;\">=</span>&nbsp;<span style=\"color: #308ce5;\">0</span>){</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #0099cc;\">printf</span>(<span style=\"color: #993333;\">\"file&nbsp;upload&nbsp;success\\n\"</span>);</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"line-height: 15.6px;\">}</span></div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;<span style=\"color: #ff3399;\">else</span></div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #0099cc;\">printf</span>(<span style=\"color: #993333;\">\"file&nbsp;upload&nbsp;fail\\n\"</span>);</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;fclose(fp);</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">}</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;<span style=\"color: #ff3399;\">return</span>&nbsp;<span style=\"color: #308ce5;\">0</span>;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">}</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #0086b3;\">#endif</span>&nbsp;<span style=\"color: #999999;\">//#ifdef&nbsp;RaspberryPi</span></div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;</div>\r\n                  </div>\r\n               <div style=\"margin: -13px 5px 0px 0px; padding: 0px; text-align: right; font-size: 9px; font-style: italic;\"><a href=\"http://colorscripter.com/info#e\" target=\"_blank\" style=\"color: #e5e5e5; text-decoration-line: none;\">Colored by Color Scripter</a></div>\r\n               </td>\r\n            <td style=\"margin: 0px; padding: 0px 2px 4px 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; color: #7f7f7f; vertical-align: bottom;\"><a href=\"http://colorscripter.com/info#e\" target=\"_blank\" style=\"color: white; text-decoration-line: none;\"><span style=\"font-size: 9px; word-break: normal; border-radius: 10px; padding: 1px; background-color: #e5e5e5;\">cs</span></a></td>\r\n            </tr>\r\n         </tbody>\r\n      </table>\r\n   <br /></div>\r\n<div class=\"colorscripter-code\" style=\"margin: 0px; padding: 0px; color: #010101; overflow: auto; text-align: justify; line-height: 2; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace !important; position: relative !important;\"><span style=\"font-size: 10pt; color: #212121;\">예제를 보면 아래 int main() 부분만 다르다는 것을 알 수 있다. 동작 순서를 간단히 언급하자면 설정된 경로의 텍스트 파일을 읽어와 각 줄단위로 읽고 이를&nbsp;아두이노로 전송하며 만약 파일의 끝부분에 도달했을 경우 통신을 마치게 되는 구조이다. 그럼 각 함수에 대해 간단하게 설명하도록 하겠다.</span></div>\r\n<div class=\"colorscripter-code\" style=\"margin: 0px; padding: 0px; color: #010101; overflow: auto; text-align: justify; line-height: 2; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace !important; position: relative !important;\"><span style=\"font-size: 10pt;\"><br /></span></div>\r\n<div class=\"colorscripter-code\" style=\"margin: 0px; padding: 0px; color: #010101; overflow: auto; text-align: justify; line-height: 2; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace !important; position: relative !important;\"><span style=\"font-size: 10pt;\"><br /></span></div>\r\n<div class=\"colorscripter-code\" style=\"margin: 0px; padding: 0px; color: #010101; overflow: auto; text-align: justify; line-height: 2; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace !important; position: relative !important;\"><span style=\"font-size: 10pt; color: #212121;\"><b>2. 코드 설명</b></span></div>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; text-align: justify; line-height: 2;\"><br /></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; text-align: justify; line-height: 2;\">&nbsp;</p>\r\n<table class=\"txc-table\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"justify\" style=\"color: #7f7f7f; border-width: initial; border-style: none; border-color: initial; font-family: 돋움;\"></table>\r\n<table class=\"txc-table\" width=\"681\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"justify\" style=\"color: #7f7f7f; border-width: initial; border-style: none; border-color: initial; font-family: 돋움; width: 681px;\">\r\n   <tbody>\r\n      <tr>\r\n         <td style=\"margin: 0px; padding: 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; width: 680px; height: 38px; border-style: solid; background-color: #ffffff;\">\r\n            <p><span style=\"color: #4c4c4c;\"><b><span style=\"font-size: 10pt; font-family: Dotum, 돋움;\">&nbsp;&nbsp;</span></b></span><b><span style=\"color: #4c4c4c; font-family: Dotum, 돋움; line-height: 15.6px; white-space: pre; font-size: 10pt; background-color: #fafafa;\">FILE&nbsp;</span><span style=\"font-family: Dotum, 돋움; line-height: 15.6px; white-space: pre; color: #4c4c4c; font-size: 10pt; background-color: #fafafa;\">*</span><span style=\"color: #4c4c4c; font-family: Dotum, 돋움; line-height: 15.6px; white-space: pre; font-size: 10pt; background-color: #fafafa;\">&nbsp;fp</span><span style=\"font-family: Dotum, 돋움; line-height: 15.6px; white-space: pre; color: #4c4c4c; font-size: 10pt; background-color: #fafafa;\">=</span><span style=\"color: #4c4c4c; font-family: Dotum, 돋움; line-height: 15.6px; white-space: pre; font-size: 10pt; background-color: #fafafa;\">fopen(</span><span style=\"font-family: Dotum, 돋움; line-height: 15.6px; white-space: pre; color: #4c4c4c; font-size: 10pt; background-color: #fafafa;\">\"transfer.txt\"</span><span style=\"color: #4c4c4c; font-family: Dotum, 돋움; line-height: 15.6px; white-space: pre; font-size: 10pt; background-color: #fafafa;\">,</span><span style=\"font-family: Dotum, 돋움; line-height: 15.6px; white-space: pre; color: #4c4c4c; font-size: 10pt; background-color: #fafafa;\">\"rt\"</span><span style=\"color: #4c4c4c; font-family: Dotum, 돋움; line-height: 15.6px; white-space: pre; font-size: 10pt; background-color: #fafafa;\">)</span></b></p>\r\n            </td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p><br style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif;\" /></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif;\">&nbsp;</p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; text-align: justify; line-height: 2;\"><span style=\"font-size: 10pt; color: #212121;\">C언어 프로그램상에서 파일에 저장되어 있는 데이터를 읽기 위해서는 데이터가 이동할 수 있는 다리 역할을 할 수 있는 스트림을 형성해야 한다. 쉽게 말해 파일로</span><span style=\"font-size: 10pt; color: #212121;\">부터 데이터를 읽을 수 있는 최소한의 준비를 해주는 과정이라고 생각하면 된다. &nbsp;따라서 위 fopen 함수는 스트림 형성을 요청하는 호출문 역할을 하며 괄호 안에 첫번째 인자의 경우 읽어들일 파일의 경로를 뜻하고 두번째 인자는 형성할 스트림의 종류를 뜻하며 입력스트림과 출력스트림 이렇게 2가지 형태가 존재한다. 위 코드는 \"rt\" 로 설정하였으므로 입력스트림을 뜻하며 파일의 데이터를 읽을 수 있는 반면에 쓰지는 못하기 때문에 만약 데이터를 쓰기 원한다면 별도로 출력스트림을 다시 형성해야 한다. C언어에서는 이러한 개념을 바탕으로 총 6가지 스트림으로 세분화 할 수 있다.</span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; line-height: 2;\"><br /></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; line-height: 2;\">&nbsp;</p>\r\n<table class=\"txc-table\" width=\"681\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"color: #7f7f7f; border-width: initial; border-style: none; border-color: initial; font-family: 돋움; width: 681px;\">\r\n   <tbody>\r\n      <tr>\r\n         <td rowspan=\"1\" style=\"margin: 0px; padding: 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; width: 136px; height: 24px; border-style: solid; background-color: #eaeaea;\">\r\n            <p style=\"text-align: center;\"><span style=\"color: #212121;\">&nbsp;모드</span></p>\r\n            </td>\r\n         <td rowspan=\"1\" style=\"margin: 0px; padding: 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; width: 544px; height: 24px; border-bottom-style: solid; border-right-style: solid; border-top-style: solid; background-color: #eaeaea;\">\r\n            <p style=\"text-align: center;\"><span style=\"color: #212121;\">내용</span></p>\r\n            </td>\r\n         </tr>\r\n      <tr>\r\n         <td style=\"margin: 0px; padding: 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; width: 136px; height: 24px; border-style: solid; background-color: #ffffff;\">\r\n            <p style=\"text-align: center;\"><span style=\"color: #212121;\">r&nbsp;</span></p>\r\n            </td>\r\n         <td style=\"margin: 0px; padding: 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; width: 544px; height: 24px; border-bottom-style: solid; border-right-style: solid; border-top-style: solid; background-color: #ffffff;\">\r\n            <p><span style=\"color: #212121;\">&nbsp; &nbsp;오직 읽기만 가능</span></p>\r\n            </td>\r\n         </tr>\r\n      <tr>\r\n         <td style=\"margin: 0px; padding: 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; width: 136px; height: 62px; border-bottom-style: solid; border-right-style: solid; border-left-style: solid; background-color: #ffffff;\">\r\n            <p style=\"text-align: center;\"><span style=\"color: #212121;\">w</span></p>\r\n            </td>\r\n         <td style=\"margin: 0px; padding: 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; width: 544px; height: 62px; border-bottom-style: solid; border-right-style: solid; background-color: #ffffff;\">\r\n            <p><span style=\"color: #212121;\">&nbsp; &nbsp;오직 쓰기만 가능</span></p>\r\n            <p><span style=\"line-height: 1.5; color: #212121;\">&nbsp; &nbsp;만약 파일이 존재하지 않으면 새로운 파일을 생성해서 데이터 쓰기</span></p>\r\n            <p><span style=\"line-height: 1.5; color: #212121;\">&nbsp; &nbsp;만약 파일이 존재하면 기존의 데이터를 지우고 데이터&nbsp;쓰기&nbsp;</span></p>\r\n            </td>\r\n         </tr>\r\n      <tr>\r\n         <td style=\"margin: 0px; padding: 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; width: 136px; height: 24px; border-bottom-style: solid; border-right-style: solid; border-left-style: solid; background-color: #ffffff;\">\r\n            <p style=\"text-align: center;\"><span style=\"color: #212121;\">a</span></p>\r\n            </td>\r\n         <td style=\"margin: 0px; padding: 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; width: 544px; height: 24px; border-bottom-style: solid; border-right-style: solid; background-color: #ffffff;\">\r\n            <p><span style=\"color: #212121;\">&nbsp; &nbsp;w 모드와 달리 파일이 존재하면 파일 끝에 덧붙여 데이터 추가</span></p>\r\n            </td>\r\n         </tr>\r\n      <tr>\r\n         <td style=\"margin: 0px; padding: 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; width: 136px; height: 41px; border-bottom-style: solid; border-right-style: solid; border-left-style: solid; background-color: #ffffff;\">\r\n            <p style=\"text-align: center;\"><span style=\"color: #212121;\">r+&nbsp;</span></p>\r\n            </td>\r\n         <td style=\"margin: 0px; padding: 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; width: 544px; height: 41px; border-bottom-style: solid; border-right-style: solid; background-color: #ffffff;\">\r\n            <p><span style=\"color: #212121;\">&nbsp; &nbsp;읽기와 쓰기 가능</span></p>\r\n            <p><span style=\"color: #212121;\">&nbsp; &nbsp;만약 파일이 존재하면 기존의 데이터를 지우지 않고 데이터 덮어 쓰기</span></p>\r\n            </td>\r\n         </tr>\r\n      <tr>\r\n         <td style=\"margin: 0px; padding: 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; width: 136px; height: 41px; border-bottom-style: solid; border-right-style: solid; border-left-style: solid; background-color: #ffffff;\">\r\n            <p style=\"text-align: center;\"><span style=\"color: #212121;\">w+</span></p>\r\n            </td>\r\n         <td style=\"margin: 0px; padding: 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; width: 544px; height: 41px; border-bottom-style: solid; border-right-style: solid; background-color: #ffffff;\">\r\n            <p><span style=\"color: #212121;\">&nbsp; &nbsp;읽기와 쓰기 가능</span></p>\r\n            <p><span style=\"color: #212121;\">&nbsp; &nbsp;만약 파일이 존재하면 기존의 데이터를 지우고 데이터 쓰기</span></p>\r\n            </td>\r\n         </tr>\r\n      <tr>\r\n         <td style=\"margin: 0px; padding: 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; width: 136px; height: 24px; border-bottom-style: solid; border-right-style: solid; border-left-style: solid; background-color: #ffffff;\">\r\n            <p style=\"text-align: center;\"><span style=\"color: #212121;\">a+</span></p>\r\n            </td>\r\n         <td style=\"margin: 0px; padding: 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; width: 544px; height: 24px; border-bottom-style: solid; border-right-style: solid; background-color: #ffffff;\">\r\n            <p><span style=\"color: #212121;\">&nbsp; &nbsp;읽기와 쓰기&nbsp;가능 (쓰기의 경우 a 모드와 특징이 같다.)</span></p>\r\n            </td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif;\">&nbsp;</p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; line-height: 2;\"><span style=\"font-size: 10pt;\"><br /></span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; line-height: 2;\"><span style=\"font-size: 10pt; color: #212121;\">&nbsp;</span><span style=\"line-height: 21px;\"><span style=\"font-size: 10pt; color: #212121;\">\"rt\" 에서 뒤의 t는 텍스트모드를 뜻하며 t의 텍스트모드와 b의 바이너리모드가 있다고</span><span style=\"font-size: 10pt; color: #212121;\">만 이해하고 넘어가자.&nbsp;</span></span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; line-height: 2;\"><br /></p>\r\n<table class=\"txc-table\" width=\"645\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"color: #7f7f7f; border-width: initial; border-style: none; border-color: initial; font-family: 돋움;\"></table>\r\n<table class=\"txc-table\" width=\"681\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"color: #7f7f7f; border-width: initial; border-style: none; border-color: initial; font-family: 돋움; width: 681px;\">\r\n   <tbody>\r\n      <tr>\r\n         <td style=\"margin: 0px; padding: 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; width: 680px; height: 38px; border-style: solid; background-color: #ffffff;\">\r\n            <p><span style=\"color: #4c4c4c;\"><b><span style=\"font-size: 10pt; font-family: Dotum, 돋움;\">&nbsp; char *</span></b></span><b><span style=\"color: #4c4c4c; font-family: Dotum, 돋움; line-height: 15.6px; white-space: pre; font-size: 10pt; background-color: #fafafa;\">fgets(char *string,&nbsp;</span><span style=\"font-family: Dotum, 돋움; line-height: 15.6px; white-space: pre; color: #4c4c4c; font-size: 10pt; background-color: #fafafa;\">sizeof</span><span style=\"color: #4c4c4c; font-family: Dotum, 돋움; line-height: 15.6px; white-space: pre; font-size: 10pt; background-color: #fafafa;\">(*string), File *stream)</span></b></p>\r\n            </td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; line-height: 2;\"><br /></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; text-align: justify; line-height: 2;\"><span style=\"font-size: 10pt; color: #212121; line-height: 2;\">위 함수는 텍스트 파일에 저장된 문자를 줄 단위로 읽어들어와 반환하는 함수로서 첫번째 인자인 *string은 입력 받은 문자열을 저장할 포인터(읽은 데이터를 잠시 저장하는 공간이라고만 생각하자)를 뜻하고 두번째 인자인 sizeof()는 입력 받을 문자의 수를 설정하는 것이며 세번째 인자인 파일 포인터는 형성한 스트림의 이름을 뜻한다. &nbsp;</span><span style=\"color: #212121; font-size: 13.3333px; line-height: 20px;\">이 함수는 읽어드린 문자열에 대한 포인터를 반환하며 파일의 끝에 도달하거나 오류가 발생할 경우 NULL을 반환한다.</span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; text-align: justify; line-height: 2;\"><br /></p>\r\n<table class=\"txc-table\" width=\"645\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"color: #7f7f7f; border-width: initial; border-style: none; border-color: initial; font-family: 돋움;\"></table>\r\n<table class=\"txc-table\" width=\"681\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"color: #7f7f7f; border-width: initial; border-style: none; border-color: initial; font-family: 돋움; width: 681px;\">\r\n   <tbody>\r\n      <tr>\r\n         <td style=\"margin: 0px; padding: 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; width: 680px; height: 38px; border-style: solid; background-color: #ffffff;\">\r\n            <p><span style=\"color: #4c4c4c;\"><b><span style=\"font-size: 10pt; font-family: Dotum, 돋움;\">&nbsp;&nbsp;</span></b></span><strong style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; overflow-wrap: break-word; color: #444444; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; font-size: 15.96px; line-height: 23.94px; text-align: justify; background: rgb(252, 252, 252);\"><span style=\"font-size: 10pt; color: #4c4c4c; font-family: Dotum, 돋움;\">void&nbsp;</span><span style=\"font-size: 10pt; color: #4c4c4c; font-family: Dotum, 돋움;\">serialPuts (int fd, char *s)&nbsp;</span></strong></p>\r\n            </td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; line-height: 2;\"><span style=\"font-size: 10pt;\"><br /></span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; line-height: 2; text-align: justify;\"><font color=\"#212121\"><span style=\"font-size: 10pt;\">위 함수는 wiringPi의 입출력 함수중 하나로 쉽게 설명하자면 fgets로 저장한 문자열을 fd(여기서 fd는 시리얼 통신할 디바이스라고 생각해두자)로 전송하게 된다. 사실 위&nbsp;함수만 제대로 활용해도 아두이노로 문자열을 송신할 수 있지만 여기서는 파일입출력까지 같이 응용하여 예제를 만들어 보았다.&nbsp;wiringPi가 지원하는 함수에 대해 보다&nbsp;자세히 알고싶다면&nbsp;공식 홈페이지를 참고하도록 하자.</span></font></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; line-height: 2;\"><br /></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; line-height: 2;\"><span style=\"font-size: 13.3333px; line-height: 20px; color: #212121;\"><a href=\"http://wiringpi.com/reference/serial-library/\" target=\"_blank\" class=\"tx-link\" style=\"color: #959595; text-decoration-line: none; font-size: 13.3333px; line-height: 20px;\">http://wiringpi.com/reference/serial-library</a></span><span style=\"font-size: 13.3333px; line-height: 20px; color: #212121;\">&nbsp;</span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; line-height: 2;\"><br /></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; line-height: 2; text-align: justify;\"><span style=\"font-size: 10pt; color: #212121;\">마지막으로&nbsp;fopen을 통해 파일을 개방하였다면 fclose 함수를 통해 파일을 꼭 닫아주어야 한다. 그 이유는 스트림을 형성하기 위해서는 시스템에서 메모리를 할당해야 하는데 파일을 닫아주지 않으면 메모리가 할당된 채로 유지되면서 손실이 일어나기 때문이다. 쉽게 말해 메모리가 유출되는 것을 막기 위한 것으로 이해하면 된다.</span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; line-height: 2;\"><span style=\"font-size: 10pt;\"><br /></span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif;\"><span style=\"font-size: 10pt;\"><br /></span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif;\"><span style=\"font-size: 10pt; color: #212121;\"><b>3. 아두이노 코드</b></span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif;\"><span style=\"font-size: 10pt;\"><br /></span></p>\r\n<div class=\"colorscripter-code\" style=\"margin: 0px; padding: 0px; color: #010101; overflow: auto; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace !important; position: relative !important;\">\r\n   <table class=\"colorscripter-code-table\" cellspacing=\"0\" cellpadding=\"0\" style=\"margin: 0px; padding: 0px; border-width: initial; border-style: none; border-color: initial; background-color: #fafafa; border-radius: 4px;\">\r\n      <tbody>\r\n         <tr>\r\n            <td style=\"margin: 0px; padding: 6px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; color: #7f7f7f; border-right: 2px solid rgb(229, 229, 229);\">\r\n               <div style=\"margin: 0px; padding: 0px; word-break: normal; text-align: right; color: #666666; line-height: 15.6px; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace !important;\">\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">1</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">2</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">3</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">4</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">5</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">6</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">7</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">8</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">9</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">10</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">11</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">12</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">13</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">14</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">15</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">16</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">17</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">18</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">19</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">20</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">21</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">22</div>\r\n                  <div style=\"margin: 0px; padding: 0px; line-height: 15.6px;\">23</div>\r\n                  </div>\r\n               </td>\r\n            <td style=\"margin: 0px; padding: 6px 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; color: #7f7f7f;\">\r\n               <div style=\"margin: 0px; padding: 0px; color: #010101; line-height: 15.6px; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace !important;\">\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #0099cc;\">char</span>&nbsp;cTemp;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">String&nbsp;sReal&nbsp;<span style=\"color: #ff3399;\">=</span>&nbsp;<span style=\"color: #993333;\">\"\"</span>;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #ff3399;\">void</span>&nbsp;setup()</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">{</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;Serial.<span style=\"color: #0099cc;\">begin</span>(<span style=\"color: #308ce5;\">9600</span>);</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">}</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\"><span style=\"color: #ff3399;\">void</span>&nbsp;loop()</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">{</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #ff3399;\">while</span>(Serial.available()){</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cTemp&nbsp;<span style=\"color: #ff3399;\">=</span>&nbsp;Serial.read();</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sReal.concat(cTemp);</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #ff3399;\">if</span>(cTemp<span style=\"color: #ff3399;\">=</span><span style=\"color: #ff3399;\">=</span><span style=\"color: #993333;\">\'\\n\'</span>)</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serial.print(sReal);</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sReal<span style=\"color: #ff3399;\">=</span><span style=\"color: #993333;\">\"\"</span>;</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;&nbsp;&nbsp;&nbsp;}</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">}</div>\r\n                  <div style=\"margin: 0px; padding: 0px 6px; white-space: pre; line-height: 15.6px;\">&nbsp;</div>\r\n                  </div>\r\n               <div style=\"margin: -13px 5px 0px 0px; padding: 0px; text-align: right; font-size: 9px; font-style: italic;\"><a href=\"http://colorscripter.com/info#e\" target=\"_blank\" style=\"color: #e5e5e5; text-decoration-line: none;\">Colored by Color Scripter</a></div>\r\n               </td>\r\n            <td style=\"margin: 0px; padding: 0px 2px 4px 0px; line-height: 18px; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; color: #7f7f7f; vertical-align: bottom;\"><a href=\"http://colorscripter.com/info#e\" target=\"_blank\" style=\"color: white; text-decoration-line: none;\"><span style=\"font-size: 9px; word-break: normal; border-radius: 10px; padding: 1px; background-color: #e5e5e5;\">cs</span></a></td>\r\n            </tr>\r\n         </tbody>\r\n      </table>\r\n   </div>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; text-align: justify; line-height: 2;\"><span style=\"font-size: 10pt;\"><br /></span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; text-align: justify; line-height: 2;\"><span style=\"font-size: 10pt; color: #212121;\">아두이노 소스코드는 간단하게 구현해보았는데 여기서 유의해야할 것이 Serial.read() 함수이다. 라즈베리파이의 경우 문자를 한 줄로 읽거나 쓰는 것이 가능한데 아두이노는 한 글자씩 밖에 읽기가 불가능하다. 때문에 이러한 문제점을 해결하기위해 필자의 경우에는 while문을 활용하여 라즈베리파이를 통해 송신된 문자열을 각 문자 단위로 읽고 이를 concat 함수 (문자와 문자를 이어주는 역할을 한다.)를 사용하여 한 문장으로 만든 뒤에 해당 문자열의 끝을 나타내는 개행문자가 입력으로 들어올 시 문자열을 출력하고 문자열 변수를 초기화 하는 형태로 코드를 구현해보았다. 나름대로 구현이 잘 되긴 했지만 완성도면에서 미흡하다고 생각하기 때문에 후에 더 나은 방향으로 수정이 필요해 보인다.</span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; text-align: justify; line-height: 2;\"><span style=\"font-size: 13.3333px; line-height: 20px; color: #212121;\"><br /></span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; text-align: justify; line-height: 2;\"><span style=\"font-size: 13.3333px; line-height: 20px; color: #212121;\"><br /></span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif; line-height: 2;\"><span style=\"font-size: 13.3333px; line-height: 20px; color: #212121;\"><b>4. 결과 확인</b></span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif;\"><span style=\"font-size: 13.3333px; line-height: 20px; color: #212121;\"><br /></span></p>\r\n<p style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif;\"><font color=\"#212121\"><span style=\"font-size: 13.3333px; line-height: 20px;\">컴파일 방법은 기존과 동일하며 읽어올 파일을 형성하고 그 경로를 지정하여 예제 코드에 반영해주자.</span></font></p>\r\n<p><span style=\"color: #7f7f7f; font-family: Dotum, 돋움;\"></span><br style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif;\" /><br style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif;\" /><span style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif;\">출처:&nbsp;</span><a href=\"https://creamp.tistory.com/entry/%EB%9D%BC%EC%A6%88%EB%B2%A0%EB%A6%AC%ED%8C%8C%EC%9D%B4%EB%A1%9C-%EB%AC%B8%EC%9E%90%EC%97%B4-%EC%86%A1%EC%8B%A0%ED%95%98%EA%B8%B0%ED%8C%8C%EC%9D%BC-%EC%9E%85%EC%B6%9C%EB%A0%A5\" style=\"color: #959595; text-decoration-line: none; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif;\" target=\"_blank\">https://creamp.tistory.com/entry/라즈베리파이로-문자열-송신하기파일-입출력</a><span style=\"color: #7f7f7f; font-family: &quot;Nanum Gothic&quot;, 돋움, Tahoma, AppleGothic, sans-serif;\">&nbsp;[CreAmp]</span></p>','https://creamp.tistory.com/entry/%EB%9D%BC%EC%A6%88%EB%B2%A0%EB%A6%AC%ED%8C%8C%EC%9D%B4%EB%A1%9C-%EB%AC%B8%EC%9E%90%EC%97%B4-%EC%86%A1%EC%8B%A0%ED%95%98%EA%B8%B0%ED%8C%8C%EC%9D%BC-%EC%9E%85%EC%B6%9C%EB%A0%A5','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:10:20',0,'2019-04-26 15:10:20','210.101.103.92','','','','','','','','','','','',''),(320,-320,'',320,0,0,'','','html1','[ETC] FFMPEG 을 이용한 동영상 인코딩','<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">FFmpeg은 디지털 음성 스트림과 영상 스트림에 대해서 다양한 종류의 형태로 기록하고 변환하는 컴퓨터 프로그램입니다.</p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">동영상 변환, 분할, 합치기, 썸네일 생성 등에 대해 살펴보겠습니다.</p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\"><strong><span style=\"font-size: 24px;\">1. 동영상 인코딩</span></strong></p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">FFMPEG 을 이용하여 동영상을 변환할 수 있다.</p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">&nbsp;</p>\r\n<table width=\"621\" style=\"margin-bottom: 15px; max-width: 100%; overflow: hidden; color: #666666; font-family: arial, helvetica, sans-serif; height: 88px; border-color: #000000; background-color: #ffe3e3;\">\r\n   <tbody>\r\n      <tr style=\"background: rgb(245, 245, 245);\">\r\n         <td style=\"border-style: solid; border-color: #ffffff; padding: 10px;\"><span style=\"font-size: 16px;\">ffmpeg -y ⓐ -i ⓑ -acodec ⓒ -ab ⓓ -ar ⓔ -ac ⓕ -b:a ⓖ -vcodec ⓗ -level ⓘ -b:v ⓙ</span><br /><span style=\"font-size: 16px;\">-r ⓚ -s ⓛ -threads ⓜ -strict experimental ⓝ ⓞ</span></td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">ⓐ -y : 출력파일을 쓸 때 같은 이름의 파일이 있어도 확인없이 덮어쓰기를 하겠다는 의미.<br />ⓑ -i &lt;입력파일이름&gt; : 변환할 원본 동영상 파일 이름을 지정합니다.</p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">ⓒ -acodec &lt;오디오코덱&gt; : 오디오 코덱을 지정한다. 여기서는 aac 로 함.<br />ⓓ -ab &lt;숫자&gt; : 오디오 비트레이트를 지정한다.<br />ⓔ -ar &lt;숫자&gt; : 오디오 샘플링 레이트를 지정한다.<br />ⓕ -ac &lt;숫자&gt; : 오디오 채널을 지정한다.<br />ⓖ -b:a &lt;숫자&gt; : 오디오 비트레이트를 지정한다.<br />ⓗ -vcodec &lt;비디오코덱&gt; : 비디오 코덱을 지정한다. 여기서는 libx264 로 함. (H.264 코덱)<br />ⓘ -level &lt;숫자&gt; : Baseline 값. 30이면, Baseline 3.0<br />ⓙ -b:v &lt;숫자&gt; : 비디오 비트레이트를 지정한다.<br />ⓚ -r &lt;숫자&gt; : 출력 동영상 프레임 레이트를 지정한다.<br />ⓛ -s &lt;숫자&gt; : 화면 크기, 해상도를 지정한다. 원본 해상도보다 크게 할 경우 확대되서 나온다.<br />프리셋처럼 미리 지정된 문자가 있어서 직접 해상도를 지정하지 않아도 된다.<br />ex) vga – 640 x 480, sxga 1280 x 1024, wvga 852 x 480, hd720 – 1280 x 720 등<br />ⓜ -threads &lt;숫자&gt; : 쓰레드수를 지정한다. 속도 향상을 위해 멀티쓰레드를 지정해줄 수 있다.<br />반드시 CPU 코어 갯수와 일치시킬 필요는 없지만, 보통은 코어 갯수에<br />맞춘다.<br />ⓝ -strict experimental : 옵션의 엄격함을 느슨하게 풀어주는 옵션<br />ⓞ &lt;출력파일이름&gt; : 변환하여 저장할 동영상 파일 이름을 지정한다.</p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">동영상 변환 옵션 예)</p>\r\n<table width=\"621\" style=\"margin-bottom: 15px; max-width: 100%; overflow: hidden; color: #666666; font-family: arial, helvetica, sans-serif; height: 88px; border-color: #000000; background-color: #ffe3e3;\">\r\n   <tbody>\r\n      <tr style=\"background: rgb(245, 245, 245);\">\r\n         <td style=\"border-style: solid; border-color: #ffffff; padding: 10px;\"><span style=\"font-size: 16px;\"><br />ffmpeg -y -i 변환전동영상파일명.avi -acodec aac -ab 192k -ar&nbsp;48000&nbsp;-ac 2 -b:a 300k&nbsp;&nbsp;-vcodec libx264 -level 30 -b:v 3000k&nbsp;-r 29.97&nbsp;-s 1280:720&nbsp;-threads 4&nbsp;-strict -2 변환후동영상파일명.mp4<br /></span></td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\"><strong><span style=\"font-size: 24px;\"><br />2. 동영상 분할</span></strong></p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">동영상은 FFMpeg 을 이용하여 분할할 수 있다.</p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">– 지정된 시간 사이의 동영상 분할 명령 및 설명</p>\r\n<table width=\"621\" style=\"margin-bottom: 15px; max-width: 100%; overflow: hidden; color: #666666; font-family: arial, helvetica, sans-serif; height: 88px; border-color: #000000; background-color: #ffe3e3;\">\r\n   <tbody>\r\n      <tr style=\"background: rgb(245, 245, 245);\">\r\n         <td style=\"border-style: solid; border-color: #ffffff; padding: 10px;\"><span style=\"font-size: 16px;\">ffmpeg -i ⓐ -ss ⓑ -t ⓒ -vcodec copy ⓓ -acodec copy ⓔ ⓕ</span></td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">ⓐ -i &lt;분할파일이름&gt; : 분할할 동영상 파일 이름을 지정합니다.<br />ⓑ -ss &lt;숫자&gt; : 분할 시작할 시간 값. 초 단위로 적어주거나, HH:MM:SS 로 지정할 수 있다.<br />ⓒ -t &lt;숫자&gt; : 분할 완료할 시간 값. 초 단위로 적어주거나, HH:MM:SS 로 지정할 수 있다.<br />ex) 30으로 적어주면 분할을 시작한 시간으로 부터 30초간만 분할된다.<br />ⓓ -vcodec copy : 비디오 코덱은 원본 동영상과 같게 한다.<br />ⓔ -acodec copy : 오디오 코덱은 원본 동영상과 같게 한다.<br />ⓕ &lt;출력파일이름&gt; : 분할하여 저장할 동영상 파일 이름을 지정한다.<br />– 지정시간부터 동영상 분할 명령 및 설명<br />ffmpeg -i ⓐ -ss ⓑ -vcodec copy ⓒ -acodec copy ⓓ ⓔ<br />ⓐ -i &lt;분할파일이름&gt; : 분할할 동영상 파일 이름을 지정합니다.<br />ⓑ -ss &lt;숫자&gt; : 분할 시작할 시간 값. 초 단위로 적어주거나, HH:MM:SS 로 지정할 수 있다.<br />-t 옵션값이 없으므로 시작으로부터 끝까지 분할한다.<br />ⓒ -vcodec copy : 비디오 코덱은 원본 동영상과 같게 한다.<br />ⓓ -acodec copy : 오디오 코덱은 원본 동영상과 같게 한다.<br />ⓔ &lt;출력파일이름&gt; : 분할하여 저장할 동영상 파일 이름을 지정한다.</p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">– 지정된 시간 사이의 동영상 분할 명령 및 설명</p>\r\n<table width=\"621\" style=\"margin-bottom: 15px; max-width: 100%; overflow: hidden; color: #666666; font-family: arial, helvetica, sans-serif; height: 88px; border-color: #000000; background-color: #ffe3e3;\">\r\n   <tbody>\r\n      <tr style=\"background: rgb(245, 245, 245);\">\r\n         <td style=\"border-style: solid; border-color: #ffffff; padding: 10px;\"><span style=\"font-size: 16px;\">ffmpeg -i ⓐ -t ⓑ -vcodec copy ⓒ -acodec copy ⓓ ⓔ</span></td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">ⓐ -i &lt;분할파일이름&gt; : 분할할 동영상 파일 이름을 지정합니다.<br />ⓑ -t &lt;숫자&gt; : 분할 마칠 시간 값. 초 단위로 적어주거나, HH:MM:SS 로 지정할 수 있다.<br />-ss 옵션값이 없으므로 시작으로부터 지정한 시간까지 분할한다.<br />ⓒ -vcodec copy : 비디오 코덱은 원본 동영상과 같게 한다.<br />ⓓ -acodec copy : 오디오 코덱은 원본 동영상과 같게 한다.<br />ⓔ &lt;출력파일이름&gt; : 분할하여 저장할 동영상 파일 이름을 지정한다.</p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\"><span style=\"font-size: 24px;\"><strong><br />3. 동영상 합치기</strong></span></p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">분할된 동영상을 합칠때 사용한다.</p>\r\n<table width=\"621\" style=\"margin-bottom: 15px; max-width: 100%; overflow: hidden; color: #666666; font-family: arial, helvetica, sans-serif; height: 88px; border-color: #000000; background-color: #ffe3e3;\">\r\n   <tbody>\r\n      <tr style=\"background: rgb(245, 245, 245);\">\r\n         <td style=\"border-style: solid; border-color: #ffffff; padding: 10px;\"><span style=\"font-size: 16px;\"><br />file ‘abcdefg.mp4’<br />file ‘smile.mp4’<br /></span></td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">먼저 합칠 동영상 파일을 텍스트 파일로 열거해준다.</p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">file ‘동영상파일명1’<br />file ‘동영상파일명2’</p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">&nbsp;</p>\r\n<table width=\"621\" style=\"margin-bottom: 15px; max-width: 100%; overflow: hidden; color: #666666; font-family: arial, helvetica, sans-serif; height: 88px; border-color: #000000; background-color: #ffe3e3;\">\r\n   <tbody>\r\n      <tr style=\"background: rgb(245, 245, 245);\">\r\n         <td style=\"border-style: solid; border-color: #ffffff; padding: 10px;\"><span style=\"font-size: 16px;\">ffmpeg -f concat -i “ⓐ” -c copy ⓑ&nbsp;</span></td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">ⓐ -i &lt;텍스트파일명&gt; : 합칠 동영상 목록이 적혀 있는 텍스트 파일명<br />ⓑ &nbsp;&lt;출력파일이름&gt; : 합쳐서 저장할 동영상 파일 이름을 지정한다.</p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\"><strong><span style=\"font-size: 24px;\">4. 썸네일 이미지 추출</span></strong></p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">동영상 썸네일 이미지는 FFMpeg 을 이용하여 만들 수 있다.</p>\r\n<table width=\"621\" style=\"margin-bottom: 15px; max-width: 100%; overflow: hidden; color: #666666; font-family: arial, helvetica, sans-serif; height: 88px; border-color: #000000; background-color: #ffe3e3;\">\r\n   <tbody>\r\n      <tr style=\"background: rgb(245, 245, 245);\">\r\n         <td style=\"border-style: solid; border-color: #ffffff; padding: 10px;\"><span style=\"font-size: 16px;\">ffmpeg -vsync ⓐ -ss ⓑ -i ⓒ -an ⓓ -r ⓔ -vf thumbnail=ⓕ -q ⓖ ⓗ</span></td>\r\n         </tr>\r\n      </tbody>\r\n   </table>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">ⓐ -vsync &lt;숫자&gt; : 비디오 동기화 방법<br />이 옵션을 쓰지 않을 경우 -vframes 와 -r 을 이용한 방법에서 처음 2장의 썸네일<br />이미지가 시간차 없이 생성된다. vsync 2 값으로 설정하면 비교적 정상적으로 생성된다.<br />ⓑ -ss &lt;숫자&gt; : 썸네일 이미지 생성을 시작할 시간을 설정한다.<br />※ -ss 옵션이 -i 옵션 보다 반드시 먼저 나와야 한다.<br />ⓒ -i &lt;동영상파일명&gt; : 썸네일 이미지 생성할 원본 동영상 파일을 지정한다.<br />ⓓ -an &lt;&gt; : 썸네일 이미지만 생성할 것이므로 속도 향상을 위해 오디오 OFF 옵션을 쓰나 생략해도 된다.</p>\r\n<p style=\"margin-bottom: 15px; color: #666666; font-family: arial, helvetica, sans-serif; background-color: #ffffff;\">ⓔ -r &lt;숫자&gt; : 동영상 프레임 레이트 값을 넣어준다.<br />ⓕ -vf thumbnail=&lt;숫자&gt; : 썸네일 프레임 값<br />비디오 필터 중 하나, 연속된 프레임 중에서 가장 대표적인 프레임을 선택해준다.<br />기본값이 100 이므로 25프레임 영상에서는 4초당 1장의 썸네일 이미지가 출력된다.<br />※ 너무 큰 값은 과도한 메모리 자원을 요구하기 때문에 권장하지 않는다.<br />ⓖ -q &lt;숫자&gt; : 생성할 썸네일 이미지의 품질을 설정합니다.<br />0 ~ 31이내의 값을 지정할 수 있고, 숫자가 낮을수록 품질이 좋다.<br />가장 좋은 품질의 이미지라도 jpg 포멧이므로 1장당 용량이 수십kbyte~수백kbyte 용량이 된다.<br />ⓗ %03&lt;썸네일이미지파일명&gt;.jpg : 출력시킬 썸네일 이미지 파일 이름을 지정한다.<br />앞에 %03을 붙여주면 파일명 앞에 001 값부터 숫자가 누적되어 붙는다. ex) 001sample.jpg</p>','https://idchowto.com/?p=6653','',0,0,2,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:10:44',0,'2019-04-26 15:10:44','210.101.103.92','','','','','','','','','','','',''),(321,-321,'',321,0,0,'','','html1','[Linux] Secure Copy (SCP) 사용법','<p><span style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\">local 서버에서 remote 서버에 파일을 올리고 받을 때는 주로 FTP를 사용하지만, 시스템을 설정하고 테스트하고 잦은 파일 교환 작업을 할 때는 GUI툴을 사용하지 않고 local에서 파일을 복사하듯이 사용해야 할 때가 있다. SSH를 통해서 scp 명령으로 안전하고 간단하게 파일을 복사할수 있다.&nbsp;</span><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><font color=\"#57048c\" style=\"font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\"></font></p>\r\n<div class=\"txc-textbox\" style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; border-style: solid; border-width: 1px; border-color: #c1c1c1; background-color: #eeeeee; padding: 10px;\">\r\n   <p><font color=\"#57048c\">$ scp&nbsp;</font><font color=\"#3058d2\">&lt;옵션&gt;</font><font color=\"#57048c\">&nbsp;&lt;원본 경로 및 파일&gt; &lt;복사 받을 곳 경로 및 파일&gt;</font></p>\r\n   </div>\r\n<p><font color=\"#57048c\" style=\"font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\"><br />명령어</font><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><font color=\"#3058d2\" style=\"font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\">옵션</font><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><font color=\"#e31600\" style=\"font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\">Remote 서버 경로</font><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><span style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\">local 서버 경로</span><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><b style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\">1.</b><span style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\">&nbsp;Remote 서버에 파일&nbsp;</span><b style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\">올리기</b><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><font color=\"#57048c\" style=\"font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\"></font></p>\r\n<div class=\"txc-textbox\" style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; border-style: solid; border-width: 1px; border-color: #c1c1c1; background-color: #eeeeee; padding: 10px;\">\r\n   <p><font color=\"#57048c\">$</font><b style=\"color: #57048c;\">&nbsp;scp</b><font color=\"#0686a8\">&nbsp;-P 22</font><font color=\"#57048c\">&nbsp;</font><font color=\"#2b8400\">/home/myhome/abc.tar</font><font color=\"#57048c\">&nbsp;</font><font color=\"#e31600\">oracle@123.456.78.9:/home/oracle/</font></p>\r\n   </div>\r\n<p><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><span style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\">abc.tar 파일을 123.456.78.9 서버의 22번 포트로 SSH 접속하여 oracle 사용자로 로그인 한 후 /home/oracle/ 아래에 복사한다.</span><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><b style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\">2.&nbsp;</b><span style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\">Remote 서버에서 파일</span><b style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\">&nbsp;받기</b><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><font color=\"#57048c\" style=\"font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\"></font></p>\r\n<div class=\"txc-textbox\" style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; border-style: solid; border-width: 1px; border-color: #c1c1c1; background-color: #eeeeee; padding: 10px;\">\r\n   <p><font color=\"#57048c\">$&nbsp;<b>scp</b>&nbsp;</font><font color=\"#0686a8\">-P 22</font><font color=\"#57048c\">&nbsp;</font><font color=\"#e31600\">root@123.456.78.9:/usr/local/abc.xml</font><font color=\"#2b8400\">&nbsp;/home/oracle/</font></p>\r\n   </div>\r\n<p><font color=\"#2b8400\" style=\"font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\"></font><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><span style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\">remote 서버의 abc.xml 파일을 local의 /home/oracle로 다운로드 받는다.</span><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><span style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\">SSH포트는 변경하는 경우가 많으므로 -P 옵션 사용했고, 서버 주소와 디렉토리의 구분은 콜론(:)을 사용한다. 원격지의 home 주소는 \"./\"를 사용해도 된다.</span><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><span style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\">Ex) root@123.456.78.9:./</span><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /></p>\r\n<div class=\"txc-textbox\" style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; border-style: dashed; border-width: 1px; border-color: #fe8943; background-color: #fedec7; padding: 10px;\">\r\n   <p>자주사용하는 옵션<br />-P : 포트번호 지정<br />-p : preserve의 약자로 원본 파일 시간의 수정시간, 사용시간, 권한을 유지한다.<br />-r : recursive의 약자로 하위 폴더/파일 모두 복사한다.</p>\r\n   </div>\r\n<p><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><br style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" /><span style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\">출처:&nbsp;</span><a href=\"https://dinggur.tistory.com/94\" style=\"color: #666666; text-decoration-line: none; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\" target=\"_blank\">https://dinggur.tistory.com/94</a><span style=\"color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; background-color: #969696;\">&nbsp;[아무도없는세계]</span></p>','https://dinggur.tistory.com/94','',1,0,3,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:11:02',0,'2019-04-26 15:11:02','210.101.103.92','','','','','','','','','','','',''),(322,-322,'',322,0,0,'','','html1','[Arduino] 아두이노와 라즈베리 파이의 UART(serial) 통신','<p><span style=\"color: #404040; font-family: 굴림;\">라즈베리파이와&nbsp; 아두이노 사이의 통신에는 SPI, I2C , UART 등을 사용할수 있습니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">그중에 제일 만만한? UART(Serial) 을 테스트 해보았습니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">같은 전압의 IO핀을 사용하면 바로 결선해서 사용하면 간단해 지겠지만 아두이노의 입출력 핀 전압 5V 와 라즈베리파이의 GPIO 의 입출력 핀전압 3.3V 의 차이 때문에 직접적인 결선은 문제가 있어서 회로구성이 불가피 해집니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">UART 통신하는 회로의 구성에도 여러가지가 있습니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">MOSFET 과 저항으로 구성되는 방법 과 아두이노와 라즈베리파이 사이를 USB케이블로 연결하는 방법 그리고&nbsp; 높은 레벨의 Logic 신호를 낮은 레벨의 Logic으로 바꿔주는 Logic IC를 사용 하는 방법등이 있습니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">USB케이블은 따로 사용해야 하므로 제외하고 가격면이나 회로구성이 조금이나마 단순해 지는 Logic IC를 사용 하겠습니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">제가 사용한 Logic IC 는 국내쇼핑몰 등에서 구입하기 쉬운 74HC4050 입니다. 74HC4049 를 사용해도 무관 합니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">라즈베리 파이의 UART 설정 수정&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">라즈베리 파이는 기본적으로 115200 의 uart로 콘솔에 접속 하도록 되어 있습니다. 따라서 아두이노와&nbsp; minicom등 을 사용하여 시리얼에 바로 연결하게 되면 정상적으로 작동하지 않습니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">/boot/cmdline.txt&nbsp; 파일과&nbsp; /etc/inittab 을 수정하여 콘솔역할을 제거하여 시리얼 연결로만 작동하도록 수정해줄 필요가 있습니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">우선 cmdline.txt 를 수정합니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">Shell&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">$ sudo nano /boot/cmdline.txt&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">1&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">$ sudo nano /boot/cmdline.txt&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: 굴림;\">dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">/boot/cmdline.txt&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">1&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">다음으로 inittab 을 수정합니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">Shell&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">$ sudo nano /etc/inittab&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">1&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">$ sudo nano /etc/inittab&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100 를 찾아서 주석처리를 해주면 됩니다.&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">/boot/cmdline.txt&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">1&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">수정 후 리부팅을 해주면 콘솔역할을 막아주는 작업은끝이 납니다.</span></p>','','',0,0,3,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:11:35',0,'2019-04-26 15:11:35','210.101.103.92','','','','','','','','','','','',''),(323,-323,'',323,0,0,'','','html1','[Linux] 라즈베리파이를 이용한 무선 메쉬 네트워크(wireless mesh network) 구성','<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box; font-weight: 700;\">무선 메쉬 네트워크(wireless mesh network)</span>는 우리나라에서는 일상 영역에서는 잘 쓰이지 않지만(그냥 AP 하나가 유선망에 직접 연결되어 무선 인터넷을 제공하는 경우가&nbsp;</span><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">많고, 이것은 메쉬 네트워크라고 하기에는 너무 제한적), 미국을 비롯한</span><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp;넓은 지역에 인터넷 액세스를 제공하기 위한 저렴하고 유연한 방법으로 많이 쓰이고 있으며, 연구나 특수한 목적을 달성하기 위해서도 자주 쓰인다.</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">나도 연구 차원에서 메쉬 네트워크 실험 환경을 구축해야 될 필요성에 따라&nbsp;<span style=\"box-sizing: border-box; font-weight: 700;\">라즈베리파이</span>를 메쉬 라우터(mesh router)로 활용하는 형태로 구성해 보았고</span><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">, 성공적으로 연결이 되는 설정을 기록하고자 한다. 다만 말 그대로 연결만 가능한 상태이기 때문에, 이 상태에서 앞으로 성능을 개선하기 위해 여러가지 설정 변경을 해야 할 것이다. (테스트 결과, 인터넷 속도는 100KB/s가 채 되지 않는 듯 하다. ㅜㅜ)</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">라즈베리파이 3개가 각각 AP 역할을 수행할 뿐만 아니라 서로 또다른 무선 네트워크를 통해 연결됨으로써, 하나의 AP에 연결된 모바일 기기가 다른 AP에 연결된 모바일 기기에 직접 연결(direct communication)하도록 하는 것이 목표이다. 즉, 인터넷 연결</span><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp;없이 AP들끼리 패킷을 전달한다. 이를 위해, 각 라즈베리파이는 최소 2개의 무선랜 인터페이스(무선랜카드) 필요로 한다. 하나는 모바일 기기들을 연결하기 위한 것이고, 다른 하나는 메쉬 라우터들끼리 연결하기 위한 것이다. 여기서 무선랜 인터페이스 개수가 더 늘어나면, 여유 자원으로 성능을 개선하는 데 활용할 수 있다.</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: center; color: #333333; font-size: 14px; background-color: #ffffff; clear: none; float: none;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: center; color: #333333; font-size: 14px; background-color: #ffffff; clear: none; float: none;\"><span class=\"imageblock\" style=\"box-sizing: border-box; max-width: 100%; height: auto; display: inline-block; width: 760px;\"><img src=\"https://t1.daumcdn.net/cfile/tistory/2373A047569CAA8B3B\" width=\"760\" filename=\"mesh3.png\" filemime=\"image/jpeg\" style=\"box-sizing: border-box; border: 0px; vertical-align: middle; max-width: 100%; height: auto; cursor: pointer;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: center; color: #333333; font-size: 14px; background-color: #ffffff; clear: none; float: none;\">&nbsp;</p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: center; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">(무선 메쉬 네트워크 구성</span><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">)</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box; font-weight: 700;\"><span style=\"box-sizing: border-box; font-size: 12pt;\">&lt;준비물&gt;</span></span></span></p>\r\n<ul style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 10px; color: #333333; font-family: &quot;KoPub Dotum&quot;; font-size: 14px; background-color: #ffffff;\">\r\n   <li style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">Raspbian이 설치된&nbsp;라즈베리파이 2~3개</span></li>\r\n   <li style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box; color: #ff0000;\">5V/2A 이상</span>의 전원 어댑터 (USB 무선랜카드를 2개 쓰기 때문에 전력이 안정적으로 공급되어야 한다. 경험상 5V/2A 중에서도 품질이 나쁘면 전력이 잘 공급되지 않아서 계속 재부팅되는 문제가 있었다.)</span></li>\r\n   <li style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">USB 무선랜카드: 라즈베리파이 각각에 2개씩 연결해야 하므로 라즈베리파이 개수의 2배만큼 필요</span></li>\r\n   <li style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box; line-height: 1.5;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">유선 공유기(인터넷 연결과 라즈베리파이 설정을 쉽게 하기 위해서</span><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp;필요)</span></span></li>\r\n   <li style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">랜선(유선 공유기와 라즈베리파이 간 연결)</span></li>\r\n   </ul>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box; font-weight: 700;\"><span style=\"box-sizing: border-box; font-size: 12pt;\">1. 라즈베리파이 초기 설정</span></span></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">향후 안정적인 사용을 위해 Locale, time, keyboard layout, SD</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">카드 전체 용량 활용을 위한 resize</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">&nbsp;설정 등을 해 둔다.</span></p>\r\n<div class=\"txc-textbox\" style=\"box-sizing: border-box; color: #333333; font-family: &quot;KoPub Dotum&quot;; font-size: 14px; border: 1px solid rgb(121, 165, 228); padding: 10px; background-color: #dbe8fb;\">\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">$ sudo raspi-config</span></p>\r\n   </div>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">자세한 설정 방법은 산딸기마을 이장 나무꾼님의 글(<a href=\"http://www.rasplay.org/?p=3786\" target=\"_blank\" class=\"tx-link\" style=\"box-sizing: border-box; background-color: transparent; color: #303030; text-decoration-line: none; transition: color 0.2s ease-in-out 0s;\">http://www.rasplay.org/?p=3786</a>)을</span><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp;참고할 것.</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box; font-weight: 700;\"><span style=\"box-sizing: border-box; font-size: 12pt;\">2. 필요한 패키지 설치</span></span></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; font-weight: 700;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 11pt;\">2-1.&nbsp;</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 11pt;\">라즈베리파이의 기본 네트워크 설정 서비스 삭제</span></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; font-weight: 700;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\"><br style=\"box-sizing: border-box;\" /></span></span></p>\r\n<div class=\"txc-textbox\" style=\"box-sizing: border-box; color: #333333; font-family: &quot;KoPub Dotum&quot;; font-size: 14px; border: 1px solid rgb(121, 165, 228); padding: 10px; background-color: #dbe8fb;\">\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">$ sudo apt-get purge raspberrypi-net-mods ifplugd</span></p>\r\n   </div>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp;- 이유: /etc/network/interfaces 파일을 이용한 설정이 제대로 작동하기 위해서 다른 설정 도구를 지워야 한다.</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp;- 이 부분은 사용자마다 네트워크 설정에 사용하는 방법이 조금씩 달라서(리눅스 배포판에 따라서도 다르다) 본의 아니게 특정한 방법을 강요하는 것이 될 수도 있다. 하지만 필자는 네트워크 설정시 GUI를 이용하는 것을 싫어하기 때문에(그냥 AP에 연결할 때를 제외한 ad-hoc network 등의 다양한 설정을 하다 보면 원하는 대로 작동하지 않는 경우가 많다. 특히 우분투에 내장된 NetworkManager가 악명이 높다.) 전통적인 방법인 /etc/network/interfaces 파일을 핵심으로 하는 설정을 사용한다.</span></p>\r\n<div style=\"box-sizing: border-box; color: #333333; font-family: &quot;KoPub Dotum&quot;; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></div>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box; font-weight: 700;\"><span style=\"box-sizing: border-box; font-size: 11pt;\">2-2. 필요한 패키지 설치: hostpd, isc-dhcp-server, quagga</span></span></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<div class=\"txc-textbox\" style=\"box-sizing: border-box; color: #333333; font-family: &quot;KoPub Dotum&quot;; font-size: 14px; border: 1px solid rgb(121, 165, 228); padding: 10px; background-color: #dbe8fb;\">\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">$ sudo apt-get update</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">$ sudo apt-get install hostapd isc-dhcp-server quagga</span></p>\r\n   </div>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\">&nbsp;</p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp;- hostapd: 리눅스를 액세스포인트(AP)로 작동하도록 해 주는 서비스</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp;- isc-dhcp-server: AP에 연결되는 클라이언트에게 IP주소를 발급하기 위한 DHCP 서버 서비스</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp;- quagga: 라즈베리파이와 클라이언트들이 서로 통신할 수 있도록 경로를 설정하는 라우팅 패키지(quagga에 여러 라우팅 프로토콜이 내장되어 있는데, 그 중에서 RIP를 쓰고자 한다.)</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp;- 이 패키지들 설치를&nbsp;위해서 라즈베리파이가 인터넷에 연결되어 있어야 한다.</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box; font-weight: 700;\"><span style=\"box-sizing: border-box; font-size: 12pt;\">3. 네트워크 설정</span></span></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box; font-weight: 700;\"><span style=\"box-sizing: border-box; font-size: 11pt;\">3-1. /etc/network/interfaces</span></span></span></p>\r\n<div class=\"txc-textbox\" style=\"box-sizing: border-box; color: #333333; font-family: &quot;KoPub Dotum&quot;; font-size: 14px; border: 1px solid rgb(193, 193, 193); padding: 10px; background-color: #eeeeee;\">\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">auto lo</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">iface lo inet loopback</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><br style=\"box-sizing: border-box;\" /></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">auto eth0</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">iface eth0 inet dhcp</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><br style=\"box-sizing: border-box;\" /></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #0900ff; font-size: 10pt;\"># AP로 사용할 무선랜카드 설정</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #0900ff; font-size: 10pt;\"># 1번 노드 address: 10.0.1.1, 2번 노드: 10.0.2.1, 3번 노드: 10.0.3.1</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">auto wlan0</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">iface wlan0 inet static</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp; address&nbsp;<span style=\"box-sizing: border-box; color: #ff0000;\">10.0.1.1</span></span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp; netmask 255.255.255.0</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box;\">hostapd /etc/hostapd/hostapd.conf&nbsp;</span><span style=\"box-sizing: border-box; color: #0900ff;\"># DHCP 서버 실행을 위해서 필요하다.</span></span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><br style=\"box-sizing: border-box;\" /></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #0900ff; font-size: 10pt;\"># 라즈베리파이들이 서로 통신하기 위한 애드혹 네트워크 설정</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #0900ff; font-size: 10pt;\"># 1번 노드 address: 192.168.3.1, 2번 노드: 192.168.3.2, 3번 노드: 192.168.3.3</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #0900ff; font-size: 10pt;\"># 주소 대역은 필자의 경우 192.168.3.X로 했지만, 다른 대역을 써도 된다.</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #0900ff; font-size: 10pt;\"><span style=\"box-sizing: border-box;\"># 다만, 192.168.0.X는 기존 공유기에서 워낙 많이 쓰기 때문에 오류 방지를 위해 안 쓰는 것이 좋다.</span><br style=\"box-sizing: border-box;\" /><span style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box;\"># wireless-essid, wireless-channel 값은</span><span style=\"box-sizing: border-box;\">&nbsp;3개 모두 똑같아야 한다.</span></span></span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">auto wlan1</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">iface wlan1 inet static</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp; address<span style=\"box-sizing: border-box; color: #ff0000;\">&nbsp;192.168.3.1</span></span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp; netmask 255.255.255.0</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp; wireless-channel&nbsp;<span style=\"box-sizing: border-box; color: #ff0000;\">11</span></span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp; wireless-essid&nbsp;<span style=\"box-sizing: border-box; color: #ff0000;\">RpiAdhoc</span></span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\">&nbsp;</p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp; wireless-mode ad-hoc</span></p>\r\n   </div>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box; font-weight: 700;\"><span style=\"box-sizing: border-box; font-size: 11pt;\">3-2. /etc/hostapd/hostapd.conf</span></span></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; font-size: 10pt; line-height: 1.5; color: #000000;\">&nbsp;여기서 지정하는 interface 항목은 3-1에서 AP로 사용하려는 인터페이스 이름과 일치해야 한다.</span></p>\r\n<div class=\"txc-textbox\" style=\"box-sizing: border-box; color: #333333; font-family: &quot;KoPub Dotum&quot;; font-size: 14px; border: 1px solid rgb(193, 193, 193); padding: 10px; background-color: #eeeeee;\">\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">interface=wlan0</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">driver=nl80211</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><br style=\"box-sizing: border-box;\" /></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #0900ff; font-size: 10pt;\"># 1번 노드: RpiAP1,&nbsp;</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #0900ff; font-size: 10pt;\">2번 노드: RpiAP2,&nbsp;</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #0900ff; font-size: 10pt;\">3번 노드: RpiAP3&nbsp;</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">ssid=<span style=\"box-sizing: border-box; color: #ff0000;\">RpiAP1</span></span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><br style=\"box-sizing: border-box;\" /></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #0900ff; font-size: 10pt;\"># 무선랜 작동 모드, 802.11n도 일단 g로 표기해야 한다.</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">hw_mode=g</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><br style=\"box-sizing: border-box;\" /></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #0900ff; font-size: 10pt;\"># 802.11n 모드를 켜려면 아래 4줄을 추가한다. 이것은 무선랜카드 특성에 따라서 될 수도, 안될 수도 있다.</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #0900ff; font-size: 10pt;\"># 일단 위의 hw_mode=g 만 먼저 입력해서 되는지 확인한 다음에 아래 옵션을 추가하도록 하자.</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">ieee80211n=1</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">wmm_enabled=1</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">ieee80211d=1</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">country_code=US</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><br style=\"box-sizing: border-box;\" /></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #0900ff; font-size: 10pt;\"># 1~11 중에서 지정할 수 있다. 가급적 1,6,11 중 하나를 고른다.</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #0900ff; font-size: 10pt;\">#&nbsp;애드혹 네트워크에서 쓰는 채널과 다르게 지정하는 것이 좋다.</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">channel=6</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><br style=\"box-sizing: border-box;\" /></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">macaddr_acl=0</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">auth_algs=1</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\">&nbsp;</p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">ignore_broadcast_ssid=0</span></p>\r\n   </div>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box; font-weight: 700;\"><span style=\"box-sizing: border-box; font-size: 11pt;\">3-3. /etc/dhcp/dhcpd.conf</span></span></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">이 파일은 이미 존재해야 정상적인 상황이다.</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">이미 존재하는 파일을 열고,&nbsp;</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">option domain-name-servers,&nbsp;</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">default-lease-time,&nbsp;</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">max-lease-time, authoritative</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">&nbsp;</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">항목의 주석을 해제하고 원하는 도메인 네임 서버 주소와 DHCP주소 할당 시간을&nbsp;입력한다.</span></p>\r\n<div class=\"txc-textbox\" style=\"box-sizing: border-box; color: #333333; font-family: &quot;KoPub Dotum&quot;; font-size: 14px; border: 1px solid rgb(193, 193, 193); padding: 10px; background-color: #eeeeee;\">\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">option domain-name-servers&nbsp;<span style=\"box-sizing: border-box; color: #ff0000;\">8.8.8.8</span>;&nbsp;<span style=\"box-sizing: border-box; color: #0900ff;\"># 그외 원하는 DNS 서버 주소 사용 가능</span></span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">default-lease-time 600;</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">max-lease-time 7200;</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">authoritative;</span></p>\r\n   </div>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">그리고 맨 아래에 아래 내용을 추가한다. 아래와 같이 설정하고 클라이언트가 1번 노드에 연결할&nbsp;경우, 클라이언트는 DHCP를 통해서 10.0.1.10부터 10.0.1.250 사이의 주소를 발급받게 되고, 보통은 10부터 순서대로 발급받게 된다.</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">1번 노드의 경우:</span></p>\r\n<div class=\"txc-textbox\" style=\"box-sizing: border-box; color: #333333; font-family: &quot;KoPub Dotum&quot;; font-size: 14px; border: 1px solid rgb(193, 193, 193); padding: 10px; background-color: #eeeeee;\">\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">subnet&nbsp;<span style=\"box-sizing: border-box; color: #ff0000;\">10.0.1.0</span>&nbsp;netmask 255.255.255.0 {</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span class=\"Apple-tab-span\" style=\"box-sizing: border-box; white-space: pre; color: #000000; font-size: 10pt;\"></span><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">range&nbsp;<span style=\"box-sizing: border-box; color: #ff0000;\">10.0.1.10 10.0.1.250</span>;</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span class=\"Apple-tab-span\" style=\"box-sizing: border-box; white-space: pre; color: #000000; font-size: 10pt;\"></span><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">option routers&nbsp;<span style=\"box-sizing: border-box; color: #ff0000;\">10.0.1.1</span>;</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\">&nbsp;</p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">}</span></p>\r\n   </div>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">2번 노드의 경우:</span></p>\r\n<div class=\"txc-textbox\" style=\"box-sizing: border-box; color: #333333; font-family: &quot;KoPub Dotum&quot;; font-size: 14px; border: 1px solid rgb(193, 193, 193); padding: 10px; background-color: #eeeeee;\">\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">subnet 10.0.2.0 netmask 255.255.255.0 {</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span class=\"Apple-tab-span\" style=\"box-sizing: border-box; white-space: pre; color: #000000; font-size: 10pt;\"></span><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">range 10.0.2.10 10.0.2.250;</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span class=\"Apple-tab-span\" style=\"box-sizing: border-box; white-space: pre; color: #000000; font-size: 10pt;\"></span><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">option routers 10.0.2.1;</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\">&nbsp;</p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">}</span></p>\r\n   </div>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">3번 노드의 경우:</span></p>\r\n<div class=\"txc-textbox\" style=\"box-sizing: border-box; color: #333333; font-family: &quot;KoPub Dotum&quot;; font-size: 14px; border: 1px solid rgb(193, 193, 193); padding: 10px; background-color: #eeeeee;\">\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">subnet 10.0.3.0 netmask 255.255.255.0 {</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span class=\"Apple-tab-span\" style=\"box-sizing: border-box; white-space: pre; color: #000000; font-size: 10pt;\"></span><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">range 10.0.3.10 10.0.3.250;</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span class=\"Apple-tab-span\" style=\"box-sizing: border-box; white-space: pre; color: #000000; font-size: 10pt;\"></span><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">option routers 10.0.3.1;</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\">&nbsp;</p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">}</span></p>\r\n   </div>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box; font-weight: 700;\"><span style=\"box-sizing: border-box; font-size: 11pt;\">3-4. /etc/quagga/*</span></span></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">zebra.conf (없으면 새로 만든다.)</span></p>\r\n<div class=\"txc-textbox\" style=\"box-sizing: border-box; color: #333333; font-family: &quot;KoPub Dotum&quot;; font-size: 14px; border: 1px solid rgb(193, 193, 193); padding: 10px; background-color: #eeeeee;\">\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">hostname Router</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">password zebra</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">enable password zebra</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">debug zebra events</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">debug zebra packet</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">ip forwarding</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">log file /var/log/quagga/zebra.log</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><br style=\"box-sizing: border-box;\" /></p>\r\n   </div>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">ripd.conf (없으면 새로 만든다.)</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">참고로 quagga 설정파일은 주석을 사용하는 문법이 다르기 때문에(!로 시작하는 라인만 주석처리), 아래의 파란색 글씨(&lt;-- 이후)는 쓰지 말 것.</span></p>\r\n<div class=\"txc-textbox\" style=\"box-sizing: border-box; color: #333333; font-family: &quot;KoPub Dotum&quot;; font-size: 14px; border: 1px solid rgb(193, 193, 193); padding: 10px; background-color: #eeeeee;\">\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">hostname ripd</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">password zebra</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">debug rip events</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">debug rip packet</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">router rip</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp;version 2</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp;network&nbsp;<span style=\"box-sizing: border-box; color: #ff0000;\">10.0.1.0/24</span>&nbsp;&nbsp;<span style=\"box-sizing: border-box; color: #0900ff;\">&lt;-- 1번노드의 경우임. 2번은 10.0.2.0/24, 3번은 10.0.3.0/24</span></span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp;network&nbsp;<span style=\"box-sizing: border-box; color: #ff0000;\">192.168.3.0/24</span>&nbsp;&nbsp;<span style=\"box-sizing: border-box; color: #0900ff;\">&lt;-- 라즈베리파이들의 애드혹 네트워크</span></span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp;network&nbsp;<span style=\"box-sizing: border-box; color: #ff0000;\">192.168.1.0/24</span>&nbsp;<span style=\"box-sizing: border-box; color: #0900ff;\">&nbsp;&lt;-- 라즈베리파이의 유선(eth) IP주소 대역. 인터넷 연결을 위해 필요</span></span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">log file /var/log/quagga/ripd.log</span></p>\r\n   </div>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000;\">위 설정에서 192.168.1.X는 필자의 유선공유기 IP주소에 해당한다. 각자의 공유기에서 할당받는 IP주소(즉, 라즈베리파이의 eth0 인터페이스가갖는 주소) 대역에 맞게 수정해야 한다.</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000;\">그리고 진정한 메쉬 네트워크의 작동을 보고 싶으면, 1번 노드를 제외한 나머지 2개의 라즈베리파이에서는 마지막 eth0의 IP주소 대역을 삭제한다. 그러면 인터넷은 1번 노드에서만 연결되고, 나머지 노드들은 1번이 제공하는 인터넷을 자신의 클라이언트들에게 제공할 것이다. 물론 속<span style=\"box-sizing: border-box;\">도는 더 느려진다. (애초에 메쉬 네트워크의 목적 중 하나가 더 넓은 I</span><span style=\"box-sizing: border-box;\">nternet coverage니까)</span></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box; font-weight: 700;\"><span style=\"box-sizing: border-box; font-size: 11pt;\">3-5. 설정 적용을 위한 서비스 재시작(또는 재부팅)</span></span></span></p>\r\n<div class=\"txc-textbox\" style=\"box-sizing: border-box; color: #333333; font-family: &quot;KoPub Dotum&quot;; font-size: 14px; border: 1px solid rgb(121, 165, 228); padding: 10px; background-color: #dbe8fb;\">\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">$ sudo /etc/init.d/networking restart</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">$</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">&nbsp;</span><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">sudo /etc/init.d/hostapd restart</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">$</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">&nbsp;</span><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">sudo /etc/init.d/isc-dhcp-server restart</span></p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\">&nbsp;</p>\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">$</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">&nbsp;</span><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">sudo /etc/init.d/quagga restart</span></p>\r\n   </div>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">또는 그냥 라즈베리파이를 아예 재부팅한다.&nbsp;</span><span style=\"box-sizing: border-box; font-size: 10pt; line-height: 1.5; color: #000000;\">여기까지 하면, 라즈베리파이는 유선랜을 통해서 인터넷이 되지만 새로 만든 AP를 통해서 연결하는 클라이언트들은 서로 접속은 되지만 인터넷은 안되는 상태가 된다. 인터넷 연결 설정 방법은 5단원을 참고할 것.</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box; font-weight: 700;\"><span style=\"box-sizing: border-box; font-size: 12pt;\">4. 테스트</span></span></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box; font-weight: 700;\"><span style=\"box-sizing: border-box; font-size: 11pt;\">4-1. 클라이언트(스마트폰, 노트북 등) 연결</span></span></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp; 3-5까지 설정을 마치고 나서 스마트폰에서 와이파이 검색을 하면, RpiAP1,&nbsp;</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">RpiAP2,&nbsp;</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">RpiAP3이 보일 것이다.</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">메쉬 네트워크가 제대로 설정되었는지 확인하기 위해서는 2대 이상의 클라이언트 기기로 서로 다른 AP에 연결해야 한다.</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box; font-weight: 700;\"><span style=\"box-sizing: border-box; font-size: 11pt;\">4-2. Ping</span></span></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">&nbsp; 한쪽 클라이언트에서 다른 AP에 연결된 다른 클라이언트의 IP주소로 Ping을 날려서 되는지 확인한다.</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">예를 들어, RpiAP1에 연결된 클라이언트(10.0.1.10)에서 아래와 같은 기기들에게 ping을 날려서 정상적으로 되어야 한다.</span></p>\r\n<ul style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 10px; color: #333333; font-family: &quot;KoPub Dotum&quot;; font-size: 14px; background-color: #ffffff;\">\r\n   <li style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">RpiAP2 (10.0.2.1)</span></li>\r\n   <li style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">RpiAP3 (10.0.3.1)</span></li>\r\n   <li style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">RpiAP2에 연결된 클라이언트(10.0.2.10 ~ 10.0.2.250 중에 할당받은 주소)</span></li>\r\n   <li style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">RpiAP3</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">에 연결된 클라이언트(10.0.3.10</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">&nbsp;</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">~ 10.0.3.250 중에 할당받은 주소</span><span style=\"box-sizing: border-box; line-height: 1.5; color: #000000; font-size: 10pt;\">)</span></li>\r\n   </ul>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; font-size: 10pt; line-height: 1.5; color: #000000;\">스마트폰에서는 terminal emulator 같은 콘솔 앱을 가지고 테스트할 수 있다.&nbsp;</span><span style=\"box-sizing: border-box; line-height: 1.5; font-size: 10pt; color: #000000;\">RIP가 라우팅 정보를 교환하는 데&nbsp;</span><span style=\"box-sizing: border-box; line-height: 1.5; font-size: 10pt; color: #000000;\">조금 시간이 걸릴 수도 있으므로 클라이언트를 바꿔 가며 여러 차례 ping을 날려 본다.</span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; line-height: 1.5;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><br style=\"box-sizing: border-box;\" /></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box; font-weight: 700;\"><span style=\"box-sizing: border-box; font-size: 12pt;\">5. 인터넷 연결 설정</span></span></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><br style=\"box-sizing: border-box;\" /></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box; font-weight: 700;\"><span style=\"box-sizing: border-box; font-size: 11pt;\">5-1.&nbsp;</span><span style=\"box-sizing: border-box; font-size: 11pt;\">/etc/sysctl.conf</span></span><span style=\"box-sizing: border-box; font-size: 11pt;\">&nbsp;</span></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\">설정 파일에서 net.ipv4.ip_forward=1 라고 적힌 라인의 주석 해제(앞에 있는 # 제거)</span></p>\r\n<div class=\"txc-textbox\" style=\"box-sizing: border-box; color: #333333; font-family: &quot;KoPub Dotum&quot;; font-size: 14px; border: 1px solid rgb(193, 193, 193); padding: 10px; background-color: #eeeeee;\">\r\n   <p style=\"box-sizing: border-box; margin-bottom: 10px; text-align: justify;\"><span style=\"box-sizing: border-box; font-size: 13.3333px; line-height: 20px; color: #000000;\">net.ipv4.ip_forward=1</span></p>\r\n   </div>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #000000; font-size: 10pt;\"><span style=\"box-sizing: border-box;\">&nbsp;(AP로 쓰지 않는 일반 리눅스는 보안상 포워딩이 기본적으로 금지되어 있어서 직접 해제해야 한다</span><span style=\"box-sizing: border-box;\">.)</span></span></p>\r\n<p style=\"box-sizing: border-box; margin-bottom: 10px; font-family: &quot;KoPub Dotum&quot;; text-align: justify; color: #333333; font-size: 14px; background-color: #ffffff;\"><span style=\"box-sizing: border-box; color: #00','','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:11:56',0,'2019-04-26 15:11:56','210.101.103.92','','','','','','','','','','','',''),(324,-324,'',324,0,0,'','','html1','[Linux] 무선 인터넷 사용시, 때때로 라즈베리 파이의 네트워크가 해제되는 경우 해결법','<p style=\"margin-top: 1em; margin-bottom: 1em; padding: 0px; color: #676767; font-family: &quot;Nanum Gothic&quot;, PTSans, Arial, sans-serif; font-size: 14px; background-color: #ffffff;\">내 경우에는 라즈베리 파이에 USB 무선 랜카드를 연결해서 사용하고 있는 중인데, 전원만 연결해놓고 안쓰다가 갑자기 라즈베리 파이로 연결하려고 들면, 라즈베리 파이의 네트워크가 해제되어 접속할 수 없는 경우가 제법 있었다. 하지만 몇 번 시도하다 보면 접속이 복원되어서 다시 정상적인 접속이 가능했다. 그래서 평소에는 라즈베리 파이로 작업을 하기 전 몇초동안 계속 라즈베리 파이로 ping을 날려준 후, 정상적으로 ping 신호가 오는것을 확인한 후에 작업을&nbsp;하곤 했다.</p>\r\n<p style=\"margin-top: 1em; margin-bottom: 1em; padding: 0px; color: #676767; font-family: &quot;Nanum Gothic&quot;, PTSans, Arial, sans-serif; font-size: 14px; background-color: #ffffff;\">그러다가 이것도 왠지 짜증나서 어떻게 해결방법이 없을까 생각해보다가, 혹시 라즈베리 파이도 스마트폰의 와이파이 모듈처럼 절전 모드가 있어서, 일정 시간동안 사용하지 않으면 절전 모드가 되어 네트워크가 해제되는 것이 아닐까 의심했다. 그리고 예감은 옳았던 것 같다.</p>\r\n<p style=\"margin-top: 1em; margin-bottom: 1em; padding: 0px; color: #676767; font-family: &quot;Nanum Gothic&quot;, PTSans, Arial, sans-serif; font-size: 14px; background-color: #ffffff;\">이 문제는 이런저런 정황을 고려해 봤을때 리얼텍 8192 cu 칩셋을 사용하는 무선 랜카드의 모델에서 발생하는 것 같지만, 내가 사용하는 무선 랜카드는 리얼텍 8188을 사용하기 때문에 꼭 그런것만은 아닐수도 있겠다. 다만, 리얼텍 8192하고 8188이 기능상 서로 호환되기 때문일 수도 있다.</p>\r\n<p style=\"margin-top: 1em; margin-bottom: 1em; padding: 0px; color: #676767; font-family: &quot;Nanum Gothic&quot;, PTSans, Arial, sans-serif; font-size: 14px; background-color: #ffffff;\">서론이 길었는데, 이런 경우 라즈베리 파이의 터미널에서 다음 명령어를 쳐 보자.</p>\r\n<div id=\"crayon-5cc2a1452259f062213635\" class=\"crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate\" data-settings=\" minimize scroll-mouseover\" style=\"margin: 12px 0px; padding: 0px; box-sizing: border-box; text-size-adjust: none; width: 607.594px; font-family: Monaco, MonacoRegular, &quot;Courier New&quot;, monospace; color: #676767; 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; line-height: 15px !important;\">\r\n   <div class=\"crayon-toolbar\" data-settings=\" show\" style=\"margin: 0px; padding: 0px; border-top: 0px; border-right: 0px; border-left: 0px; border-image: initial; width: 605.594px; position: relative; overflow: hidden; z-index: 4; background: rgb(221, 221, 221) !important; border-bottom: 1px solid rgb(187, 187, 187) !important; height: 18px !important; line-height: 18px !important;\"><span class=\"crayon-title\" style=\"margin: 0px; padding: 0px 4px !important; font-family: inherit; float: left; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;\"></span>\r\n      <div class=\"crayon-tools\" style=\"margin: 0px; padding: 0px; font-family: inherit; background: 0px center; border: 0px; position: absolute; right: 0px; height: 18px !important; line-height: 18px !important; font-weight: inherit !important; float: right !important;\">\r\n         <div class=\"crayon-button crayon-nums-button crayon-pressed\" title=\"줄 번호 토글\" style=\"margin: 0px; padding: 0px; font-family: inherit; background: -24px 0px no-repeat rgb(188, 188, 188); border: 0px; height: inherit; line-height: 15px; display: inline; position: relative; width: 24px; color: #ffffff; font-size: inherit !important; font-weight: inherit !important; float: left !important;\">\r\n            <div class=\"crayon-button-icon\" style=\"margin: -8px 0px 0px; padding: 0px; font-family: inherit; background: url(&quot;../images/toolbar/buttons.png&quot;) -24px -32px; border: 0px; width: 24px; position: absolute; left: 0px; top: 9px; height: 16px !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">&nbsp;</div>\r\n            </div>\r\n         <div class=\"crayon-button crayon-plain-button\" title=\"일반 코드 토글\" style=\"margin: 0px; padding: 0px; font-family: inherit; background-image: initial; background-position: 0px center; background-size: initial; background-repeat: no-repeat; background-attachment: initial; background-origin: initial; background-clip: initial; border: 0px; height: inherit; line-height: 15px; display: inline; position: relative; width: 24px; font-size: inherit !important; font-weight: inherit !important; float: left !important;\">\r\n            <div class=\"crayon-button-icon\" style=\"margin: -8px 0px 0px; padding: 0px; font-family: inherit; background: url(&quot;../images/toolbar/buttons.png&quot;) 0px -48px; border: 0px; width: 24px; position: absolute; left: 0px; top: 9px; height: 16px !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">&nbsp;</div>\r\n            </div>\r\n         <div class=\"crayon-button crayon-wrap-button\" title=\"줄 바꿈 토글\" style=\"margin: 0px; padding: 0px; font-family: inherit; background-image: initial; background-position: 0px center; background-size: initial; background-repeat: no-repeat; background-attachment: initial; background-origin: initial; background-clip: initial; border: 0px; height: inherit; line-height: 15px; display: inline; position: relative; width: 24px; font-size: inherit !important; font-weight: inherit !important; float: left !important;\">\r\n            <div class=\"crayon-button-icon\" style=\"margin: -8px 0px 0px; padding: 0px; font-family: inherit; background: url(&quot;../images/toolbar/buttons.png&quot;) 0px -112px; border: 0px; width: 24px; position: absolute; left: 0px; top: 9px; height: 16px !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">&nbsp;</div>\r\n            </div>\r\n         <div class=\"crayon-button crayon-copy-button\" title=\"복사\" style=\"margin: 0px; padding: 0px; font-family: inherit; background-image: initial; background-position: 0px center; background-size: initial; background-repeat: no-repeat; background-attachment: initial; background-origin: initial; background-clip: initial; border: 0px; height: inherit; line-height: 15px; display: inline; position: relative; width: 24px; font-size: inherit !important; font-weight: inherit !important; float: left !important;\">\r\n            <div class=\"crayon-button-icon\" style=\"margin: -8px 0px 0px; padding: 0px; font-family: inherit; background: url(&quot;../images/toolbar/buttons.png&quot;) 0px -16px; border: 0px; width: 24px; position: absolute; left: 0px; top: 9px; height: 16px !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">&nbsp;</div>\r\n            </div>\r\n         <div class=\"crayon-button crayon-popup-button\" title=\"새 창에서 보기\" style=\"margin: 0px; padding: 0px; font-family: inherit; background-image: initial; background-position: 0px center; background-size: initial; background-repeat: no-repeat; background-attachment: initial; background-origin: initial; background-clip: initial; border: 0px; height: inherit; line-height: 15px; display: inline; position: relative; width: 24px; font-size: inherit !important; font-weight: inherit !important; float: left !important;\">\r\n            <div class=\"crayon-button-icon\" style=\"margin: -8px 0px 0px; padding: 0px; font-family: inherit; background: url(&quot;../images/toolbar/buttons.png&quot;) 0px 0px; border: 0px; width: 24px; position: absolute; left: 0px; top: 9px; height: 16px !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">&nbsp;</div>\r\n            </div>\r\n         </div>\r\n      </div>\r\n   <div class=\"crayon-plain-wrap\" style=\"background: 0px center; border: 0px; margin: 0px !important; padding: 0px !important; height: auto !important;\"><textarea wrap=\"soft\" class=\"crayon-plain print-no\" data-settings=\"dblclick\" readonly=\"\" style=\"margin: 0px; padding-top: 0px; padding-right: 5px; padding-left: 5px; vertical-align: middle; outline: none; width: 575.313px; border-width: 0px; border-style: initial; border-color: initial; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; box-shadow: none; min-width: 95%; max-width: 95%; height: 34px; overflow: hidden; position: absolute; opacity: 0; border-radius: 0px; white-space: pre; overflow-wrap: normal; resize: none; color: #000000; tab-size: 4; z-index: 0; font-size: 12px !important; font-family: Monaco, MonacoRegular, &quot;Courier New&quot;, monospace !important; line-height: 15px !important;\"></textarea></div>\r\n   <div class=\"crayon-main\" style=\"margin: 0px; padding: 0px; background: 0px center; border: 0px; width: 605.594px; overflow: hidden; position: relative; z-index: 1;\">\r\n      <table class=\"crayon-table\" style=\"margin-left: 0px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; padding: 0px !important; border-width: initial !important; border-style: none !important; border-color: initial !important; background: none !important; width: auto !important; border-spacing: 0px !important; table-layout: auto !important;\">\r\n         <tbody style=\"margin: 0px; padding: 0px;\">\r\n            <tr class=\"crayon-row\" style=\"background: 0px center; margin: 0px !important; padding: 0px !important; border: none !important; vertical-align: top !important;\">\r\n               <td class=\"crayon-nums \" data-settings=\"show\" style=\"border-width: 0px; border-style: initial; border-color: initial; margin: 0px !important; padding: 0px !important; vertical-align: top !important; background: rgb(223, 239, 255) !important; color: #5499de !important;\">\r\n                  <div class=\"crayon-nums-content\" style=\"margin: 0px; padding: 0px; background: 0px center; border: 0px; white-space: nowrap; line-height: 15px !important;\">\r\n                     <div class=\"crayon-num\" data-line=\"crayon-5cc2a1452259f062213635-1\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; background: 0px center; border: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">1</div>\r\n                     </div>\r\n                  </td>\r\n               <td class=\"crayon-code\" style=\"border-width: 0px; border-style: initial; border-color: initial; background: 0px center; width: 587px; margin: 0px !important; padding: 0px !important; vertical-align: top !important;\">\r\n                  <div class=\"crayon-pre\" style=\"margin: 0px; padding: 0px; white-space: pre; overflow: visible; tab-size: 4; background: none !important; border: none !important; line-height: 15px !important;\">\r\n                     <div class=\"crayon-line\" id=\"crayon-5cc2a1452259f062213635-1\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; background: 0px center; border: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">cat /sys/module/8192cu/parameters/rtw_power_mgnt</div>\r\n                     </div>\r\n                  </td>\r\n               </tr>\r\n            </tbody>\r\n         </table>\r\n      </div>\r\n   </div>\r\n<p style=\"margin-top: 1em; margin-bottom: 1em; padding: 0px; color: #676767; font-family: &quot;Nanum Gothic&quot;, PTSans, Arial, sans-serif; font-size: 14px; background-color: #ffffff;\">위 명령어를 쳤을때 0이 나오면 절전 모드가&nbsp;해제되어 있는 것이고, 1이나 2가 나올 경우에는 절전 모드를 사용 중이다.</p>\r\n<p style=\"margin-top: 1em; margin-bottom: 1em; padding: 0px; color: #676767; font-family: &quot;Nanum Gothic&quot;, PTSans, Arial, sans-serif; font-size: 14px; background-color: #ffffff;\">절전 모드를 해제하기 위해서는 vi나 nano 등의 편집기로&nbsp;/etc/modprobe.d/8192cu.conf 파일을 새로 작성해서 설정하면 된다. 참고로 이 파일을 작성하거나 편집하려면 관리자의 권한이 있어야 한다. 내 경우에는 역시 nano보다는 vi가 더 손에 맞는거 같다.</p>\r\n<div id=\"crayon-5cc2a145225b3562419383\" class=\"crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate\" data-settings=\" minimize scroll-mouseover\" style=\"margin: 12px 0px; padding: 0px; box-sizing: border-box; text-size-adjust: none; width: 607.594px; font-family: Monaco, MonacoRegular, &quot;Courier New&quot;, monospace; color: #676767; 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; line-height: 15px !important;\">\r\n   <div class=\"crayon-toolbar\" data-settings=\" show\" style=\"margin: 0px; padding: 0px; border-top: 0px; border-right: 0px; border-left: 0px; border-image: initial; width: 605.594px; position: relative; overflow: hidden; z-index: 4; background: rgb(221, 221, 221) !important; border-bottom: 1px solid rgb(187, 187, 187) !important; height: 18px !important; line-height: 18px !important;\"><span class=\"crayon-title\" style=\"margin: 0px; padding: 0px 4px !important; font-family: inherit; float: left; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;\"></span>\r\n      <div class=\"crayon-tools\" style=\"margin: 0px; padding: 0px; font-family: inherit; background: 0px center; border: 0px; position: absolute; right: 0px; height: 18px !important; line-height: 18px !important; font-weight: inherit !important; float: right !important;\">\r\n         <div class=\"crayon-button crayon-nums-button crayon-pressed\" title=\"줄 번호 토글\" style=\"margin: 0px; padding: 0px; font-family: inherit; background: -24px 0px no-repeat rgb(188, 188, 188); border: 0px; height: inherit; line-height: 15px; display: inline; position: relative; width: 24px; color: #ffffff; font-size: inherit !important; font-weight: inherit !important; float: left !important;\">\r\n            <div class=\"crayon-button-icon\" style=\"margin: -8px 0px 0px; padding: 0px; font-family: inherit; background: url(&quot;../images/toolbar/buttons.png&quot;) -24px -32px; border: 0px; width: 24px; position: absolute; left: 0px; top: 9px; height: 16px !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">&nbsp;</div>\r\n            </div>\r\n         <div class=\"crayon-button crayon-plain-button\" title=\"일반 코드 토글\" style=\"margin: 0px; padding: 0px; font-family: inherit; background-image: initial; background-position: 0px center; background-size: initial; background-repeat: no-repeat; background-attachment: initial; background-origin: initial; background-clip: initial; border: 0px; height: inherit; line-height: 15px; display: inline; position: relative; width: 24px; font-size: inherit !important; font-weight: inherit !important; float: left !important;\">\r\n            <div class=\"crayon-button-icon\" style=\"margin: -8px 0px 0px; padding: 0px; font-family: inherit; background: url(&quot;../images/toolbar/buttons.png&quot;) 0px -48px; border: 0px; width: 24px; position: absolute; left: 0px; top: 9px; height: 16px !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">&nbsp;</div>\r\n            </div>\r\n         <div class=\"crayon-button crayon-wrap-button\" title=\"줄 바꿈 토글\" style=\"margin: 0px; padding: 0px; font-family: inherit; background-image: initial; background-position: 0px center; background-size: initial; background-repeat: no-repeat; background-attachment: initial; background-origin: initial; background-clip: initial; border: 0px; height: inherit; line-height: 15px; display: inline; position: relative; width: 24px; font-size: inherit !important; font-weight: inherit !important; float: left !important;\">\r\n            <div class=\"crayon-button-icon\" style=\"margin: -8px 0px 0px; padding: 0px; font-family: inherit; background: url(&quot;../images/toolbar/buttons.png&quot;) 0px -112px; border: 0px; width: 24px; position: absolute; left: 0px; top: 9px; height: 16px !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">&nbsp;</div>\r\n            </div>\r\n         <div class=\"crayon-button crayon-copy-button\" title=\"복사\" style=\"margin: 0px; padding: 0px; font-family: inherit; background-image: initial; background-position: 0px center; background-size: initial; background-repeat: no-repeat; background-attachment: initial; background-origin: initial; background-clip: initial; border: 0px; height: inherit; line-height: 15px; display: inline; position: relative; width: 24px; font-size: inherit !important; font-weight: inherit !important; float: left !important;\">\r\n            <div class=\"crayon-button-icon\" style=\"margin: -8px 0px 0px; padding: 0px; font-family: inherit; background: url(&quot;../images/toolbar/buttons.png&quot;) 0px -16px; border: 0px; width: 24px; position: absolute; left: 0px; top: 9px; height: 16px !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">&nbsp;</div>\r\n            </div>\r\n         <div class=\"crayon-button crayon-popup-button\" title=\"새 창에서 보기\" style=\"margin: 0px; padding: 0px; font-family: inherit; background-image: initial; background-position: 0px center; background-size: initial; background-repeat: no-repeat; background-attachment: initial; background-origin: initial; background-clip: initial; border: 0px; height: inherit; line-height: 15px; display: inline; position: relative; width: 24px; font-size: inherit !important; font-weight: inherit !important; float: left !important;\">\r\n            <div class=\"crayon-button-icon\" style=\"margin: -8px 0px 0px; padding: 0px; font-family: inherit; background: url(&quot;../images/toolbar/buttons.png&quot;) 0px 0px; border: 0px; width: 24px; position: absolute; left: 0px; top: 9px; height: 16px !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">&nbsp;</div>\r\n            </div>\r\n         </div>\r\n      </div>\r\n   <div class=\"crayon-plain-wrap\" style=\"background: 0px center; border: 0px; margin: 0px !important; padding: 0px !important; height: auto !important;\"><textarea wrap=\"soft\" class=\"crayon-plain print-no\" data-settings=\"dblclick\" readonly=\"\" style=\"margin: 0px; padding-top: 0px; padding-right: 5px; padding-left: 5px; vertical-align: middle; outline: none; width: 575.313px; border-width: 0px; border-style: initial; border-color: initial; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; box-shadow: none; min-width: 95%; max-width: 95%; height: 34px; overflow: hidden; position: absolute; opacity: 0; border-radius: 0px; white-space: pre; overflow-wrap: normal; resize: none; color: #000000; tab-size: 4; z-index: 0; font-size: 12px !important; font-family: Monaco, MonacoRegular, &quot;Courier New&quot;, monospace !important; line-height: 15px !important;\"></textarea></div>\r\n   <div class=\"crayon-main\" style=\"margin: 0px; padding: 0px; background: 0px center; border: 0px; width: 605.594px; overflow: hidden; position: relative; z-index: 1;\">\r\n      <table class=\"crayon-table\" style=\"margin-left: 0px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; padding: 0px !important; border-width: initial !important; border-style: none !important; border-color: initial !important; background: none !important; width: auto !important; border-spacing: 0px !important; table-layout: auto !important;\">\r\n         <tbody style=\"margin: 0px; padding: 0px;\">\r\n            <tr class=\"crayon-row\" style=\"background: 0px center; margin: 0px !important; padding: 0px !important; border: none !important; vertical-align: top !important;\">\r\n               <td class=\"crayon-nums \" data-settings=\"show\" style=\"border-width: 0px; border-style: initial; border-color: initial; margin: 0px !important; padding: 0px !important; vertical-align: top !important; background: rgb(223, 239, 255) !important; color: #5499de !important;\">\r\n                  <div class=\"crayon-nums-content\" style=\"margin: 0px; padding: 0px; background: 0px center; border: 0px; white-space: nowrap; line-height: 15px !important;\">\r\n                     <div class=\"crayon-num\" data-line=\"crayon-5cc2a145225b3562419383-1\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; background: 0px center; border: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">1</div>\r\n                     </div>\r\n                  </td>\r\n               <td class=\"crayon-code\" style=\"border-width: 0px; border-style: initial; border-color: initial; background: 0px center; width: 587px; margin: 0px !important; padding: 0px !important; vertical-align: top !important;\">\r\n                  <div class=\"crayon-pre\" style=\"margin: 0px; padding: 0px; white-space: pre; overflow: visible; tab-size: 4; background: none !important; border: none !important; line-height: 15px !important;\">\r\n                     <div class=\"crayon-line\" id=\"crayon-5cc2a145225b3562419383-1\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; background: 0px center; border: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">sudo vi /etc/modprobe.d/8192cu.conf</div>\r\n                     </div>\r\n                  </td>\r\n               </tr>\r\n            </tbody>\r\n         </table>\r\n      </div>\r\n   </div>\r\n<p style=\"margin-top: 1em; margin-bottom: 1em; padding: 0px; color: #676767; font-family: &quot;Nanum Gothic&quot;, PTSans, Arial, sans-serif; font-size: 14px; background-color: #ffffff;\">편집기 화면이 뜨면 아래와 같이 작성하자.</p>\r\n<div id=\"crayon-5cc2a145225bf103382935\" class=\"crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate\" data-settings=\" minimize scroll-mouseover\" style=\"margin: 12px 0px; padding: 0px; box-sizing: border-box; text-size-adjust: none; width: 607.594px; font-family: Monaco, MonacoRegular, &quot;Courier New&quot;, monospace; color: #676767; 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; line-height: 15px !important;\">\r\n   <div class=\"crayon-toolbar\" data-settings=\" show\" style=\"margin: 0px; padding: 0px; border-top: 0px; border-right: 0px; border-left: 0px; border-image: initial; width: 605.594px; position: relative; overflow: hidden; z-index: 4; background: rgb(221, 221, 221) !important; border-bottom: 1px solid rgb(187, 187, 187) !important; height: 18px !important; line-height: 18px !important;\"><span class=\"crayon-title\" style=\"margin: 0px; padding: 0px 4px !important; font-family: inherit; float: left; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #333333 !important;\">/etc/modprobe.d/8192cu.conf</span>\r\n      <div class=\"crayon-tools\" style=\"margin: 0px; padding: 0px; font-family: inherit; background: 0px center; border: 0px; position: absolute; right: 0px; height: 18px !important; line-height: 18px !important; font-weight: inherit !important; float: right !important;\">\r\n         <div class=\"crayon-button crayon-nums-button crayon-pressed\" title=\"줄 번호 토글\" style=\"margin: 0px; padding: 0px; font-family: inherit; background: -24px 0px no-repeat rgb(188, 188, 188); border: 0px; height: inherit; line-height: 15px; display: inline; position: relative; width: 24px; color: #ffffff; font-size: inherit !important; font-weight: inherit !important; float: left !important;\">\r\n            <div class=\"crayon-button-icon\" style=\"margin: -8px 0px 0px; padding: 0px; font-family: inherit; background: url(&quot;../images/toolbar/buttons.png&quot;) -24px -32px; border: 0px; width: 24px; position: absolute; left: 0px; top: 9px; height: 16px !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">&nbsp;</div>\r\n            </div>\r\n         <div class=\"crayon-button crayon-plain-button\" title=\"일반 코드 토글\" style=\"margin: 0px; padding: 0px; font-family: inherit; background-image: initial; background-position: 0px center; background-size: initial; background-repeat: no-repeat; background-attachment: initial; background-origin: initial; background-clip: initial; border: 0px; height: inherit; line-height: 15px; display: inline; position: relative; width: 24px; font-size: inherit !important; font-weight: inherit !important; float: left !important;\">\r\n            <div class=\"crayon-button-icon\" style=\"margin: -8px 0px 0px; padding: 0px; font-family: inherit; background: url(&quot;../images/toolbar/buttons.png&quot;) 0px -48px; border: 0px; width: 24px; position: absolute; left: 0px; top: 9px; height: 16px !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">&nbsp;</div>\r\n            </div>\r\n         <div class=\"crayon-button crayon-wrap-button\" title=\"줄 바꿈 토글\" style=\"margin: 0px; padding: 0px; font-family: inherit; background-image: initial; background-position: 0px center; background-size: initial; background-repeat: no-repeat; background-attachment: initial; background-origin: initial; background-clip: initial; border: 0px; height: inherit; line-height: 15px; display: inline; position: relative; width: 24px; font-size: inherit !important; font-weight: inherit !important; float: left !important;\">\r\n            <div class=\"crayon-button-icon\" style=\"margin: -8px 0px 0px; padding: 0px; font-family: inherit; background: url(&quot;../images/toolbar/buttons.png&quot;) 0px -112px; border: 0px; width: 24px; position: absolute; left: 0px; top: 9px; height: 16px !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">&nbsp;</div>\r\n            </div>\r\n         <div class=\"crayon-button crayon-copy-button\" title=\"복사\" style=\"margin: 0px; padding: 0px; font-family: inherit; background-image: initial; background-position: 0px center; background-size: initial; background-repeat: no-repeat; background-attachment: initial; background-origin: initial; background-clip: initial; border: 0px; height: inherit; line-height: 15px; display: inline; position: relative; width: 24px; font-size: inherit !important; font-weight: inherit !important; float: left !important;\">\r\n            <div class=\"crayon-button-icon\" style=\"margin: -8px 0px 0px; padding: 0px; font-family: inherit; background: url(&quot;../images/toolbar/buttons.png&quot;) 0px -16px; border: 0px; width: 24px; position: absolute; left: 0px; top: 9px; height: 16px !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">&nbsp;</div>\r\n            </div>\r\n         <div class=\"crayon-button crayon-popup-button\" title=\"새 창에서 보기\" style=\"margin: 0px; padding: 0px; font-family: inherit; background-image: initial; background-position: 0px center; background-size: initial; background-repeat: no-repeat; background-attachment: initial; background-origin: initial; background-clip: initial; border: 0px; height: inherit; line-height: 15px; display: inline; position: relative; width: 24px; font-size: inherit !important; font-weight: inherit !important; float: left !important;\">\r\n            <div class=\"crayon-button-icon\" style=\"margin: -8px 0px 0px; padding: 0px; font-family: inherit; background: url(&quot;../images/toolbar/buttons.png&quot;) 0px 0px; border: 0px; width: 24px; position: absolute; left: 0px; top: 9px; height: 16px !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">&nbsp;</div>\r\n            </div>\r\n         </div>\r\n      </div>\r\n   <div class=\"crayon-plain-wrap\" style=\"background: 0px center; border: 0px; margin: 0px !important; padding: 0px !important; height: auto !important;\"><textarea wrap=\"soft\" class=\"crayon-plain print-no\" data-settings=\"dblclick\" readonly=\"\" style=\"margin: 0px; padding-top: 0px; padding-right: 5px; padding-left: 5px; vertical-align: middle; outline: none; width: 575.313px; border-width: 0px; border-style: initial; border-color: initial; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; box-shadow: none; min-width: 95%; max-width: 95%; height: 139px; overflow: hidden; position: absolute; opacity: 0; border-radius: 0px; white-space: pre; overflow-wrap: normal; resize: none; color: #000000; tab-size: 4; z-index: 0; font-size: 12px !important; font-family: Monaco, MonacoRegular, &quot;Courier New&quot;, monospace !important; line-height: 15px !important;\"></textarea></div>\r\n   <div class=\"crayon-main\" style=\"margin: 0px; padding: 0px; background: 0px center; border: 0px; width: 605.594px; overflow: hidden; position: relative; z-index: 1;\">\r\n      <table class=\"crayon-table\" style=\"margin-left: 0px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; padding: 0px !important; border-width: initial !important; border-style: none !important; border-color: initial !important; background: none !important; width: auto !important; border-spacing: 0px !important; table-layout: auto !important;\">\r\n         <tbody style=\"margin: 0px; padding: 0px;\">\r\n            <tr class=\"crayon-row\" style=\"background: 0px center; margin: 0px !important; padding: 0px !important; border: none !important; vertical-align: top !important;\">\r\n               <td class=\"crayon-nums \" data-settings=\"show\" style=\"border-width: 0px; border-style: initial; border-color: initial; margin: 0px !important; padding: 0px !important; vertical-align: top !important; background: rgb(223, 239, 255) !important; color: #5499de !important;\">\r\n                  <div class=\"crayon-nums-content\" style=\"margin: 0px; padding: 0px; background: 0px center; border: 0px; white-space: nowrap; line-height: 15px !important;\">\r\n                     <div class=\"crayon-num\" data-line=\"crayon-5cc2a145225bf103382935-1\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; background: 0px center; border: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">1</div>\r\n                     <div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5cc2a145225bf103382935-2\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;\">2</div>\r\n                     <div class=\"crayon-num\" data-line=\"crayon-5cc2a145225bf103382935-3\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; background: 0px center; border: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">3</div>\r\n                     <div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5cc2a145225bf103382935-4\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;\">4</div>\r\n                     <div class=\"crayon-num\" data-line=\"crayon-5cc2a145225bf103382935-5\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; background: 0px center; border: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">5</div>\r\n                     <div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5cc2a145225bf103382935-6\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;\">6</div>\r\n                     <div class=\"crayon-num\" data-line=\"crayon-5cc2a145225bf103382935-7\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; background: 0px center; border: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">7</div>\r\n                     <div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5cc2a145225bf103382935-8\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; text-align: center; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: #317cc5 !important;\">8</div>\r\n                     </div>\r\n                  </td>\r\n               <td class=\"crayon-code\" style=\"border-width: 0px; border-style: initial; border-color: initial; background: 0px center; width: 587px; margin: 0px !important; padding: 0px !important; vertical-align: top !important;\">\r\n                  <div class=\"crayon-pre\" style=\"margin: 0px; padding: 0px; white-space: pre; overflow: visible; tab-size: 4; background: none !important; border: none !important; line-height: 15px !important;\">\r\n                     <div class=\"crayon-line\" id=\"crayon-5cc2a145225bf103382935-1\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; background: 0px center; border: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\"># rtw_power_mgnt={0|1|2}</div>\r\n                     <div class=\"crayon-line crayon-striped-line\" id=\"crayon-5cc2a145225bf103382935-2\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; border: 0px; height: inherit; background: rgb(247, 247, 247) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">#&nbsp;&nbsp;&nbsp;&nbsp;0 = disable Power Save Mode</div>\r\n                     <div class=\"crayon-line\" id=\"crayon-5cc2a145225bf103382935-3\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; background: 0px center; border: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">#&nbsp;&nbsp;&nbsp;&nbsp;1 = enable Power Save, MIN_PS Mode</div>\r\n                     <div class=\"crayon-line crayon-striped-line\" id=\"crayon-5cc2a145225bf103382935-4\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; border: 0px; height: inherit; background: rgb(247, 247, 247) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">#&nbsp;&nbsp;&nbsp;&nbsp;2 = enable Power Save, MAX_PS Mode</div>\r\n                     <div class=\"crayon-line\" id=\"crayon-5cc2a145225bf103382935-5\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; background: 0px center; border: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\"># rtw_enusbss={0|1}</div>\r\n                     <div class=\"crayon-line crayon-striped-line\" id=\"crayon-5cc2a145225bf103382935-6\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; border: 0px; height: inherit; background: rgb(247, 247, 247) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">#&nbsp;&nbsp;&nbsp;&nbsp;0 = disable auto suspend</div>\r\n                     <div class=\"crayon-line\" id=\"crayon-5cc2a145225bf103382935-7\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; background: 0px center; border: 0px; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">#&nbsp;&nbsp;&nbsp;&nbsp;1 = enable auto suspend</div>\r\n                     <div class=\"crayon-line crayon-striped-line\" id=\"crayon-5cc2a145225bf103382935-8\" style=\"margin: 0px; padding: 0px 5px; font-family: inherit; border: 0px; height: inherit; background: rgb(247, 247, 247) !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;\">options 8192cu rtw_power_mgnt=0 rtw_enusbss=0</div>\r\n                     </div>\r\n                  </td>\r\n               </tr>\r\n            </tbody>\r\n         </table>\r\n      </div>\r\n   </div>\r\n<p style=\"margin-top: 1em; margin-bottom: 1em; padding: 0px; color: #676767; font-family: &quot;Nanum Gothic&quot;, PTSans, Arial, sans-serif; font-size: 14px; background-color: #ffffff;\">주석에도 작성해 뒀지만, rtw_power_mgnt는 절전 모드의 설정으로, 0은 절전모드 해제, 1은 최소 절전 모드, 2는 최대 절전 모드로 설정한다.</p>\r\n<p style=\"margin-top: 1em; margin-bottom: 1em; padding: 0px; color: #676767; font-family: &quot;Nanum Gothic&quot;, PTSans, Arial, sans-serif; font-size: 14px; background-color: #ffffff;\">rtw_enusbss의 경우, 나는 이 옵션 없이도 문제가 해결되었지만 내용상 설정해두는 것이 좋지 않을까 싶어서 설정했다. 무선 인터넷의 자동 중단 모드의 설정으로 생각되며, 0은 자동 중단 모드 해제, 1은 자동 중단 모드로 설정한다.</p>\r\n<p style=\"margin-top: 1em; margin-bottom: 1em; padding: 0px; color: #676767; font-family: &quot;Nanum Gothic&quot;, PTSans, Arial, sans-serif; font-size: 14px; background-color: #ffffff;\">참고로 각 설정 항목들의 현재 설정 상태는, /sys/module/8192cu/parameters/{설정항목명}을 cat 명령으로 확인함으로써 조회할 수 있다.</p>\r\n<p style=\"margin-top: 1em; margin-bottom: 1em; padding: 0px; color: #676767; font-family: &quot;Nanum Gothic&quot;, PTSans, Arial, sans-serif; font-size: 14px; background-color: #ffffff;\">여하튼 설정한 이후 라즈베리 파이를 재시작하면, 이후부터는 별다른 문제가 없을 경우 라즈베리 파이의 네트워크가 해제되지 않는다.</p>\r\n<p style=\"margin-top: 1em; margin-bottom: 1em; padding: 0px; color: #676767; font-family: &quot;Nanum Gothic&quot;, PTSans, Arial, sans-serif; font-size: 14px; background-color: #ffffff;\">참고로, 8192cu.conf 파일에 설정할 수 있는 설정 내용은 다음과 같다. /sys/module/8192cu/parameters/ 디렉토리를 살펴본 바로는 이보다도 설정 항목의 가짓수가 훨씬 많을 것 같지만, 전부를 찾아내지는 못했다.</p>\r\n<ul style=\"margin: 0px; padding: 0px; list-style-image: url(&quot;images/bullet.png&quot;); color: #676767; font-family: &quot;Nanum Gothic&quot;, PTSans, Arial, sans-serif; font-size: 14px; background-color: #ffffff;\">\r\n   <li style=\"margin: 5px 20px; padding: 0px;\">rtw_power_mgnt={0|1|2}\r\n      <ul style=\"margin: 0px; padding: 0px; list-style-image: url(&quot;images/bullet.png&quot;);\">\r\n         <li style=\"margin: 5px 20px; padding: 0px;\">0 == disable power saving</li>\r\n         <li style=\"margin: 5px 20px; padding: 0px;\">1 ==&nbsp;enable power saving, MIN_PS</li>\r\n         <li style=\"margin: 5px 20px; padding: 0px;\">2 == enable power saving, MAX_PS</li>\r\n         </ul>\r\n      </li>\r\n   <li style=\"margin: 5px 20px; padding: 0px;\">rtw_enusbss={0|1}\r\n      <ul style=\"margin: 0px; padding: 0px; list-style-image: url(&quot;images/bullet.png&quot;);\">\r\n         <li style=\"margin: 5px 20px; padding: 0px;\">0 == disable auto suspend</li>\r\n         <li style=\"margin: 5px 20px; padding: 0px;\">1 == enable auto suspend</li>\r\n         </ul>\r\n      </li>\r\n   <li style=\"margin: 5px 20px; padding: 0px;\">rtw_hwpwrp_detect={0|1}\r\n      <ul style=\"margin: 0px; padding: 0px; list-style-image: url(&quot;images/bullet.png&quot;);\">\r\n         <li style=\"margin: 5px 20px; padding: 0px;\">0 == disable H/W power pin detection</li>\r\n         <li style=\"margin: 5px 20px; padding: 0px;\">1 == enable H/W power pin detection</li>\r\n         </ul>\r\n      </li>\r\n   <li style=\"margin: 5px 20px; padding: 0px;\">rtw_ips_mode={0|1}\r\n      <ul style=\"margin: 0px; padding: 0px; list-style-image: url(&quot;images/bullet.png&quot;);\">\r\n         <li style=\"margin: 5px 20px; padding: 0px;\">0 == low power, IPS_NORMAL</li>\r\n         <li style=\"margin: 5px 20px; padding: 0px;\">1 == higher power, IPS_LEVEL2</li>\r\n         </ul>\r\n      </li>\r\n   </ul>\r\n<p style=\"margin-top: 1em; margin-bottom: 1em; padding: 0px; color: #676767; font-family: &quot;Nanum Gothic&quot;, PTSans, Arial, sans-serif; font-size: 14px; background-color: #ffffff;\">이 문서를 작성하는데에는 아래 웹사이트를 참고했다.</p>\r\n<ul style=\"margin: 0px; padding: 0px; list-style-image: url(&quot;images/bullet.png&quot;); color: #676767; font-family: &quot;Nanum Gothic&quot;, PTSans, Arial, sans-serif; font-size: 14px; background-color: #ffffff;\">\r\n   <li style=\"margin: 5px 20px; padding: 0px;\"><a href=\"http://raspberrypi.stackexchange.com/questions/1384\" style=\"margin: 0px; padding: 0px; color: #de5f44; transition: color 0.5s ease 0s; text-decoration-line: none;\" target=\"_blank\">linux – How do I disable suspend mode? – Raspberry Pi Stack Exchange</a>\r\n      <ul style=\"margin: 0px; padding: 0px; list-style-image: url(&quot;images/bullet.png&quot;);\">\r\n         <li style=\"margin: 5px 20px; padding: 0px;\">처음으로 이 문제에 대한 해결책을 발견한 사이트</li>\r\n         </ul>\r\n      </li>\r\n   <li style=\"margin: 5px 20px; padding: 0px;\"><a href=\"https://tasksofohm.wordpress.com/2012/09/22/power-management-on-the-raspberry-wlan-adapter/\" style=\"margin: 0px; padding: 0px; color: #de5f44; transition: color 0.5s ease 0s; text-decoration-line: none;\" target=\"_blank\">Power management on the Raspberry WLAN adapter | TasksOfOhm</a>\r\n      <ul style=\"margin: 0px; padding: 0px; list-style-image: url(&quot;images/bullet.png&quot;);\">\r\n         <li style=\"margin: 5px 20px; padding: 0px;\">해결방법 뿐만 아니라, rtw_power_mgnt 옵션의 값을 참고할 수 있었다</li>\r\n         </ul>\r\n      </li>\r\n   <li style=\"margin: 5px 20px; padding: 0px;\"><a href=\"https://www.raspberrypi.org/forums/viewtopic.php?t=61665\" style=\"margin: 0px; padding: 0px; color: #de5f44; transition: color 0.5s ease 0s; text-decoration-line: none;\" target=\"_blank\">Raspberry Pi • View topic – Edimax Wifi adapter seems to go to sleep if not used (solved</a>\r\n      <ul style=\"margin: 0px; padding: 0px; list-style-image: url(&quot;images/bullet.png&quot;);\">\r\n         <li style=\"margin: 5px 20px; padding: 0px;\">rtw_power_mgnt 뿐만 아니라 그 외 몇가지 설정 값을 참고했다. 바로 나타나지는 않고, 좀 아래쪽에 관련 내용이 있다.</li>\r\n         </ul>\r\n      </li>\r\n   </ul>','','',0,0,1,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:12:25',0,'2019-04-26 15:12:25','210.101.103.92','','','','','','','','','','','',''),(325,-325,'',325,0,0,'','','html1','[Linux] vimrc 설정 예제','<p><span style=\"color: #404040; font-family: 굴림;\">set hlsearch \" 검색어 하이라이팅&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set nu \" 줄번호&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set autoindent \" 자동 들여쓰기&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set scrolloff=2&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set wildmode=longest,list&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set ts=4 \"tag select&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set sts=4 \"st select&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set sw=1 \" 스크롤바 너비&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set autowrite \" 다른 파일로 넘어갈 때 자동 저장&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set autoread \" 작업 중인 파일 외부에서 변경됬을 경우 자동으로 불러옴&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set cindent \" C언어 자동 들여쓰기&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set bs=eol,start,indent&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set history=256&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set laststatus=2 \" 상태바 표시 항상&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">\"set paste \" 붙여넣기 계단현상 없애기&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set shiftwidth=4 \" 자동 들여쓰기 너비 설정&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set showmatch \" 일치하는 괄호 하이라이팅&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set smartcase \" 검색시 대소문자 구별&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set smarttab&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set smartindent&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set softtabstop=4&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set tabstop=4&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set ruler \" 현재 커서 위치 표시&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set incsearch&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set statusline=\\ %&lt;%l:%v\\ [%P]%=%a\\ %h%m%r\\ %F\\&nbsp;</span><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: 굴림;\">au BufReadPost *&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">\\ if line(\"\'\\\"\") &gt; 0 &amp;&amp; line(\"\'\\\"\") &lt;= line(\"$\") |&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">\\ exe \"norm g`\\\"\" |&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">\\ endif&nbsp;</span><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: 굴림;\">if $LANG[0]==\'k\' &amp;&amp; $LANG[1]==\'o\'&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">set fileencoding=korea&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">endif&nbsp;</span><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: 굴림;\">if has(\"syntax\")&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">&nbsp;syntax on&nbsp;</span><br style=\"color: #404040; font-family: 굴림;\" /><span style=\"color: #404040; font-family: 굴림;\">endif</span></p>','','',0,0,18,0,0,'admin','*B9FF5DF52BD3C5F13EA3D506E09A21D17ECF6557','최고관리자','bk94005@naver.com','','2019-04-26 15:12:43',0,'2019-04-26 15:12:43','210.101.103.92','','','','','','','','','','','',''),