<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ke_takahashi</author_name>
  <author_url>https://blog.hatena.ne.jp/ke_takahashi/</author_url>
  <blog_title>memorandums</blog_title>
  <blog_url>https://memorandums.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>超音波距離センサーは安いし、音速を扱うという何とも理系的な響きが好きなセンサーの１つです。 ただ、距離を測るのは簡単ですが、人数をカウントするとなると、ちょっと大変です。 センサーから得られるデータを読み取りながら、どうすれば測定できるか考えて試行錯誤するところが勉強になるかと思います。 まず、距離を取得するプログラムをArduinoで作ったら、まず、シリアルモニターで値を見てみましょう。超音波距離センサーの前を何回か行ったり来たりしてみました。 多分、見にくいですが、グラフにしてみると以下のような感じになります。 青線が生データ、オレンジが３項移動平均、グレーが５項移動平均です。 移動平均な…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmemorandums.hatenablog.com%2Fentry%2F2020%2F11%2F23%2F170732&quot; title=&quot;超音波距離センサーHC-SR04を使って人数カウンターを作ってみる - memorandums&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>https://cdn-ak.f.st-hatena.com/images/fotolife/k/ke_takahashi/20230104/20230104154706.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-11-23 17:07:32</published>
  <title>超音波距離センサーHC-SR04を使って人数カウンターを作ってみる</title>
  <type>rich</type>
  <url>https://memorandums.hatenablog.com/entry/2020/11/23/170732</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
