<p style="font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; background-color: #d4dad8; line-height: 1.8;"><span style="font-size: 11pt;">ESP32는&nbsp;</span><span style="font-size: 11pt;">와이파이를 통해서 인터넷에 연결이 가능하므로 와이파이 연결이 된다면 NTP(Network Time Protocol) 서버를 통해 매우 정확한 현재 시간을 구할 수 있다.&nbsp;나중에 시간이 된다면 ESP32와 온습도 센서, LCD 등을 가지고 벽걸이 시계를 하나 만들어 볼까? 생각 중인데... 정확한 시간은 물론 정보제공 서버와의 통신을 통해서 날씨, 뉴스 등의 정보도 표시해 주고 센서를 통해서는 현재 기온 및 습도 등을 표시해 주는 유용한 장치를 만들 수 있을 것이다.</span></p>
<p style="font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; background-color: #d4dad8; line-height: 1.8;"><span style="font-size: 11pt;"><br /></span></p>
<p style="font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; background-color: #d4dad8; line-height: 1.8;"><span style="font-size: 11pt;"><br /></span></p>
<p style="font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; background-color: #d4dad8; line-height: 1.8;"><span style="font-size: 11pt;"><br /></span></p>
<p style="font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; background-color: #d4dad8; line-height: 1.8;"><span style="font-size: 14.6667px;">ESP32에 대한 일반적인 사항과 아두이노 개발환경을 설치하는 방법은 아래의 과거 포스팅을 참고한다.</span></p>
<div class="txc-textbox" style="margin: 0px; padding: 10px; border: 1px dashed rgb(159, 211, 49); line-height: 1.3; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; background-color: #e7fdb5;">
   <p style="line-height: 1.8;">&nbsp;</p>
   <p style="line-height: 1.8;"><a href="http://deneb21.tistory.com/534" target="_blank" style="text-decoration-line: none;"><span style="font-size: 11pt;">[사물인터넷(IoT)] - [ESP32] ESPRESSIF ESP32 오버뷰 (ESP32 Overview)</span></a></p>
   <p style="line-height: 1.8;"><span style="font-size: 11pt;"><a href="http://deneb21.tistory.com/590" target="_blank" style="text-decoration-line: none;">[사물인터넷(IoT)] - [ESP32] 아두이노 IDE 에서 개발환경 만들기</a></span></p>
   </div>
