<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ippei8jp</author_name>
  <author_url>https://blog.hatena.ne.jp/ippei8jp/</author_url>
  <blog_title>いっぺーちゃんの いろいろやってみよ～</blog_title>
  <blog_url>https://ippei8jp.hatenablog.jp/</blog_url>
  <categories>
    <anon>ESP32</anon>
    <anon>micropython</anon>
  </categories>
  <description>前回、時刻を設定できるようにしたので、今回はNTPサーバから時刻を取得してみます。これらを組み合わせると、時刻合わせが自動で行えるようになります。 以下のプログラムをntptime.pyという名前で保存し、upipmでインストールします。 import usocket as socket try: import ustruct as struct except: import struct def time(): # (datetime.date(1970, 1, 1) - datetime.date(1900, 1, 1)).days * 24 * 60 * 60 NTP_DELTA = 2…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fippei8jp.hatenablog.jp%2Fentry%2F2017%2F08%2F18%2F135755&quot; title=&quot;micropython on ESP32 でNTPサーバから時刻取得 - いっぺーちゃんの いろいろやってみよ～&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-08-18 13:57:55</published>
  <title>micropython on ESP32 でNTPサーバから時刻取得</title>
  <type>rich</type>
  <url>https://ippei8jp.hatenablog.jp/entry/2017/08/18/135755</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
