<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>pi-usagiのブログ</title>
<link>https://ameblo.jp/pi-usagi/</link>
<atom:link href="https://rssblog.ameba.jp/pi-usagi/rss20.xml" rel="self" type="application/rss+xml" />
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" />
<description>ブログの説明を入力します。</description>
<language>ja</language>
<item>
<title>Making wifi remote control tank using M5CAMERA.</title>
<description>
<![CDATA[ <p>It is good time to start IoT!</p><p>M5CAMERA is powerful device to enable your hobbby electric craft.</p><p>&nbsp;</p><p>&nbsp;</p><p>I made a radio controll tank that is enable to controll by iPhone&nbsp;with watching streaming camera image.</p><p>&nbsp;</p><p>&nbsp;</p><div class="ogpCard_root"><article class="ogpCard_wrap" contenteditable="false" style="display:inline-block;max-width:100%"><a class="ogpCard_link" data-ogp-card-log="" href="https://youtu.be/_T8_b0Jmoac" rel="noopener noreferrer" style="display:flex;justify-content:space-between;overflow:hidden;box-sizing:border-box;width:620px;max-width:100%;height:120px;border:1px solid #e2e2e2;border-radius:4px;background-color:#fff;text-decoration:none" target="_blank"><span class="ogpCard_content" style="display:flex;flex-direction:column;overflow:hidden;width:100%;padding:16px"><span class="ogpCard_title" style="-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:2;max-height:48px;line-height:1.4;font-size:16px;color:#333;text-align:left;font-weight:bold;overflow:hidden">M5CAMERAでラジコン戦車を作ってパイソンでコントロールしてみた</span><span class="ogpCard_description" style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.6;margin-top:4px;color:#757575;text-align:left;font-size:12px">スマホでリアルタイムにカメラの映像を見ながら操作できるラジコン作ってみた。マイコン制御にはマイクロパイソンを使用。操作画面はHTMLで作成。使った部品は以下・M5CAMERA・タミヤの工作キット No.227・GROVE - I2C ミニモータードライバ動画左上の小画面はスマホに映るストリーミング映像です</span><span class="ogpCard_url" style="display:flex;align-items:center;margin-top:auto"><span class="ogpCard_iconWrap" style="position:relative;width:20px;height:20px;flex-shrink:0"><img alt="リンク" class="ogpCard_icon" height="20" loading="lazy" src="https://c.stat100.ameba.jp/ameblo/symbols/v3.20.0/svg/gray/editor_link.svg" style="position:absolute;top:0;bottom:0;right:0;left:0;height:100%;max-height:100%" width="20"></span><span class="ogpCard_urlText" style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#757575;font-size:12px;text-align:left">youtu.be</span></span></span><span class="ogpCard_imageWrap" style="position:relative;width:120px;height:120px;flex-shrink:0"><img alt="" class="ogpCard_image" data-ogp-card-image="" height="120" loading="lazy" src="https://i.ytimg.com/vi/_T8_b0Jmoac/maxresdefault.jpg" style="position:absolute;top:50%;left:50%;object-fit:cover;min-height:100%;min-width:100%;transform:translate(-50%,-50%)" width="120"></span></a></article></div><p>&nbsp;</p><p>&nbsp;</p><p><span style="text-decoration:underline;"><span style="font-weight:bold;">Hardware</span></span></p><p>&nbsp;</p><p>Body part set that&nbsp;include gear and motor&nbsp;is purchased from&nbsp;&nbsp;<a href="https://www.tamiyausa.com/shop/educational/" rel="noopener noreferrer" target="_blank">TAMIYA educational kits</a>.</p><p>&nbsp;</p><p>In order to controll two&nbsp;motors, I used&nbsp;<a href="https://www.seeedstudio.com/Grove-I2C-Mini-Motor-Driver.html" rel="noopener noreferrer" target="_blank">Grove - I2C Mini Motor Driver</a>.</p><p>&nbsp;</p><p>Use rechargable&nbsp;AAA&nbsp;Nickel metal hydride battery battery x 4 = 1.2x4=4.8V&nbsp;</p><p>as&nbsp;power supply &nbsp;for both M5CAMERA and motor driver.</p><p>&nbsp;</p><p>Each parts are connected with grove cable.</p><p>&nbsp;</p><p>You can check the parts connection with following movie.</p><p>&nbsp;</p><div class="ogpCard_root"><article class="ogpCard_wrap" contenteditable="false" style="display:inline-block;max-width:100%"><a class="ogpCard_link" data-ogp-card-log="" href="https://youtu.be/RvlUe-46iGA" rel="noopener noreferrer" style="display:flex;justify-content:space-between;overflow:hidden;box-sizing:border-box;width:620px;max-width:100%;height:120px;border:1px solid #e2e2e2;border-radius:4px;background-color:#fff;text-decoration:none" target="_blank"><span class="ogpCard_content" style="display:flex;flex-direction:column;overflow:hidden;width:100%;padding:16px"><span class="ogpCard_title" style="-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:2;max-height:48px;line-height:1.4;font-size:16px;color:#333;text-align:left;font-weight:bold;overflow:hidden">M5 TANK component parts</span><span class="ogpCard_description" style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.6;margin-top:4px;color:#757575;text-align:left;font-size:12px">Components of the M5 Tank</span><span class="ogpCard_url" style="display:flex;align-items:center;margin-top:auto"><span class="ogpCard_iconWrap" style="position:relative;width:20px;height:20px;flex-shrink:0"><img alt="リンク" class="ogpCard_icon" height="20" loading="lazy" src="https://c.stat100.ameba.jp/ameblo/symbols/v3.20.0/svg/gray/editor_link.svg" style="position:absolute;top:0;bottom:0;right:0;left:0;height:100%;max-height:100%" width="20"></span><span class="ogpCard_urlText" style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#757575;font-size:12px;text-align:left">youtu.be</span></span></span><span class="ogpCard_imageWrap" style="position:relative;width:120px;height:120px;flex-shrink:0"><img alt="" class="ogpCard_image" data-ogp-card-image="" height="120" loading="lazy" src="https://i.ytimg.com/vi/RvlUe-46iGA/maxresdefault.jpg" style="position:absolute;top:50%;left:50%;object-fit:cover;min-height:100%;min-width:100%;transform:translate(-50%,-50%)" width="120"></span></a></article></div><p>&nbsp;</p><p>&nbsp;</p><p><span style="text-decoration:underline;"><span style="font-weight:bold;">Software</span></span></p><p>&nbsp;</p><p>Controll interface on iPhone side&nbsp;is made by html like this.</p><p><a href="https://stat.ameba.jp/user_images/20210511/22/pi-usagi/9a/7b/j/o2448326414940523661.jpg"><img alt="" height="560" src="https://stat.ameba.jp/user_images/20210511/22/pi-usagi/9a/7b/j/o2448326414940523661.jpg" width="420"></a></p><p>&nbsp;</p><p>&nbsp;</p><p>The html file is stored in M5Camera and you can access it from iPhone.</p><p>M5Camera works as&nbsp;web server using MicroPython's&nbsp;micro-framework&nbsp;server, picoweb.</p><p>Connection between M5CAMERA and iPhone is over Wi-Fi.</p><p>&nbsp;</p><p>By moving slider, javeScript in html create xmlHttpRequest and send python program the slider status.</p><p>&nbsp;</p><p>On the same time, python program on M5CAMERA obtain the variable of slider status ,&nbsp;and send the signal to the motor driver according to the slider status with I2C technology.</p><p>&nbsp;</p><p>Communication between html and python is enabled by Ajax,&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>
]]>
</description>
<link>https://ameblo.jp/pi-usagi/entry-12673941863.html</link>
<pubDate>Tue, 11 May 2021 22:22:05 +0900</pubDate>
</item>
<item>
<title>M5CAMERAなるカメラ付きマイコンボードでラジコン戦車作ってみた</title>
<description>
<![CDATA[ <p>&nbsp;</p><p>M5CAMERAなる、カメラ付きのマイコンと</p><p>タミヤの工作キット組み合わせて、戦車のラジコン作ってみた。</p><p>&nbsp;</p><p>スマホからwifi経由でカメラのストリーミング映像みながらコントロール可能</p><p><br>とりあえず、作ったのはこんな感じ。</p><p>&nbsp;</p><div class="ogpCard_root"><article class="ogpCard_wrap" contenteditable="false" style="display:inline-block;max-width:100%"><a class="ogpCard_link" data-ogp-card-log="" href="https://youtu.be/_T8_b0Jmoac" rel="noopener noreferrer" style="display:flex;justify-content:space-between;overflow:hidden;box-sizing:border-box;width:620px;max-width:100%;height:120px;border:1px solid #e2e2e2;border-radius:4px;background-color:#fff;text-decoration:none" target="_blank"><span class="ogpCard_content" style="display:flex;flex-direction:column;overflow:hidden;width:100%;padding:16px"><span class="ogpCard_title" style="-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:2;max-height:48px;line-height:1.4;font-size:16px;color:#333;text-align:left;font-weight:bold;overflow:hidden">M5CAMERA DEMO</span><span class="ogpCard_description" style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.6;margin-top:4px;color:#757575;text-align:left;font-size:12px">M5カメラで、スマホでリアルタイムにカメラの映像を見ながら操作できるラジコン作ってみた。マイコン制御にはマイクロパイソンを、操作画面はHTMLで作成。使った部品は以下・M5CAMERA・タミヤの工作キット No.227・GROVE - I2C ミニモータードライバ</span><span class="ogpCard_url" style="display:flex;align-items:center;margin-top:auto"><span class="ogpCard_iconWrap" style="position:relative;width:20px;height:20px;flex-shrink:0"><img alt="リンク" class="ogpCard_icon" height="20" loading="lazy" src="https://c.stat100.ameba.jp/ameblo/symbols/v3.20.0/svg/gray/editor_link.svg" style="position:absolute;top:0;bottom:0;right:0;left:0;height:100%;max-height:100%" width="20"></span><span class="ogpCard_urlText" style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#757575;font-size:12px;text-align:left">youtu.be</span></span></span><span class="ogpCard_imageWrap" style="position:relative;width:120px;height:120px;flex-shrink:0"><img alt="" class="ogpCard_image" data-ogp-card-image="" height="120" loading="lazy" src="https://i.ytimg.com/vi/_T8_b0Jmoac/maxresdefault.jpg" style="position:absolute;top:50%;left:50%;object-fit:cover;min-height:100%;min-width:100%;transform:translate(-50%,-50%)" width="120"></span></a></article></div><p>&nbsp;</p><p>&nbsp;</p><p>ラジコン操作画面をhtmlで作成し、スマホから操作画面のホームページにアクセスして操作する。</p><p>ホームページは、M5カメラ内のマイコンでpicowebなるシンプルなマイクロパイソンのwebサーバーで動している。</p><p>ホームページに左右のキャタピラを動かすためのスライダーと、カメラ映像を表示する画面を配置。</p><p>スライダー操作に対するモータの駆動は、マイクロパイソン使ってI2C経由でモータドライバに指令を出している。</p><p>&nbsp;</p><p>M5スタック使った電子工作はArduino使ったものがほとんど。</p><p>特にM5カメラについてはパイソンで動かしているものがほとんどないと思われる。</p><p>&nbsp;</p><p>ストリーミング映像が途切れることなくラジコン操作できるように、</p><p>Ajax使っているところが工夫、と思っている。</p><p>&nbsp;</p><p>備忘録も兼ねて、製作方法をアップしていきたい・・・</p><p>&nbsp;</p><p>&nbsp;</p>
]]>
</description>
<link>https://ameblo.jp/pi-usagi/entry-12673667791.html</link>
<pubDate>Mon, 10 May 2021 14:58:13 +0900</pubDate>
</item>
<item>
<title>高速道路料金</title>
<description>
<![CDATA[ <p>東京湾アクアラインの、東京側の乗り口ICである浮島が工事のため利用できない。</p><p>千葉県からの帰りに降り口として、一般道に降りることはこれまで通りできる。</p><p>&nbsp;</p><p>千葉に行く時は手前の殿町から入れと指示が出ているが３００円余分にかかる。</p><p>以前から気になっていたアクアライン前後の高速区間を使うといくら余分にかかるか、確認してみた。</p><p>&nbsp;</p><p>・浮島ー木更津金田(アクアラインのみ)：800円</p><p>・殿町ー木更津金田(東京側で首都高を1区間利用)：1100円</p><p>・浮島ー袖ヶ浦(千葉県側を1区間、アクア連絡道路使った場合)：960円、２km程度で160円はもったいない。</p><p>&nbsp;</p><p>&nbsp;</p>
]]>
</description>
<link>https://ameblo.jp/pi-usagi/entry-12673053898.html</link>
<pubDate>Fri, 07 May 2021 14:43:50 +0900</pubDate>
</item>
<item>
<title>Python備忘録</title>
<description>
<![CDATA[ <p>&nbsp;</p><p>&nbsp;</p><ul><li>ndarrayをlistに変換<p>&nbsp;</p><div class="ogpCard_root"><article class="ogpCard_wrap" contenteditable="false" style="display:inline-block;max-width:100%"><a class="ogpCard_link" data-ogp-card-log="" href="https://ameblo.jp/pi-usagi" rel="noopener noreferrer" style="display:flex;justify-content:space-between;overflow:hidden;box-sizing:border-box;width:620px;max-width:100%;height:120px;border:1px solid #e2e2e2;border-radius:4px;background-color:#fff;text-decoration:none" target="_blank"><span class="ogpCard_content" style="display:flex;flex-direction:column;overflow:hidden;width:100%;padding:16px"><span class="ogpCard_title" style="-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:2;max-height:48px;line-height:1.4;font-size:16px;color:#333;text-align:left;font-weight:bold;overflow:hidden">pi-usagiのブログ</span><span class="ogpCard_description" style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.6;margin-top:4px;color:#757575;text-align:left;font-size:12px">PI-Usagiさんのブログです。最近の記事は「ndarrayをint型のlistに変換する」です。</span><span class="ogpCard_url" style="display:flex;align-items:center;margin-top:auto"><span class="ogpCard_iconWrap" style="position:relative;width:20px;height:20px;flex-shrink:0"><img alt="リンク" class="ogpCard_icon" height="20" loading="lazy" src="https://c.stat100.ameba.jp/ameblo/symbols/v3.20.0/svg/gray/editor_link.svg" style="position:absolute;top:0;bottom:0;right:0;left:0;height:100%;max-height:100%" width="20"></span><span class="ogpCard_urlText" style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#757575;font-size:12px;text-align:left">ameblo.jp</span></span></span></a></article></div><p>&nbsp;</p></li></ul>
]]>
</description>
<link>https://ameblo.jp/pi-usagi/entry-12625396197.html</link>
<pubDate>Wed, 16 Sep 2020 19:27:28 +0900</pubDate>
</item>
<item>
<title>ndarrayをint型のlistに変換する</title>
<description>
<![CDATA[ <p>import numpy as np</p><p>&nbsp;</p><p>#int型のndarrayを生成</p><p>a = np.array( [1,2,3] , dtype=int)</p><p>&nbsp;</p><p>#list型に変換</p><p>a = a.tolist()</p><p>&nbsp;</p>
]]>
</description>
<link>https://ameblo.jp/pi-usagi/entry-12625263098.html</link>
<pubDate>Wed, 16 Sep 2020 08:30:09 +0900</pubDate>
</item>
<item>
<title>Python備忘録</title>
<description>
<![CDATA[ <p>Pythonで、リスト内の要素数をカウントする方法</p><p>&nbsp;</p><p>#リストの生成</p><p>&gt;&gt;&gt;a=[0,1,0,1,1]</p><p>&nbsp;</p><p>#１の数を数える</p><p>&gt;&gt;&gt;a.count(1)</p><p>3</p><p>&nbsp;</p><p>#1の割合(1の数/全要素数)</p><p>&gt;&gt;&gt;a.count(1)/len(a)</p><p>0.5</p>
]]>
</description>
<link>https://ameblo.jp/pi-usagi/entry-12625019641.html</link>
<pubDate>Tue, 15 Sep 2020 08:15:30 +0900</pubDate>
</item>
<item>
<title>強化学習の使い道</title>
<description>
<![CDATA[ <p>人工知能AIプログラムのAlphaGo（アルファ碁）がプロの棋士を倒して話題になった。</p><p>最近の将棋界では、人工知能AIを使った棋譜の研究が当たり前らしい。</p><p>藤井聡太棋聖もやってるのかな？</p><p>&nbsp;</p><p>強化学習は、アルファ碁にも使われている人工知能のテクノロジーらしいが、AIとの関係などよく分からない・・・</p><p>なんとなく今後の需要が高まりそうな気がするので、のんびり勉強して備忘録できにアップしていこうかと。</p>
]]>
</description>
<link>https://ameblo.jp/pi-usagi/entry-12624583847.html</link>
<pubDate>Sun, 13 Sep 2020 11:22:00 +0900</pubDate>
</item>
</channel>
</rss>