<p style="font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; background-color: #d4dad8; line-height: 1.8;"><span style="font-size: 11pt;"><br /></span></p>
<div class="txc-textbox" style="margin: 0px; padding: 10px; border: 1px dashed rgb(159, 211, 49); line-height: 1.3; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; background-color: #e7fdb5;">
   <p style="line-height: 1.8;"><span style="font-size: 11pt;"><b>■ 스케치</b><br /></span></p>
   <p style="line-height: 1.8;"><span style="font-size: 11pt;">소스를 보면 연결할 와이파이 SSID 와 패스워드를 넣을 수 있게 되어 있고&nbsp;</span><span style="font-size: 14.6667px;">gmtOffset_sec 변수에 32400 을 대입해 주었다. 이것은 NTP 서버에서 제공해 주는 시간 값이 영국 그리니치 표준시 기준이기 때문에 우리나라에 맞게 수정해 주어야 한다. 우리나라는 GMT+9 (그리니치 표준시 보다 9시간 빠름) 지역이기 때문에 9시간을 더해 주면 된다. 그러므로 9시간을 초(Sec)로 변환한 값인 32400을 변수에 대입해 주었다.&nbsp;daylightOffset_sec 변수는 섬머타임 여부를 나타낸다. 섬머타임 적용지역의 경우 하절기에 시간이 1시간 앞당겨진다. 우리나라는 해당사항이 없으므로 0을 대입해 주었다. NTP 서버의 경우 자신이 알고 있는 다른 서버를 이용해도 된다.</span></p>
   <p style="line-height: 1.8;"><span style="font-size: 11pt;"><br /></span></p>
   <div class="colorscripter-code" style="margin: 0px; padding: 0px; border: 0px; line-height: 1.3; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace !important; color: #010101; overflow: auto; position: relative !important;">
      <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;">
         <tbody>
            <tr>
               <td style="margin: 0px; padding: 6px; border-width: 0px 2px 0px 0px; border-top-style: initial; border-right-style: solid; border-bottom-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: #e5e5e5; border-bottom-color: initial; border-left-color: initial; line-height: 1.3; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">
                  <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace !important; word-break: normal; text-align: right; color: #666666;">
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">1</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">2</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">3</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">4</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">5</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">6</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">7</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">8</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">9</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">10</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">11</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">12</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">13</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">14</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">15</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">16</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">17</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">18</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">19</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">20</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">21</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">22</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">23</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">24</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">25</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">26</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">27</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">28</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">29</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">30</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">31</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">32</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">33</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">34</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">35</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">36</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">37</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">38</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">39</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">40</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">41</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">42</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">43</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">44</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">45</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">46</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">47</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">48</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">49</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">50</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">51</div>
                     <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">52</div>
                     </div>
                  </td>
               <td style="margin: 0px; padding: 6px 0px; border-width: 0px; border-style: initial; border-color: initial; line-height: 1.3; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif;">
                  <div style="margin: 0px; padding: 0px; border: 0px; line-height: 15.6px; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace !important; color: #010101;">
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;"><span style="color: #0086b3;">#include</span>&nbsp;<span style="color: #a71d5d;">&lt;</span>WiFi.h<span style="color: #a71d5d;">&gt;</span></div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;"><span style="color: #0086b3;">#include</span>&nbsp;<span style="color: #63a35c;">"time.h"</span></div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;"><span style="color: #a71d5d;">const</span>&nbsp;<span style="color: #066de2;">char</span><span style="color: #a71d5d;">*</span>&nbsp;ssid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #a71d5d;">=</span>&nbsp;<span style="color: #63a35c;">"ssid"</span>;&nbsp;<span style="color: #999999;">//와이파이&nbsp;SSID</span></div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;"><span style="color: #a71d5d;">const</span>&nbsp;<span style="color: #066de2;">char</span><span style="color: #a71d5d;">*</span>&nbsp;password&nbsp;&nbsp;&nbsp;<span style="color: #a71d5d;">=</span>&nbsp;<span style="color: #63a35c;">"password"</span>;&nbsp;&nbsp;<span style="color: #999999;">//와이파이&nbsp;패스워드</span></div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;"><span style="color: #a71d5d;">const</span>&nbsp;<span style="color: #066de2;">char</span><span style="color: #a71d5d;">*</span>&nbsp;ntpServer&nbsp;<span style="color: #a71d5d;">=</span>&nbsp;<span style="color: #63a35c;">"kr.pool.ntp.org"</span>;</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;"><span style="color: #999999;">//3200초는&nbsp;1시간,&nbsp;우리나라는&nbsp;GMT+9&nbsp;이므로&nbsp;3600초x9&nbsp;=&nbsp;32400&nbsp;해&nbsp;줌</span></div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;"><span style="color: #a71d5d;">const</span>&nbsp;<span style="color: #066de2;">long</span>&nbsp;&nbsp;gmtOffset_sec&nbsp;<span style="color: #a71d5d;">=</span>&nbsp;<span style="color: #0099cc;">32400</span>;&nbsp;</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;"><span style="color: #999999;">//섬머타임&nbsp;적용&nbsp;시&nbsp;3600&nbsp;(시간을&nbsp;1시간&nbsp;빠르게&nbsp;함)</span></div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;"><span style="color: #999999;">//우리나라는&nbsp;시행&nbsp;안하므로&nbsp;0</span></div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;"><span style="color: #a71d5d;">const</span>&nbsp;<span style="color: #066de2;">int</span>&nbsp;&nbsp;&nbsp;daylightOffset_sec&nbsp;<span style="color: #a71d5d;">=</span>&nbsp;<span style="color: #0099cc;">0</span>;&nbsp;</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;"><span style="color: #a71d5d;">void</span>&nbsp;printLocalTime()</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">{</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;<span style="color: #a71d5d;">struct</span>&nbsp;tm&nbsp;timeinfo;</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;<span style="color: #a71d5d;">if</span>(<span style="color: #a71d5d;">!</span>getLocalTime(<span style="color: #a71d5d;">&amp;</span>timeinfo)){</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;&nbsp;&nbsp;Serial.println(<span style="color: #63a35c;">"Failed&nbsp;to&nbsp;obtain&nbsp;time"</span>);</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #a71d5d;">return</span>;</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;}</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;Serial.println(<span style="color: #a71d5d;">&amp;</span>timeinfo,&nbsp;<span style="color: #63a35c;">"%A,&nbsp;%B&nbsp;%d&nbsp;%Y&nbsp;%H:%M:%S"</span>);</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">}</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;"><span style="color: #a71d5d;">void</span>&nbsp;setup()</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">{</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;Serial.<span style="color: #066de2;">begin</span>(<span style="color: #0099cc;">115200</span>);</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;<span style="color: #999999;">//connect&nbsp;to&nbsp;WiFi</span></div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;Serial.<span style="color: #066de2;">printf</span>(<span style="color: #63a35c;">"Connecting&nbsp;to&nbsp;%s&nbsp;"</span>,&nbsp;ssid);</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;WiFi.<span style="color: #066de2;">begin</span>(ssid,&nbsp;password);</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;<span style="color: #a71d5d;">while</span>&nbsp;(WiFi.status()&nbsp;<span style="color: #a71d5d;">!</span><span style="color: #a71d5d;">=</span>&nbsp;WL_CONNECTED)&nbsp;{</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;delay(<span style="color: #0099cc;">500</span>);</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serial.print(<span style="color: #63a35c;">"."</span>);</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;}</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;Serial.println(<span style="color: #63a35c;">"&nbsp;CONNECTED"</span>);</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;<span style="color: #999999;">//init&nbsp;and&nbsp;get&nbsp;the&nbsp;time</span></div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;configTime(gmtOffset_sec,&nbsp;daylightOffset_sec,&nbsp;ntpServer);</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;printLocalTime();</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;<span style="color: #999999;">//disconnect&nbsp;WiFi&nbsp;as&nbsp;it's&nbsp;no&nbsp;longer&nbsp;needed</span></div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;WiFi.disconnect(<span style="color: #a71d5d;">true</span>);</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;WiFi.mode(WIFI_OFF);</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">}</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;"><span style="color: #a71d5d;">void</span>&nbsp;loop()</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">{</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;delay(<span style="color: #0099cc;">1000</span>);</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">&nbsp;&nbsp;printLocalTime();</div>
                     <div style="margin: 0px; padding: 0px 6px; border: 0px; line-height: 15.6px; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; white-space: pre;">}</div>
                     </div>
                  <div style="margin: -13px 5px 0px 0px; padding: 0px; border: 0px; line-height: 1.3; text-align: right; font-size: 9px; font-style: italic;"><a href="http://colorscripter.com/info#e" target="_blank" style="text-decoration-line: none; color: #e5e5e5;">Colored by Color Scripter</a></div>
                  </td>
               <td style="margin: 0px; padding: 0px 2px 4px 0px; border-width: 0px; border-style: initial; border-color: initial; line-height: 1.3; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; vertical-align: bottom;"><a href="http://colorscripter.com/info#e" target="_blank" style="text-decoration-line: none; color: white;"><span style="font-size: 9px; word-break: normal; background-color: #e5e5e5; border-radius: 10px; padding: 1px;">cs</span></a></td>
               </tr>
            </tbody>
         </table>
      </div>
   <p style="line-height: 1.8;"><span style="font-size: 11pt;"><br /></span></p>
   </div>
<p style="font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; background-color: #d4dad8; line-height: 1.8;"><span style="font-size: 11pt;"><br /></span></p>
<p style="font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; background-color: #d4dad8; line-height: 1.8; clear: none; float: none;"><span class="imageblock" style="margin: 5px 0px; display: inline-block; width: 683px; height: auto; max-width: 100%;"><img src="https://t1.daumcdn.net/cfile/tistory/99E7FB425BC0929225" width="683" filename="time.jpg" filemime="image/jpeg" style="margin: 0px; padding: 0px; border: 0px; line-height: 1.3; cursor: pointer; max-width: 100%; height: auto;" /></span></p>
<p style="font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; background-color: #d4dad8; line-height: 1.8;"><span style="font-size: 11pt;">실행한 결과이다. 컴퓨터의 시간과 비교해보니 거의 정확히 일치한다.&nbsp;<br /></span></p>
<p style="font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; background-color: #d4dad8; line-height: 1.8;"><span style="font-size: 11pt;"><br /></span></p>
<p style="font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; background-color: #d4dad8; line-height: 1.8;"><span style="font-size: 11pt;">시간 구하기는 앞으로 ESP32를 이용한 DIY 에 활용할 일이 많을 것이다.</span></p>
<p><br style="font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; background-color: #d4dad8;" /><br style="font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; background-color: #d4dad8;" /><span style="font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; background-color: #d4dad8;">출처:&nbsp;</span><a href="https://deneb21.tistory.com/594" style="text-decoration-line: none; font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; background-color: #d4dad8;" target="_blank">https://deneb21.tistory.com/594</a><span style="font-family: &quot;Nanum Gothic&quot;, &quot;Nanum Gothic&quot;, AppleGothic, sans-serif; background-color: #d4dad8;">&nbsp;[Do It Yourself!]</span></p>