<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>micro:bit &#8211; リビングの魔王</title>
	<atom:link href="https://living-maou.com/tag/microbit/feed/" rel="self" type="application/rss+xml" />
	<link>https://living-maou.com</link>
	<description></description>
	<lastBuildDate>Wed, 20 Aug 2025 00:55:34 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://living-maou.com/wp-content/uploads/2020/02/cropped-favicon-32x32.png</url>
	<title>micro:bit &#8211; リビングの魔王</title>
	<link>https://living-maou.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>動きを覚えるAIをつくろう！micro:bit CreateAIで体験する機械学習</title>
		<link>https://living-maou.com/microbit-createai/</link>
					<comments>https://living-maou.com/microbit-createai/#respond</comments>
		
		<dc:creator><![CDATA[メソ]]></dc:creator>
		<pubDate>Wed, 20 Aug 2025 00:55:34 +0000</pubDate>
				<category><![CDATA[micro:bit]]></category>
		<category><![CDATA[MakeCode]]></category>
		<category><![CDATA[人工知能(AI)]]></category>
		<guid isPermaLink="false">https://living-maou.com/?p=7701</guid>

					<description><![CDATA[micro:bitでAIを使ったプログラミングが体験できるのを知っていますか？ 2024年11月に公開された新機能「micro:bit CreateAI」を使えば、micro:bitの動きをAIに学ばせ、その動きに応じて [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/eyecatch-microbit-createai.jpg"><img fetchpriority="high" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/eyecatch-microbit-createai.jpg" alt="" width="800" height="450" class="aligncenter size-full wp-image-7702" srcset="https://living-maou.com/wp-content/uploads/2025/08/eyecatch-microbit-createai.jpg 800w, https://living-maou.com/wp-content/uploads/2025/08/eyecatch-microbit-createai-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2025/08/eyecatch-microbit-createai-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2025/08/eyecatch-microbit-createai-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2025/08/eyecatch-microbit-createai-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2025/08/eyecatch-microbit-createai-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2025/08/eyecatch-microbit-createai-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<div class="information-box common-icon-box"><span class="fz-14px">このページにはアフィリエイトリンクが含まれています。</span></div>
<p><!-- リンクを介して商品を購入した場合、当ブログに報酬が支払われることがあります。またリンクから購入しても読者様のご負担はございません。 --></p>

<p>micro:bitでAIを使ったプログラミングが体験できるのを知っていますか？</p>
<p>2024年11月に公開された新機能「<a rel="noopener" target="_blank" href="https://createai.microbit.org/">micro:bit CreateAI<span class="fa fa-external-link external-icon anchor-icon"></span></a>」を使えば、micro:bitの動きをAIに学ばせ、その動きに応じて音や光を出すことができます。</p>
<p>この記事では、AIの基本と「micro:bit CreateAI」の使い方を、実際のプロジェクトを例に紹介します。</p>
<!-- START MoshimoAffiliateEasyLink -->
<script type="text/javascript">
(function(b,c,f,g,a,d,e){b.MoshimoAffiliateObject=a;
b[a]=b[a]||function(){arguments.currentScript=c.currentScript
||c.scripts[c.scripts.length-2];(b[a].q=b[a].q||[]).push(arguments)};
c.getElementById(a)||(d=c.createElement(f),d.src=g,
d.id=a,e=c.getElementsByTagName("body")[0],e.appendChild(d))})
(window,document,"script","//dn.msmstatic.com/site/cardlink/bundle.js?20220329","msmaflink");
msmaflink({"n":"MICRO-BIT V2.21（マイクロビット）新バージョン名 技適取得済 正規品！","b":"BBC MICRO:BIT","t":"MEFV2S","d":"https:\/\/m.media-amazon.com","c_p":"\/images\/I","p":["\/31WHlhqwHsL._SL500_.jpg","\/31ZKF5TP+IL._SL500_.jpg","\/31JuMd8uObL._SL500_.jpg"],"u":{"u":"https:\/\/www.amazon.co.jp\/dp\/B08P4D3N8K","t":"amazon","r_v":""},"v":"2.1","b_l":[{"id":1,"u_tx":"Amazonで見る","u_bc":"#f79256","u_url":"https:\/\/www.amazon.co.jp\/dp\/B08P4D3N8K","a_id":1826192,"p_id":170,"pl_id":27060,"pc_id":185,"s_n":"amazon","u_so":1},{"id":16,"u_tx":"楽天市場で見る","u_bc":"#f76956","u_url":"https:\/\/search.rakuten.co.jp\/search\/mall\/MICRO-BIT%20V2.21%EF%BC%88%E3%83%9E%E3%82%A4%E3%82%AF%E3%83%AD%E3%83%93%E3%83%83%E3%83%88%EF%BC%89%E6%96%B0%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E5%90%8D%20%E6%8A%80%E9%81%A9%E5%8F%96%E5%BE%97%E6%B8%88%20%E6%AD%A3%E8%A6%8F%E5%93%81%EF%BC%81\/","a_id":1820957,"p_id":54,"pl_id":27059,"pc_id":54,"s_n":"rakuten","u_so":2},{"id":15,"u_tx":"Yahoo!ショッピングで見る","u_bc":"#66a7ff","u_url":"https:\/\/shopping.yahoo.co.jp\/search?first=1\u0026p=MICRO-BIT%20V2.21%EF%BC%88%E3%83%9E%E3%82%A4%E3%82%AF%E3%83%AD%E3%83%93%E3%83%83%E3%83%88%EF%BC%89%E6%96%B0%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E5%90%8D%20%E6%8A%80%E9%81%A9%E5%8F%96%E5%BE%97%E6%B8%88%20%E6%AD%A3%E8%A6%8F%E5%93%81%EF%BC%81","a_id":1832853,"p_id":1225,"pl_id":27061,"pc_id":1925,"s_n":"yahoo","u_so":3}],"eid":"OO8Ok","s":"s"});
</script>
<div id="msmaflink-OO8Ok">リンク</div>
<!-- MoshimoAffiliateEasyLink END -->
<h2><span id="toc1">人工知能(AI)と機械学習</span></h2>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/03/Scratch-teachablemachine02-2208.jpg"><img decoding="async" src="https://living-maou.com/wp-content/uploads/2022/03/Scratch-teachablemachine02-2208.jpg" alt="機械学人工知能(AI)、機械学習、深層学習（ディープラーニング）の違い" width="800" height="450" class="aligncenter size-full wp-image-4194" srcset="https://living-maou.com/wp-content/uploads/2022/03/Scratch-teachablemachine02-2208.jpg 800w, https://living-maou.com/wp-content/uploads/2022/03/Scratch-teachablemachine02-2208-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2022/03/Scratch-teachablemachine02-2208-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2022/03/Scratch-teachablemachine02-2208-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2022/03/Scratch-teachablemachine02-2208-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2022/03/Scratch-teachablemachine02-2208-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2022/03/Scratch-teachablemachine02-2208-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p><span style="color: #ff6600;"><b>AI（人工知能）</b></span>は、<span class="marker-under-red">人間のように考えたり判断したりできるコンピューターの技術</span>です。<br />
たとえば、人の言葉に答えたり、写真から物を見分けたりできます。</p>
<p>その中でも<span style="color: #ff6600;"><b>機械学習</b></span>は、<span class="marker-under-red">たくさんのデータを使ってコンピューターにルールや規則性を学ばせる方法</span>です。<br data-start="330" data-end="333" />学んだルールを使うことで、新しいデータを見たときに「これはどんなルールに当てはまるだろう？」と考え、答えを出せるようになります。</p>
<p>機械学習の基本的な流れは、主に次の2つです。</p>
<div class="blank-box bb-blue">
<ol>
<li><b>学習</b>：たくさんのデータからルールや特徴を見つけ出す</li>
<li><b>推論</b>：学んだルールを使って、新しいデータを見分けたり結果を予測したりする</li>
</ol>
</div>
<p>&nbsp;</p>
<h2><span id="toc2">micro:bit CreateAIとは</span></h2>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai01.png"><img decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai01.png" alt="micro:bit CreateAI" width="800" height="450" class="aligncenter size-full wp-image-7703" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai01.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai01-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai01-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai01-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai01-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai01-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai01-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p><b>micro:bit CreateAI</b>は、micro:bitを使ってAIの「学習」と「推論」を体験できるツールです。<br />
これだけでデータ収集、学習、プログラミングまで一通りできます。</p>
<p>現在は<b>加速度センサー</b>のデータに対応しており、micro:bitを「ふる・回す・止める」などの動きで学習させ、その動きに応じてLEDや音で反応させることができます。</p>
<p>&nbsp;</p>
<h2><span id="toc3">micro:bit CreateAI の使い方</span></h2>
<p>micro:bit公式サイトにある「<a rel="noopener" target="_blank" href="https://microbit.org/projects/make-it-code-it/ai-storytelling-friend/">AIストーリーテリングフレンド<span class="fa fa-external-link external-icon anchor-icon"></span></a>」を例に紹介します。</p>
<div class="blogcard-type bct-reference-link">

<a rel="noopener" target="_blank" href="https://microbit.org/projects/make-it-code-it/ai-storytelling-friend/" title="micro:bit AI storytelling friend" class="blogcard-wrap external-blogcard-wrap a-wrap cf"><div class="blogcard external-blogcard eb-left cf"><div class="blogcard-label external-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail external-blogcard-thumbnail"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/cocoon-resources/blog-card-cache/433f6dcc913b0c1d73794d8773882aa6.png" alt="" class="blogcard-thumb-image external-blogcard-thumb-image" width="160" height="90" /></figure><div class="blogcard-content external-blogcard-content"><div class="blogcard-title external-blogcard-title">micro:bit AI storytelling friend</div><div class="blogcard-snippet external-blogcard-snippet">Use storytelling to introduce AI.</div></div><div class="blogcard-footer external-blogcard-footer cf"><div class="blogcard-site external-blogcard-site"><div class="blogcard-favicon external-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://microbit.org/projects/make-it-code-it/ai-storytelling-friend/" alt="" class="blogcard-favicon-image external-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain external-blogcard-domain">microbit.org</div></div></div></div></a>
</div>
<p>AIストーリーテリングフレンドは、micro:bitと機械学習を使って、ぬいぐるみの動きを認識し、音や光で物語を盛り上げるプロジェクトです。</p>
<p>手順は以下の通りです。</p>
<div class="blank-box bb-blue">
<ol>
<li>micro:bitをぬいぐるみにとりつける</li>
<li>ぬいぐるみを動かしてデータを集め、AIに学習させる</li>
<li>MakeCodeでプログラムを作って動かす</li>
</ol>
</div>
<p>ふつうのセンサーは「決めた数値をこえたら反応」しますが、AIなら自分の動きを学習させられるので、もっと自由で複雑な表現ができます。</p>
<p>&nbsp;</p>
<h3><span id="toc4">用意するもの</span></h3>
<ul>
<li>micro:bit(V2)</li>
<li>USBケーブル</li>
<li>電池ボックス（なくても可能。ただしUSB接続のままだと大きな動きはできない）</li>
</ul>
<p>&nbsp;</p>
<h3><span id="toc5">micro:bitとmicro:bit CreateAIを接続する</span></h3>
<p><a rel="noopener" target="_blank" href="https://createai.microbit.org/">micro:bit CreateAI<span class="fa fa-external-link external-icon anchor-icon"></span></a>にアクセスして、「はじめよう」をクリックする</p>
<div class="blogcard-type bct-official">

<a rel="noopener" target="_blank" href="https://createai.microbit.org/" title="micro:bit CreateAI" class="blogcard-wrap external-blogcard-wrap a-wrap cf"><div class="blogcard external-blogcard eb-left cf"><div class="blogcard-label external-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail external-blogcard-thumbnail"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/cocoon-resources/blog-card-cache/c5b81f821aad814c4b0b09621368f9dc.png" alt="" class="blogcard-thumb-image external-blogcard-thumb-image" width="160" height="90" /></figure><div class="blogcard-content external-blogcard-content"><div class="blogcard-title external-blogcard-title">micro:bit CreateAI</div><div class="blogcard-snippet external-blogcard-snippet">Create AI on your BBC micro:bit using movement and machine learning</div></div><div class="blogcard-footer external-blogcard-footer cf"><div class="blogcard-site external-blogcard-site"><div class="blogcard-favicon external-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://createai.microbit.org/" alt="" class="blogcard-favicon-image external-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain external-blogcard-domain">createai.microbit.org</div></div></div></div></a>
</div>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai02.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai02.png" alt="micro:bit CreateAI 使い方1" width="800" height="450" class="aligncenter size-full wp-image-7704" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai02.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai02-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai02-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai02-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai02-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai02-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai02-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>「新規セッション」をクリックする</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai03.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai03.png" alt="micro:bit CreateAI 使い方2" width="800" height="450" class="aligncenter size-full wp-image-7705" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai03.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai03-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai03-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai03-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai03-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai03-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai03-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>「接続」をクリックし、次の画面で「次」をクリックする</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai04.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai04.png" alt="micro:bit CreateAI 使い方3" width="800" height="450" class="aligncenter size-full wp-image-7706" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai04.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai04-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai04-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai04-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai04-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai04-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai04-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>micro:bitとパソコンをUSBケーブルでつなぎ「次」をクリックしたら、<br />
一覧からmicro:bitを選択して「接続」をクリック</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai05.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai05.png" alt="micro:bit CreateAI 使い方4" width="800" height="450" class="aligncenter size-full wp-image-7707" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai05.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai05-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai05-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai05-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai05-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai05-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai05-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>micro:bitとmicro:bit CreateAIの接続が成功したら、データ収集プログラムのダウンロードが始まります。</p>
<p>&nbsp;</p>
<p>ダウンロードが完了したら、micro:bitをパソコンから外し、電池ボックスをつける<br />
「次」をクリックする</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai06.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai06.png" alt="micro:bit CreateAI 使い方5" width="800" height="450" class="aligncenter size-full wp-image-7708" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai06.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai06-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai06-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai06-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai06-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai06-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai06-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<div class="blank-box bb-tab bb-memo bb-blue">電池ボックスにスイッチがある場合は、オンにしておきましょう。<br />
電池ボックスがない場合は、パソコンにつないだままにします。</div>
<p>&nbsp;</p>
<p>micro:bitのLED画面とmicro:bit CreateAIに表示されているパターンが同じであることを確認する<br />
ちがう場合は、micro:bit CreateAIのパターンをLED画面と同じにする<br />
「次」をクリック</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai07.jpg"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai07.jpg" alt="micro:bit CreateAI 使い方6" width="800" height="450" class="aligncenter size-full wp-image-7709" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai07.jpg 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai07-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai07-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai07-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai07-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai07-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai07-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>「次」をクリックし、次の画面でmicro:bitを選択して「ペア設定」をクリックする</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai08.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai08.png" alt="micro:bit CreateAI 使い方7" width="800" height="450" class="aligncenter wp-image-7710 size-full" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai08.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai08-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai08-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai08-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai08-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai08-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai08-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>接続が成功すると、micro:bit CreateAIにもどります。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai09.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai09.png" alt="micro:bit CreateAI 使い方8" width="800" height="450" class="aligncenter size-full wp-image-7711" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai09.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai09-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai09-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai09-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai09-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai09-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai09-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>画面の下にあるライブデータグラフには、加速度センサーで取得した値がリアルタイムに表示されます。micro:bitをふると、グラフが変化しますよ。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai10.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai10.png" alt="micro:bit CreateAI 使い方9" width="800" height="450" class="aligncenter size-full wp-image-7712" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai10.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai10-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai10-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai10-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai10-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai10-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai10-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h3><span id="toc6">データを集めてAIに学習させる</span></h3>
<p>micro:bitとmicro:bit CreateAIが接続できたら、データを集めましょう。</p>
<h4>データを集めるエリアに名前をつける</h4>
<p>動きごとに、データを集めるためのエリア（器）を準備します。</p>
<p>「アクション名」をクリックして名前をつける<br />
アイコンの横の「▼」をクリックすると、アイコンを変更できる</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai11.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai11.png" alt="micro:bit CreateAI 使い方10" width="800" height="450" class="aligncenter size-full wp-image-7713" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai11.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai11-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai11-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai11-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai11-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai11-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai11-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>「＋ アクションを追加」をクリックすると、エリアが追加される</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai12.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai12.png" alt="micro:bit CreateAI 使い方11" width="800" height="450" class="aligncenter size-full wp-image-7714" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai12.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai12-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai12-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai12-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai12-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai12-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai12-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>必要な動きの数だけ、エリアを作ります。</p>
<p>「<a rel="noopener" target="_blank" href="https://microbit.org/projects/make-it-code-it/ai-storytelling-friend/">AIストーリーテリングフレンド<span class="fa fa-external-link external-icon anchor-icon"></span></a>」では、3つのエリアを作ります。</p>
<ul>
<li>jumping（ジャンプ）</li>
<li>rolling（転がる）</li>
<li>sleeping（寝る）</li>
</ul>
<p>&nbsp;</p>
<h4>データ記録する</h4>
<p>micro:bitをぬいぐるみにとりつけ、動きのデータを記録しましょう。</p>
<p>記録したいエリアの右側にある「記録」をクリック<br />
3→2→1→実行、とカウントダウンの後、およそ1秒間、データが記録されます。</p>
<p>記録中と表示されている間に、micro:bitを動かす</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai13.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai13.png" alt="micro:bit CreateAI 使い方12" width="800" height="450" class="aligncenter size-full wp-image-7715" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai13.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai13-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai13-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai13-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai13-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai13-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai13-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>記録が終わると、データがグラフで表示されます。<br />
記録されたデータが気に入らない場合は、グラフの×をクリックすると削除できます。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai14.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai14.png" alt="micro:bit CreateAI 使い方13" width="800" height="450" class="aligncenter size-full wp-image-7716" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai14.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai14-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai14-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai14-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai14-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai14-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai14-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>ひとつの動き（アクション）につき、3つ以上データを記録しましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai15.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai15.png" alt="micro:bit CreateAI 使い方14" width="800" height="450" class="aligncenter size-full wp-image-7717" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai15.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai15-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai15-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai15-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai15-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai15-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai15-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h4>モデルのトレーニングとテスト</h4>
<p>収集したデータをもとに、モデルのトレーニングを行います。</p>
<p>画面右下にある「モデルのトレーニング」をクリックし、<br />
次の画面で「トレーニングを開始」をクリックする</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai16.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai16.png" alt="micro:bit CreateAI 使い方15" width="800" height="450" class="aligncenter size-full wp-image-7718" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai16.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai16-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai16-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai16-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai16-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai16-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai16-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>トレーニングが完了するまで、しばらく待ちましょう。</p>
<p>&nbsp;</p>
<p>学習が完了すると、モデルのテスト画面になります。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai17.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai17.png" alt="micro:bit CreateAI 使い方16" width="800" height="450" class="aligncenter size-full wp-image-7719" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai17.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai17-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai17-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai17-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai17-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai17-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai17-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>micro:bitを動かして、モデルを確認してみましょう。</p>
<p>確実性は、AIが「今の動きは〇〇だ」と どれくらい自信を持っているかを表す数値（0〜100％）です。</p>
<p>思ったような結果にならない時は、認識ポイントを変えてみたり、データ収集の画面にもどってデータを取り直してみましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai18.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai18.png" alt="micro:bit CreateAI 使い方17" width="800" height="450" class="aligncenter wp-image-7720 size-full" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai18.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai18-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai18-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai18-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai18-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai18-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai18-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h4>プログラミング</h4>
<p>モデルのテストが終わったら、プログラミングしましょう。</p>
<p>「MakeCodeで編集」をクリック</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai19.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai19.png" alt="micro:bit CreateAI 使い方18" width="800" height="450" class="aligncenter size-full wp-image-7721" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai19.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai19-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai19-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai19-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai19-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai19-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai19-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>MakeCodeが開き、サンプルコードが表示されます。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai20.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai20.png" alt="micro:bit CreateAI 使い方19" width="800" height="450" class="aligncenter size-full wp-image-7722" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai20.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai20-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai20-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai20-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai20-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai20-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai20-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>このMakeCodeでは、あらかじめ拡張機能として「機械学習」が組み込まれています。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai21.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai21.png" alt="micro:bit CreateAI 使い方20" width="800" height="450" class="aligncenter size-full wp-image-7723" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai21.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai21-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai21-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai21-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai21-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai21-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai21-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai22.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai22.png" alt="micro:bit CreateAI 使い方21" width="800" height="450" class="aligncenter size-full wp-image-7724" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai22.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai22-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai22-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai22-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai22-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai22-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai22-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>「<a rel="noopener" target="_blank" href="https://microbit.org/projects/make-it-code-it/ai-storytelling-friend/">AIストーリーテリングフレンド<span class="fa fa-external-link external-icon anchor-icon"></span></a>」のプログラムを作りましょう。<br />
ぬいぐるみの動きによって反応が変わります。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai23.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai23.png" alt="「AIストーリーテリングフレンド」のプログラム" width="800" height="450" class="aligncenter size-full wp-image-7725" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai23.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai23-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai23-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai23-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai23-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai23-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai23-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h4>実行</h4>
<p>プログラムをmicro:bitへダウンロードし、実行します。</p>
<p>画面左下にある「ダウンロード」をクリックする<br />
「次」をクリック</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai24.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai24.png" alt="micro:bit CreateAI 使い方23" width="800" height="450" class="aligncenter size-full wp-image-7726" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai24.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai24-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai24-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai24-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai24-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai24-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai24-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>「同じmicro:bit」を選択し、「次」をクリック<br />
micro:bitとパソコンをUSBケーブルでつなぎ、「次」をクリック</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai25.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai25.png" alt="micro:bit CreateAI 使い方24" width="800" height="450" class="aligncenter size-full wp-image-7727" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai25.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai25-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai25-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai25-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai25-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai25-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai25-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>「次」をクリックする<br />
一覧からmicro:bitを選択して「接続」をクリック</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai26.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai26.png" alt="micro:bit CreateAI 使い方25" width="800" height="450" class="aligncenter size-full wp-image-7728" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai26.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai26-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai26-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai26-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai26-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai26-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai26-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>ダウンロードが完了したら、micro:bitをパソコンから外す<br />
ぬいぐるみを動かして、動作確認してみましょう！</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai27.png"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai27.png" alt="micro:bit CreateAI 使い方26" width="800" height="450" class="aligncenter size-full wp-image-7729" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai27.png 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai27-500x281.png 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai27-300x169.png 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai27-768x432.png 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai27-120x68.png 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai27-160x90.png 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai27-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<div class="blank-box bb-tab bb-memo bb-blue">同じmicro:bitに再転送するとデータ収集プログラムは上書きされます。データを再収集したいときは再接続が必要です。</div>
<p>&nbsp;</p>
<h2><span id="toc7">AIで動く工作に挑戦できる本『micro:bitではじめるAI工作』</span></h2>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai28.jpg"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai28.jpg" alt="" width="800" height="450" class="aligncenter size-full wp-image-7730" srcset="https://living-maou.com/wp-content/uploads/2025/08/microbit-createai28.jpg 800w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai28-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai28-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai28-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai28-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai28-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2025/08/microbit-createai28-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>『<a rel="nofollow noopener" target="_blank" href="//af.moshimo.com/af/c/click?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062&amp;url=https%3A%2F%2Fwww.amazon.co.jp%2Fdp%2F4814400993" referrerpolicy="no-referrer-when-downgrade">micro:bitではじめるAI工作<span class="fa fa-external-link external-icon anchor-icon"></span></a><img decoding="async" src="//i.moshimo.com/af/i/impression?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062" alt="" loading="lazy" width="1" height="1" style="border: none;" />』は、ダンボールや厚紙とmicro:bitを組み合わせて、声やジェスチャーに反応するロボットや、画像認識で遊べるゲームなど、8種類の<span class="marker-under-red">“AIで動く工作”が紹介されている本</span>です。</p>
<p><!-- START MoshimoAffiliateEasyLink --><script type="text/javascript">
(function(b,c,f,g,a,d,e){b.MoshimoAffiliateObject=a;
b[a]=b[a]||function(){arguments.currentScript=c.currentScript
||c.scripts[c.scripts.length-2];(b[a].q=b[a].q||[]).push(arguments)};
c.getElementById(a)||(d=c.createElement(f),d.src=g,
d.id=a,e=c.getElementsByTagName("body")[0],e.appendChild(d))})
(window,document,"script","//dn.msmstatic.com/site/cardlink/bundle.js?20220329","msmaflink");
msmaflink({"n":"micro:bitではじめるAI工作 ―親子で作ろう！AIで動くロボット、ゲーム、おもちゃ","b":"オーム社","t":"","d":"https:\/\/m.media-amazon.com","c_p":"","p":["\/images\/I\/51BiU8cdTLL._SL500_.jpg"],"u":{"u":"https:\/\/www.amazon.co.jp\/dp\/4814400993","t":"amazon","r_v":""},"v":"2.1","b_l":[{"id":1,"u_tx":"Amazonで見る","u_bc":"#f79256","u_url":"https:\/\/www.amazon.co.jp\/dp\/4814400993","a_id":1826192,"p_id":170,"pl_id":27060,"pc_id":185,"s_n":"amazon","u_so":1},{"id":33,"u_tx":"楽天市場で見る","u_bc":"#f76956","u_url":"https:\/\/search.rakuten.co.jp\/search\/mall\/micro%3Abit%E3%81%A7%E3%81%AF%E3%81%98%E3%82%81%E3%82%8BAI%E5%B7%A5%E4%BD%9C%20%E2%80%95%E8%A6%AA%E5%AD%90%E3%81%A7%E4%BD%9C%E3%82%8D%E3%81%86%EF%BC%81AI%E3%81%A7%E5%8B%95%E3%81%8F%E3%83%AD%E3%83%9C%E3%83%83%E3%83%88%E3%80%81%E3%82%B2%E3%83%BC%E3%83%A0%E3%80%81%E3%81%8A%E3%82%82%E3%81%A1%E3%82%83\/","a_id":1820957,"p_id":54,"pl_id":27059,"pc_id":54,"s_n":"rakuten","u_so":2},{"id":34,"u_tx":"Yahoo!ショッピングで見る","u_bc":"#66a7ff","u_url":"https:\/\/shopping.yahoo.co.jp\/search?first=1\u0026p=micro%3Abit%E3%81%A7%E3%81%AF%E3%81%98%E3%82%81%E3%82%8BAI%E5%B7%A5%E4%BD%9C%20%E2%80%95%E8%A6%AA%E5%AD%90%E3%81%A7%E4%BD%9C%E3%82%8D%E3%81%86%EF%BC%81AI%E3%81%A7%E5%8B%95%E3%81%8F%E3%83%AD%E3%83%9C%E3%83%83%E3%83%88%E3%80%81%E3%82%B2%E3%83%BC%E3%83%A0%E3%80%81%E3%81%8A%E3%82%82%E3%81%A1%E3%82%83","a_id":1832853,"p_id":1225,"pl_id":27061,"pc_id":1925,"s_n":"yahoo","u_so":3}],"eid":"0R0NT","s":"s"});
</script></p>
<div id="msmaflink-0R0NT">リンク</div>
<p>「micro:bit CreateAI」では加速度センサー以外のデータを学習できませんが、この本では外部サイト<span class="marker-under-red">「Teachable Machine」を利用して、音や画像を使ったAI学習を体験</span>できます。<br />
また、「micro:bit CreateAI」の解説も収録されています。</p>
<p>「工作 → 電子工作 → プログラミング → AI」の4ステップ構成になっていて、少しずつレベルアップしながら学べるのが魅力です。</p>
<p>ただし、micro:bit本体以外に電子部品を用意する必要があります。<br />
すべて揃えると、おおよそ1万円ほどかかります。</p>
<p><span class="badge badge-blue">参考</span> スイッチサイエンス：<a rel="noopener" target="_blank" href="https://www.switch-science.com/products/8462">「micro:bitではじめるAI工作」パーツセット<span class="fa fa-external-link external-icon anchor-icon"></span></a></p>
<p>また、ダンボールの切り出しは型紙を使えば簡単にできますが、型紙をダウンロードして印刷する手間がある点には注意してください。</p>
<p>AI×ものづくりを楽しみたい人にはぴったりな本ですが、「micro:bit関係なく、まずはAIを気軽に体験してみたい」人には、『<a rel="nofollow noopener" target="_blank" href="//af.moshimo.com/af/c/click?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062&amp;url=https%3A%2F%2Fwww.amazon.co.jp%2Fdp%2F4873119189">Scratchではじめる機械学習<span class="fa fa-external-link external-icon anchor-icon"></span></a><img loading="lazy" decoding="async" style="border: 0px;" src="//i.moshimo.com/af/i/impression?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062" alt="" width="1" height="1" />』のほうがおすすめです。</p>
<div class="blogcard-type bct-detail">

<a rel="noopener" target="_self" href="https://living-maou.com/scratch-teachablemachine/" title="【Scratchではじめる機械学習】スクラッチでお手軽に人工知能(AI)を体験！" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2022/03/eyecatch-teachablemachine-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2022/03/eyecatch-teachablemachine-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2022/03/eyecatch-teachablemachine-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2022/03/eyecatch-teachablemachine-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2022/03/eyecatch-teachablemachine-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2022/03/eyecatch-teachablemachine-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2022/03/eyecatch-teachablemachine-320x180.jpg 320w, https://living-maou.com/wp-content/uploads/2022/03/eyecatch-teachablemachine.jpg 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【Scratchではじめる機械学習】スクラッチでお手軽に人工知能(AI)を体験！</div><div class="blogcard-snippet internal-blogcard-snippet">本記事では『Scratchではじめる機械学習』という本を紹介します。この本は、小学校高学年くらいから読める機械学習の超入門書。敷居の高い機械学習をお手軽に体験できるので、子どもだけでなく大人も読む価値がある本です。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<p>&nbsp;</p>
<h2><span id="toc8">まとめ</span></h2>
<p>micro:bit CreateAIを使えば、AIの学習もプログラミングも、一度に体験できます。</p>
<p>公式サイトには「<a rel="noopener" target="_blank" href="https://microbit.org/projects/make-it-code-it/ai-storytelling-friend/">AIストーリーテリングフレンド<span class="fa fa-external-link external-icon anchor-icon"></span></a>」だけでなく、ほかにもいろんなアクティビティが紹介されています。</p>
<div class="blank-box bb-blue">
<ul>
<li><a rel="noopener" target="_blank" href="https://microbit.org/projects/make-it-code-it/simple-ai-exercise-timer/">シンプルなAIエクササイズタイマー<span class="fa fa-external-link external-icon anchor-icon"></span></a></li>
<li><a rel="noopener" target="_blank" href="https://microbit.org/projects/make-it-code-it/ai-activity-timer/">AIアクティビティタイマー<span class="fa fa-external-link external-icon anchor-icon"></span></a></li>
</ul>
</div>
<p>どれも気軽にチャレンジできるので、ぜひ作ってみてくださいね！</p>
<p>&nbsp;</p>
<div class="blogcard-type bct-official">

<a rel="noopener" target="_blank" href="https://microbit.org/get-started/user-guide/microbit-createai/" title="micro:bit CreateAI user guide" class="blogcard-wrap external-blogcard-wrap a-wrap cf"><div class="blogcard external-blogcard eb-left cf"><div class="blogcard-label external-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail external-blogcard-thumbnail"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/cocoon-resources/blog-card-cache/41b22ed34153ad31cbd55220d78462fc.jpg" alt="" class="blogcard-thumb-image external-blogcard-thumb-image" width="160" height="90" /></figure><div class="blogcard-content external-blogcard-content"><div class="blogcard-title external-blogcard-title">micro:bit CreateAI user guide</div><div class="blogcard-snippet external-blogcard-snippet">Detailed guidance about using CreateAI</div></div><div class="blogcard-footer external-blogcard-footer cf"><div class="blogcard-site external-blogcard-site"><div class="blogcard-favicon external-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://microbit.org/get-started/user-guide/microbit-createai/" alt="" class="blogcard-favicon-image external-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain external-blogcard-domain">microbit.org</div></div></div></div></a>
</div>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://living-maou.com/microbit-createai/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【マイクロビット×メイクコード】プログラミングでカウント100ゲームをおもしろくしよう！</title>
		<link>https://living-maou.com/microbit-count100/</link>
					<comments>https://living-maou.com/microbit-count100/#respond</comments>
		
		<dc:creator><![CDATA[メソ]]></dc:creator>
		<pubDate>Fri, 05 Apr 2024 00:20:32 +0000</pubDate>
				<category><![CDATA[micro:bit]]></category>
		<category><![CDATA[MakeCode]]></category>
		<category><![CDATA[作品例]]></category>
		<guid isPermaLink="false">https://living-maou.com/?p=6529</guid>

					<description><![CDATA[この記事では、マイクロビットでカウント100ゲームのプログラムの作り方を紹介しょうかいします。 マイクロビットの基本的きほんてきな使い方や機能きのうは分かったけれど 次に何を作っていいのか分からない 複雑ふくざつなゲーム [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2024/02/eyecatch-microbit-count100.jpg"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-6530" src="https://living-maou.com/wp-content/uploads/2024/02/eyecatch-microbit-count100.jpg" alt="" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2024/02/eyecatch-microbit-count100.jpg 800w, https://living-maou.com/wp-content/uploads/2024/02/eyecatch-microbit-count100-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2024/02/eyecatch-microbit-count100-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2024/02/eyecatch-microbit-count100-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2024/02/eyecatch-microbit-count100-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2024/02/eyecatch-microbit-count100-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2024/02/eyecatch-microbit-count100-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>この記事では、マイクロビットで<b>カウント100ゲーム</b>のプログラムの作り方を<ruby>紹介<rt>しょうかい</rt></ruby>します。</p>
<p>マイクロビットの<ruby>基本的<rt>きほんてき</rt></ruby>な使い方や<ruby>機能<rt>きのう</rt></ruby>は分かったけれど</p>
<div class="blank-box bb-blue">
<ul>
<li>次に何を作っていいのか分からない</li>
<li><ruby>複雑<rt>ふくざつ</rt></ruby>なゲームを作るのはハードルが高い</li>
<li>みんなでワイワイ遊べるものが作りたい</li>
</ul>
</div>
<p>という人におすすめの作品です。</p>
<p>定番の遊びをプログラミングの力で、さらにおもしろくしましょう！</p>
<p>プログラムはとても<ruby>簡単<rt>かんたん</rt></ruby>！<ruby>初心者<rt>しょしんしゃ</rt></ruby>さんでも分かりやすいように<ruby>解説<rt>かいせつ</rt></ruby>しますよ。</p>
<p>Makecodeの<ruby>乱数<rt>らんすう</rt></ruby>や<ruby>関数<rt>かんすう</rt></ruby>の使い方も分かります。</p>
<p>&nbsp;</p>
<h2><span id="toc1">ルール</span></h2>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-01.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-6531" src="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-01.png" alt="カウント100ルール" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-01.png 800w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-01-500x281.png 500w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-01-300x169.png 300w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-01-768x432.png 768w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-01-120x68.png 120w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-01-160x90.png 160w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-01-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>カウント100は、2人<ruby>以上<rt>いじょう</rt></ruby>で行うゲームです。</p>
<p>「NOT100」や「100を言ってはいけないゲーム」とも言われています。</p>
<p>ルールは、下のとおりです。</p>
<div class="blank-box bb-blue">
<ol>
<li>プレイヤーは<ruby>順番<rt>じゅんばん</rt></ruby>に1から100まで数える</li>
<li>1度に数えられるのは3つまで</li>
<li><ruby>最後<rt>さいご</rt></ruby>に100と言ったプレイヤーが負け！</li>
</ol>
</div>
<p>&nbsp;</p>
<h2><span id="toc2">用意するもの</span></h2>
<ul>
<li>マイクロビット本体</li>
<li>電池ボックス</li>
</ul>
<p>1コずつあればOKです。</p>
<p>&nbsp;</p>
<p>プログラミングは、MakeCodeエディターを使います。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/microbit-makecode/">MakeCodeエディター<ruby>基本的<rt>きほんてき</rt></ruby>な使い方<span class="fa fa-external-link internal-icon anchor-icon"></span></a>は、下の記事にまとめています。</p>
<div class="blogcard-type bct-detail">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-makecode/" title="【マイクロビット】MakeCode（メイクコード）エディターの使い方" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2020/06/eyecatch_microbit_makecode-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2020/06/eyecatch_microbit_makecode-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2020/06/eyecatch_microbit_makecode-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2020/06/eyecatch_microbit_makecode.jpg 800w, https://living-maou.com/wp-content/uploads/2020/06/eyecatch_microbit_makecode-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2020/06/eyecatch_microbit_makecode-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2020/06/eyecatch_microbit_makecode-1536x864.jpg 1536w, https://living-maou.com/wp-content/uploads/2020/06/eyecatch_microbit_makecode-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2020/06/eyecatch_microbit_makecode-320x180.jpg 320w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット】MakeCode（メイクコード）エディターの使い方</div><div class="blogcard-snippet internal-blogcard-snippet">MakeCode（メイクコード）エディターはブラウザベースで利用できるmicro:bitの開発環境のひとつ。【リビングの魔王】ではMakeCodeエディターの使い方を初心者にも分かりやすくていねいに紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<p>&nbsp;</p>
<h2><span id="toc3">一番シンプルなプログラム</span></h2>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-02.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-6532" src="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-02.png" alt="一番シンプルなプログラム" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-02.png 800w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-02-500x281.png 500w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-02-300x169.png 300w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-02-768x432.png 768w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-02-120x68.png 120w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-02-160x90.png 160w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-02-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>Aボタンをおしたとき、<ruby>現在<rt>げんざい</rt></ruby>の数をカウントして、100<ruby>以上<rt>いじょう</rt></ruby>になったらゲームオーバーになるプログラムです。</p>
<p>Bボタンをおしたときに、<ruby>現在<rt>げんざい</rt></ruby>の数を<ruby>確認<rt>かくにん</rt></ruby>できるようにしました。</p>
<p>&nbsp;</p>
<h3><span id="toc4">最初だけ</span></h3>
<p><ruby>現在<rt>げんざい</rt></ruby>の数を<ruby>覚<rt>おぼ</rt></ruby>えておく<ruby>変数<rt>へんすう</rt></ruby>「count」を作り、<ruby>最初<rt>さいしょ</rt></ruby>に0を<ruby>設定<rt>せってい</rt></ruby>（<ruby>初期<rt>しょき</rt></ruby>化）します。</p>
<p>1.<ruby>変数<rt>へんすう</rt></ruby>→<ruby>変数<rt>へんすう</rt></ruby>を<ruby>追加<rt>ついか</rt></ruby>するを<ruby>選<rt>えら</rt></ruby>んで、<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「count」</b></span>を作る<br />
2.<span style="color: #1e90ff;"><b>「<ruby>最初<rt>さいしょ</rt></ruby>だけ」</b></span>の中に<span style="color: #dc143c;"><b>「<ruby>変数<rt>へんすう</rt></ruby>（count）を 0 にする」</b></span>を入れる</p>
<p>&nbsp;</p>
<p><span style="color: #ff6600;"><b><ruby>変数<rt>へんすう</rt></ruby></b></span>とは、<span class="marker-under-red">データを<ruby>一時的<rt>いちじてき</rt></ruby>に<ruby>覚<rt>おぼ</rt></ruby>えておくための入れ物</span>です。下の記事でくわしく<ruby>解説<rt>かいせつ</rt></ruby>しているので、<ruby>変数<rt>へんすう</rt></ruby>をはじめて使う人は読んでみてくださいね。</p>
<div class="blogcard-type bct-detail">

<a rel="noopener" target="_self" href="https://living-maou.com/scratch-variable/" title="【子ども向け】変数って何？スクラッチ(Scratch)でわかりやすく解説" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2020/10/eyechatch_scratch_variable2-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2020/10/eyechatch_scratch_variable2-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2020/10/eyechatch_scratch_variable2-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2020/10/eyechatch_scratch_variable2-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2020/10/eyechatch_scratch_variable2-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2020/10/eyechatch_scratch_variable2-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2020/10/eyechatch_scratch_variable2-320x180.jpg 320w, https://living-maou.com/wp-content/uploads/2020/10/eyechatch_scratch_variable2.jpg 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【子ども向け】変数って何？スクラッチ(Scratch)でわかりやすく解説</div><div class="blogcard-snippet internal-blogcard-snippet">この記事では変数について解説します。【リビングの魔王】ではプログラミング初心者のお子さんにも分かりやすいようにScratch（スクラッチ）を使って、変数の使い方やメリットを紹介します。なるべくむずかしい言葉は使わないようにしました。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<p>&nbsp;</p>
<h3><span id="toc5">ボタンAが押されたとき</span></h3>
<p>Aボタンをおしたとき、<ruby>現在<rt>げんざい</rt></ruby>の数(count)を1<ruby>増<rt>ふ</rt></ruby>やします。また、ボタンをおしたことが分かるように音を鳴らしましょう。</p>
<p>1.<span style="color: #d400d4;"><b>「ボタンAが<ruby>押<rt>お</rt></ruby>されたとき」</b></span>の中に<span style="color: #dc143c;"><b>「<ruby>変数<rt>へんすう</rt></ruby>（count）を 1 だけ<ruby>増<rt>ふ</rt></ruby>やす」</b></span>を入れる<br />
2.<span style="color: #e63022;"><b>「鳴らす 音を鳴らす 高さ(Hz)（上のファ）長さ（1/2<ruby>拍<rt>はく</rt></ruby>） 終わるまで」</b></span>を入れる</p>
<p>&nbsp;</p>
<p><ruby>現在<rt>げんざい</rt></ruby>の数(count)が100<ruby>以上<rt>いじょう</rt></ruby>だったら負けにします。</p>
<p>3.<span style="color: #00a4a6;"><b>「もし&lt;真&gt;なら」</b></span>を出し、真の部分に<ruby>条件<rt>じょうけん</rt></ruby><span style="color: #00a4a6;"><b>「<span style="color: #dc143c;">（count）</span>（≧）（100）」</b></span>を入れる<br />
4.<span style="color: #00a4a6;"><b>「もし count ≧ 100 なら」</b></span>の中に、ゲームオーバーになった時の<ruby>処理<rt>しょり</rt></ruby>を入れる</p>
<p>ゲームオーバーになった時の<ruby>処理<rt>しょり</rt></ruby>の<ruby>例<rt>れい</rt></ruby>：</p>
<p><span style="color: #1e90ff;"><b>「アイコンを<ruby>表示<rt>ひょうじ</rt></ruby>（がいこつ）」</b></span><br />
<span style="color: #e63022;"><b>「鳴らす（パワーダウン） バックグラウンドで一度だけ」</b></span></p>
<p>&nbsp;</p>
<div class="blank-box bb-tab bb-comment bb-blue">ゲームオーバーになった時の<ruby>処理<rt>しょり</rt></ruby>は、自由にアレンジしてみてくださいね！</div>
<p>&nbsp;</p>
<h3><span id="toc6">ボタンBが押されたとき</span></h3>
<p>Bボタンをおしたときに、<ruby>現在<rt>げんざい</rt></ruby>の数(count)を<ruby>表示<rt>ひょうじ</rt></ruby>します。</p>
<p>1.<span style="color: #d400d4;"><b>「ボタンBが<ruby>押<rt>お</rt></ruby>されたとき」</b></span>の中に<span style="color: #1e90ff;"><b>「数を<ruby>表示<rt>ひょうじ</rt></ruby><span style="color: #dc143c;">（count）</span>」</b></span>を入れる<br />
2.<span style="color: #1e90ff;"><b>「<ruby>表示<rt>ひょうじ</rt></ruby>を消す」</b></span>を下に<ruby>追加<rt>ついか</rt></ruby>する</p>
<p>&nbsp;</p>
<div class="ad-area no-icon ad-shortcode ad-rectangle ad-label-visible cf" itemscope itemtype="https://schema.org/WPAdBlock">
  <div class="ad-label" itemprop="name" data-nosnippet>スポンサーリンク</div>
  <div class="ad-wrap">
    <div class="ad-responsive ad-usual"><!-- レスポンシブコード -->
<ins class="adsbygoogle"
  style="display:block"
  data-ad-client="ca-pub-9126458450711382"
  data-ad-slot="2965068638"
  data-ad-format="rectangle"
  data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>
          </div>

</div>

<h2><span id="toc7">もっとよくしよう！</span></h2>
<p>一番シンプルなプログラムだけで十分遊べますが、もっとゲームを<ruby>面白<rt>おもしろ</rt></ruby>くしたり、ズルやまちがいがおこらないような<ruby>工夫<rt>くふう</rt></ruby>を考えてみましょう！</p>
<p><ruby>例<rt>れい</rt></ruby>を3つ<ruby>紹介<rt>しょうかい</rt></ruby>します。</p>
<div class="blank-box bb-blue">
<ul>
<li><a href="#case1"><ruby>現在<rt>げんざい</rt></ruby>の数が分からないようにする</a></li>
<li><a href="#case2">1度に3回までしかカウントできないようにする</a></li>
<li><a href="#case3">おじゃまキャラが<ruby>出現<rt>しゅつげん</rt></ruby></a></li>
</ul>
</div>
<p>&nbsp;</p>
<h3 id="case1"><span id="toc8">現在の数が分からないようにする</span></h3>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-03.png"><img loading="lazy" decoding="async" class="aligncenter wp-image-6533 size-full" src="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-03.png" alt="現在の数を分からないようにするプログラム" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-03.png 800w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-03-500x281.png 500w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-03-300x169.png 300w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-03-768x432.png 768w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-03-120x68.png 120w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-03-160x90.png 160w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-03-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>本来はボタンを3回おしたら「1、2、3」とおした回数だけ数を数えますが、<b>ウソをつくことができるルール</b>を足してみました。</p>
<p>たとえば、ボタンを1回しかおしていないのに「4、5」と2つ数えたり、ボタンを3回おしたのに「6」と1つしか数えなかったり、ウソがつけます。</p>
<p>いつ100を<ruby>超<rt>こ</rt></ruby>えるのか分からないハラハラと、ウソをつく・つかないのかけひきが生まれますよ。</p>
<p>プログラムは下の<ruby>画像<rt>がぞう</rt></ruby>のとおりです。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-04.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-6534" src="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-04.png" alt="現在の数を分からないようにするプログラム" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-04.png 800w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-04-500x281.png 500w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-04-300x169.png 300w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-04-768x432.png 768w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-04-120x68.png 120w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-04-160x90.png 160w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-04-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>Bボタンがおされたときの<ruby>処理<rt>しょり</rt></ruby>を消して、<ruby>現在<rt>げんざい</rt></ruby>の数を<ruby>確認<rt>かくにん</rt></ruby>できないようにします。</p>
<p>また、Aボタンをおしたときの音を消して、何回ボタンをおしたか相手に分からないようにしましょう。</p>
<p>だいたいの数が分かるように、<ruby>棒<rt>ぼう</rt></ruby>グラフを<ruby>表示<rt>ひょうじ</rt></ruby>しました。</p>
<ol>
<li><span style="color: #00a4a6;"><b>「もし count ≧ 100 なら」</b></span>の＋をクリックして<span style="color: #00a4a6;"><b>「でなければ」</b></span>を<ruby>追加<rt>ついか</rt></ruby>する</li>
<li><span style="color: #00a4a6;"><b>「でなければ」</b></span>の下に<span style="color: #5c2d91;"><b>「<ruby>棒<rt>ぼう</rt></ruby>グラフを<ruby>表示<rt>ひょうじ</rt></ruby>する <ruby>値<rt>あたい</rt></ruby>：<span style="color: #dc143c;">count</span> <ruby>最大<rt>さいだい</rt></ruby><ruby>値<rt>ち</rt></ruby>：100」</b></span>を入れる</li>
</ol>
<div class="blank-box bb-blue"><span style="color: #5c2d91;"><b>「<ruby>棒<rt>ぼう</rt></ruby><ruby></ruby>グラフを<ruby>表示<rt>ひょうじ</rt></ruby>する」</b></span>は、のLEDのカテゴリにあります。グラフにする<b>「<ruby>値<rt>あたい</rt></ruby>」</b>と<b>「<ruby>最大<rt>さいだい</rt></ruby><ruby>値<rt>ち</rt></ruby>」</b>を<ruby>設定<rt>せってい</rt></ruby>し、25<ruby>個<rt>こ</rt></ruby>のLEDを<ruby>目盛<rt>めも</rt></ruby>りに見立てて<ruby>表示<rt>ひょうじ</rt></ruby>します。</div>
<p>&nbsp;</p>
<h3 id="case2"><span id="toc9">一度に3回までしかカウントできないようにする</span></h3>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-05.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-6535" src="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-05.png" alt="一度に3回までしかカウントできないようにする" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-05.png 800w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-05-500x281.png 500w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-05-300x169.png 300w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-05-768x432.png 768w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-05-120x68.png 120w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-05-160x90.png 160w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-05-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>まちがえて<b>Aボタンを4回<ruby>以上<rt>いじょう</rt></ruby>おせない</b>ようにしてみました。</p>
<p>自分のターンになったときにBボタンをおしてから、Aボタンをおすようにします。</p>
<p>プログラムは下の<ruby>画像<rt>がぞう</rt></ruby>のとおりです。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-06.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-6536" src="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-06.png" alt="一度に3回までしかカウントできないようにするプログラム" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-06.png 800w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-06-500x281.png 500w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-06-300x169.png 300w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-06-768x432.png 768w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-06-120x68.png 120w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-06-160x90.png 160w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-06-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<h4>最初だけ</h4>
<p>Aボタンをおした回数を<ruby>覚<rt>おぼ</rt></ruby>えておく<ruby>変数<rt>へんすう</rt></ruby>「count3」を作り、<ruby>最初<rt>さいしょ</rt></ruby>に0を<ruby>設定<rt>せってい</rt></ruby>（<ruby>初期<rt>しょき</rt></ruby>化）します。</p>
<ol>
<li><ruby>変数<rt>へんすう</rt></ruby>→<ruby>変数<rt>へんすう</rt></ruby>を<ruby>追加<rt>ついか</rt></ruby>するを<ruby>選<rt>えら</rt></ruby>んで、<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「count3」</b></span>を作る</li>
<li><span style="color: #1e90ff;"><b>「<ruby>最初<rt>さいしょ</rt></ruby>だけ」</b></span>の中に<span style="color: #dc143c;"><b>「<ruby>変数<rt>へんすう</rt></ruby>（count3）を 0 にする」</b></span>を入れる</li>
</ol>
<p>&nbsp;</p>
<h4>ボタンAが押されたとき</h4>
<p>Aボタンをおした回数(count3)が3<ruby>以上<rt>いじょう</rt></ruby>だったら、<ruby>現在<rt>げんざい</rt></ruby>の数(count)を<ruby>増<rt>ふ</rt></ruby>やせないようにします。</p>
<ol>
<li><span style="color: #00a4a6;"><b>「もし&lt;真&gt;なら／でなければ」</b></span>を出し、真の部分に<ruby>条件<rt>じょうけん</rt></ruby><span style="color: #00a4a6;"><b>「<span style="color: #dc143c;">（count3）</span>（&lt;）（3）」</b></span>を入れる</li>
<li><span style="color: #00a4a6;"><b>「もし count3 &lt; 3 なら」</b></span>の中に、今までの<ruby>処理<rt>しょり</rt></ruby>を入れる</li>
<li><span style="color: #dc143c;"><b>「<ruby>変数<rt>へんすう</rt></ruby>（count）を 1 だけ<ruby>増<rt>ふ</rt></ruby>やす」</b></span>を<ruby>追加<rt>ついか</rt></ruby>する</li>
<li><span style="color: #00a4a6;"><b>「でなければ」</b></span>の中に<span style="color: #e63022;"><b>「鳴らす 音を鳴らす 高さ(Hz)（下のド）長さ（1/2<ruby>拍<rt>はく</rt></ruby>） 終わるまで」</b></span>を入れる</li>
</ol>
<p>&nbsp;</p>
<h4>ボタンBが押されたとき</h4>
<p>Bボタンをおしたときに、Aボタンをおした回数（count3）をリセットします。</p>
<ol>
<li><span style="color: #e63022;"><b>「<ruby>変数<rt>へんすう</rt></ruby>（count3）を 0 にする」</b></span>を<ruby>追加<rt>ついか</rt></ruby>する</li>
<li><span style="color: #e63022;"><b>「鳴らす（ハッピー）終わるまで」</b></span>を<ruby>追加<rt>ついか</rt></ruby>する</li>
</ol>
<p>&nbsp;</p>
<h3 id="case3"><span id="toc10">おじゃまキャラが出現</span></h3>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-07.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-6537" src="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-07.png" alt="おじゃまキャラが出現" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-07.png 800w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-07-500x281.png 500w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-07-300x169.png 300w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-07-768x432.png 768w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-07-120x68.png 120w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-07-160x90.png 160w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-07-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>実はこのゲームには<ruby>必勝法<rt>ひっしょうほう</rt></ruby>があります（<ruby>興味<rt>きょうみ</rt></ruby>がある人は調べてみてくださいね）</p>
<p>いつも勝ててしまうのは<ruby>面白<rt>おもしろ</rt></ruby>くないので、<b>時々おじゃまキャラが<ruby>出現<rt>しゅつげん</rt></ruby>して<ruby>現在<rt>げんざい</rt></ruby>の数を勝手に<ruby>増<rt>ふ</rt></ruby>やしてしまう</b>ようにしました。</p>
<p><a href="#case2">一度に3回までしかカウントできないようにするプログラム</a>に<ruby>処理<rt>しょり</rt></ruby>を<ruby>追加<rt>ついか</rt></ruby>します。</p>
<p>プログラムは下の<ruby>画像<rt>がぞう</rt></ruby>の通りです。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-08.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-6538" src="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-08.png" alt="おじゃまキャラが出現するプログラム1" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-08.png 800w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-08-500x281.png 500w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-08-300x169.png 300w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-08-768x432.png 768w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-08-120x68.png 120w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-08-160x90.png 160w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-08-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-09.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-6539" src="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-09.png" alt="おじゃまキャラが出現するプログラム2" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-09.png 800w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-09-500x281.png 500w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-09-300x169.png 300w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-09-768x432.png 768w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-09-120x68.png 120w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-09-160x90.png 160w, https://living-maou.com/wp-content/uploads/2024/02/microbit-count100-09-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<h4>ボタンBが押されたとき</h4>
<p>ランダムなタイミングでおじゃまキャラが<ruby>出現<rt>しゅつげん</rt></ruby>させます。</p>
<ol>
<li><span style="color: #00a4a6;"><b>「もし&lt;真&gt;なら／でなければ」</b></span>を出し、真の部分に<ruby>条件<rt>じょうけん</rt></ruby><span style="color: #00a4a6;"><b>「<span style="color: #9400d3;">（ 0 から 4 までの<ruby>乱数<rt>らんすう</rt></ruby></span>）（=）（4）」</b></span>を入れる</li>
<li><span style="color: #00a4a6;"><b>「でなければ」</b></span>の中に<span style="color: #1e90ff;"><b>「数を<ruby>表示<rt>ひょうじ</rt></ruby><span style="color: #dc143c;">（count）</span>」</b></span>と<span style="color: #1e90ff;"><b>「<ruby>表示<rt>ひょうじ</rt></ruby>を消す」</b></span>を入れる</li>
<li><span style="color: #dc143c;"><b>「<ruby>変数<rt>へんすう</rt></ruby>（count3）を 0 にする」</b></span>と<span style="color: #e63022;"><b>「鳴らす（ハッピー）終わるまで」</b></span>を<span style="color: #00a4a6;"><b>「もし 0から4までの<ruby>乱数<rt>らんすう</rt></ruby> = 4 なら」</b></span>の下に<ruby>配置<rt>はいち</rt></ruby>する</li>
</ol>
<p><span style="color: #9400d3;"><b>「0～4までの<ruby>乱数<rt>らんすう</rt></ruby>」</b></span>の結果が4だった場合、おじゃまキャラを<ruby>出現<rt>しゅつげん</rt></ruby>させます。4<ruby>以外<rt>いがい</rt></ruby>だった場合は、<ruby>現在<rt>げんざい</rt></ruby>の数を<ruby>表示<rt>ひょうじ</rt></ruby>します。</p>
<p>&nbsp;</p>
<p><span style="color: #ff6600;"><b><ruby>乱数<rt>らんすう</rt></ruby></b></span>とは、ある<ruby>範囲<rt>はんい</rt></ruby>の<ruby>数値<rt>すうち</rt></ruby>から、<span class="marker-under-red">ランダムに取り出した<ruby>数値<rt>すうち</rt></ruby></span>のこと。ランダムは、きまりがなくデタラメということです。</p>
<div class="blank-box bb-blue"><span style="color: #9400d3;"><b>「1～10までの<ruby>乱数<rt>らんすう</rt></ruby>」</b></span>ブロックは、1～10の部分に一番小さな数と一番大きな数を入れ、その中からランダムな<ruby>数値<rt>すうち</rt></ruby>を作り出します。</div>
<p><ruby>条件<rt>じょうけん</rt></ruby>が<span style="color: #00a4a6;"><b>「<span style="color: #9400d3;">0から4までの<ruby>乱数<rt>らんすう</rt></ruby></span> = 4」</b></span>場合、5<ruby>種類<rt>しゅるい</rt></ruby>の数字（0、1、2、3、4）のうちのひとつが当てはまるので、<ruby>確率<rt>かくりつ</rt></ruby>は5分の1です。</p>
<p>今回は5分の1の<ruby>確率<rt>かくりつ</rt></ruby>にしていますが、自分の<ruby>好<rt>す</rt></ruby>きな<ruby>確率<rt>かくりつ</rt></ruby>に調整してみてくださいね。</p>
<p>&nbsp;</p>
<h4>おじゃまキャラの関数</h4>
<p>おじゃまキャラが<ruby>出現<rt>しゅつげん</rt></ruby>した時の<ruby>処理<rt>しょり</rt></ruby>を作りましょう。プログラムの<ruby>内容<rt>ないよう</rt></ruby>を分かりやすくするために<ruby>関数<rt>かんすう</rt></ruby>にしました。</p>
<p><span style="color: #ff6600;"><b><ruby>関数<rt>かんすう</rt></ruby></b></span>とは、<span class="marker-under-red">命令のまとまり</span>のこと。何度も使う<ruby>処理<rt>しょり</rt></ruby>があったら、それを<ruby>関数<rt>かんすう</rt></ruby>にすると<ruby>便利<rt>べんり</rt></ruby>です。</p>
<p>下の記事でくわしく<ruby>解説<rt>かいせつ</rt></ruby>しているので、<ruby>関数<rt>かんすう</rt></ruby>をはじめて使う人は読んでみてくださいね。</p>
<div class="blogcard-type bct-detail">

<a rel="noopener" target="_self" href="https://living-maou.com/scratch-function/" title="【子ども向け】関数とは？スクラッチ(Scratch)を使ってわかりやすく解説" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2020/10/eyecatch_scratch_function-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2020/10/eyecatch_scratch_function-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2020/10/eyecatch_scratch_function-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2020/10/eyecatch_scratch_function.jpg 800w, https://living-maou.com/wp-content/uploads/2020/10/eyecatch_scratch_function-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2020/10/eyecatch_scratch_function-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2020/10/eyecatch_scratch_function-1536x864.jpg 1536w, https://living-maou.com/wp-content/uploads/2020/10/eyecatch_scratch_function-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2020/10/eyecatch_scratch_function-320x180.jpg 320w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【子ども向け】関数とは？スクラッチ(Scratch)を使ってわかりやすく解説</div><div class="blogcard-snippet internal-blogcard-snippet">この記事では関数・サブルーチンについて解説します。【リビングの魔王】ではプログラミング初心者のお子さんにも分かりやすいようにScratch（スクラッチ）を使って、関数やサブルーチンの使い方やメリットを紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<p>&nbsp;</p>
<p><ruby>関数<rt>かんすう</rt></ruby>「Nuisance（やっかいもの）」を作り、ボタンBが<ruby>押<rt>お</rt></ruby>されたときの処理の中で呼び出します。</p>
<p>1.高度なブロック → <ruby>関数<rt>かんすう</rt></ruby> → <ruby>関数<rt>かんすう</rt></ruby>を<ruby>作成<rt>さくせい</rt></ruby>する を<ruby>選<rt>えら</rt></ruby>んで<span style="color: #3455db;"><b><ruby>関数<rt>かんすう</rt></ruby>「Nuisance」</b></span>を<ruby>作成<rt>さくせい</rt></ruby>する<br />
2.ボタンBが<ruby>押<rt>お</rt></ruby>されたときの<span style="color: #00a4a6;"><b>「もし 0から4までの<ruby>乱数<rt>らんすう</rt></ruby> = 4 なら」</b></span>の中に<span style="color: #3455db;"><b>「<ruby>呼<rt>よ</rt></ruby>び<ruby>出<rt>だ</rt></ruby>し Nuisance」</b></span>を入れる</p>
<p>&nbsp;</p>
<p>おじゃまキャラの<ruby>出現<rt>しゅつげん</rt></ruby>で100を<ruby>超<rt>こ</rt></ruby>えてしまわないように、95<ruby>以上<rt>いじょう</rt></ruby>になったら出てこないようにします。</p>
<p>3.<span style="color: #00a4a6;"><b>「もし&lt;真&gt;なら」</b></span>を出し、真の部分に<ruby>条件<rt>じょうけん</rt></ruby><span style="color: #00a4a6;"><b>「（<span style="color: #dc143c;">count</span>）（&lt;）（95）」</b></span>を入れる</p>
<p>4.<span style="color: #1e90ff;"><b>「アイコンを<ruby>表示<rt>ひょうじ</rt></ruby>（すばらしい）」</b></span>を<ruby>追加<rt>ついか</rt></ruby>する<br />
5.<span style="color: #e63022;"><b>「鳴らす（くすくす<ruby>笑<rt>わら</rt></ruby>う）終わるまで」</b></span>を<ruby>追加<rt>ついか</rt></ruby>する</p>
<p>&nbsp;</p>
<p><ruby>変数<rt>へんすう</rt></ruby>「random」を作って1～3のランダムな数を<ruby>保存<rt>ほぞん</rt></ruby>します。</p>
<p>6.<ruby>変数<rt>へんすう</rt></ruby>→<ruby>変数<rt>へんすう</rt></ruby>を<ruby>追加<rt>ついか</rt></ruby>するを<ruby>選<rt>えら</rt></ruby>んで<span style="color: #dc143c;"><b><ruby>変数<rt>へんすう</rt></ruby>「random」</b></span>を作る<br />
7.<span style="color: #dc143c;"><b>「<ruby>変数<rt>へんすう</rt></ruby>（random）を<span style="color: #5c2d91;">（ 1 から 3 までの<ruby>乱数<rt>らんすう</rt></ruby>）</span>にする」</b></span>を<ruby>追加<rt>ついか</rt></ruby>する</p>
<p>&nbsp;</p>
<p><ruby>現在<rt>げんざい</rt></ruby>の数 + 変数random = 足した後の数 を<ruby>表示<rt>ひょうじ</rt></ruby>します。</p>
<p>8.<span style="color: #1e90ff;"><b>「数を<ruby>表示<rt>ひょうじ</rt></ruby><span style="color: #dc143c;">(count)</span>」</b></span>を<ruby>追加<rt>ついか</rt></ruby>する<br />
9.<span style="color: #1e90ff;"><b>「文字列を<ruby>表示<rt>ひょうじ</rt></ruby>(&#8220;+&#8221;)」</b></span>を<ruby>追加<rt>ついか</rt></ruby>する<br />
10.<span style="color: #1e90ff;"><b>「数を<ruby>表示<rt>ひょうじ</rt></ruby><span style="color: #dc143c;">(random)</span>」</b></span>を<ruby>追加<rt>ついか</rt></ruby>する<br />
11.<span style="color: #1e90ff;"><b>「文字列を<ruby>表示<rt>ひょうじ</rt></ruby>(&#8220;=&#8221;)」</b></span>を<ruby>追加<rt>ついか</rt></ruby>する<br />
12.<span style="color: #dc143c;"><b>「<ruby>変数<rt>へんすう</rt></ruby>（count）を (random) だけ<ruby>増<rt>ふ</rt></ruby>やす」</b></span>を<ruby>追加<rt>ついか</rt></ruby>する<br />
13.<span style="color: #1e90ff;"><b>「数を<ruby>表示<rt>ひょうじ</rt></ruby><span style="color: #dc143c;">(count)</span>」</b></span>を<ruby>追加<rt>ついか</rt></ruby>する<br />
14.<span style="color: #1e90ff;"><b>「<ruby>表示<rt>ひょうじ</rt></ruby>を消す」</b></span>を<ruby>追加<rt>ついか</rt></ruby>する</p>
<p>&nbsp;</p>
<h2><span id="toc11">まとめ</span></h2>
<p><ruby>以上<rt>いじょう</rt></ruby>、「カウント100ゲーム」のプログラムを<ruby>紹介<rt>しょうかい</rt></ruby>しました。</p>
<p>今回<ruby>紹介<rt>しょうかい</rt></ruby>した<ruby>例<rt>れい</rt></ruby><ruby>以外<rt>いがい</rt></ruby>にも、新しいルールや<ruby>便利<rt>べんり</rt></ruby>な<ruby>機能<rt>きのう</rt></ruby>を<ruby>追加<rt>ついか</rt></ruby>して、もっとゲームを<ruby>面白<rt>おもしろ</rt></ruby>くしてみてくださいね！</p>
<p>&nbsp;</p>
<div class="blogcard-type bct-check">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-hideandseek/" title="【マイクロビット×メイクコード】簡単なプログラムでいつもの遊びをおもしろくしよう！" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_hideandseek-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_hideandseek-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_hideandseek-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_hideandseek.jpg 800w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_hideandseek-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_hideandseek-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_hideandseek-1536x864.jpg 1536w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_hideandseek-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_hideandseek-320x180.jpg 320w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット×メイクコード】簡単なプログラムでいつもの遊びをおもしろくしよう！</div><div class="blogcard-snippet internal-blogcard-snippet">マイクロビットを使ったかくれんぼを紹介。かんたんなプログラムでも、アイデア次第で定番の遊びをもっと面白くすることができます。【リビングの魔王】では初心者にも分かりやすいよう処理の流れや考え方をていねいに紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<p>&nbsp;</p>
<div class="micro-top micro-center">＼【PR】身のまわりの物を使った32の作品を収録！／</div><!-- START MoshimoAffiliateEasyLink -->
<script type="text/javascript">
(function(b,c,f,g,a,d,e){b.MoshimoAffiliateObject=a;
b[a]=b[a]||function(){arguments.currentScript=c.currentScript
||c.scripts[c.scripts.length-2];(b[a].q=b[a].q||[]).push(arguments)};
c.getElementById(a)||(d=c.createElement(f),d.src=g,
d.id=a,e=c.getElementsByTagName("body")[0],e.appendChild(d))})
(window,document,"script","//dn.msmstatic.com/site/cardlink/bundle.js?20220329","msmaflink");
msmaflink({"n":"【v2対応】改訂新版 micro:bitであそぼう! たのしい電子工作\u0026プログラミング","b":"","t":"","d":"https:\/\/m.media-amazon.com","c_p":"\/images\/I","p":["\/51XJjGz1DQL._SL500_.jpg","\/51H-GmDB+wL._SL500_.jpg","\/51UNvw6m8qL._SL500_.jpg","\/51bKTI1lUcL._SL500_.jpg","\/51j+sGSNs5L._SL500_.jpg","\/51rIBlOWC9L._SL500_.jpg"],"u":{"u":"https:\/\/www.amazon.co.jp\/dp\/4297126672","t":"amazon","r_v":""},"v":"2.1","b_l":[{"id":1,"u_tx":"Amazonで見る","u_bc":"#f79256","u_url":"https:\/\/www.amazon.co.jp\/dp\/4297126672","a_id":1826192,"p_id":170,"pl_id":27060,"pc_id":185,"s_n":"amazon","u_so":1},{"u_bc":"#f76956","u_tx":"楽天市場で見る","u_url":"https:\/\/search.rakuten.co.jp\/search\/mall\/%E3%80%90v2%E5%AF%BE%E5%BF%9C%E3%80%91%E6%94%B9%E8%A8%82%E6%96%B0%E7%89%88%20micro%3Abit%E3%81%A7%E3%81%82%E3%81%9D%E3%81%BC%E3%81%86!%20%E3%81%9F%E3%81%AE%E3%81%97%E3%81%84%E9%9B%BB%E5%AD%90%E5%B7%A5%E4%BD%9C%26%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0\/","s_n":"rakuten","u_so":2,"a_id":1820957,"p_id":54,"pc_id":54,"pl_id":27059,"id":21},{"u_bc":"#66a7ff","u_tx":"Yahoo!ショッピングで見る","u_url":"https:\/\/shopping.yahoo.co.jp\/search?first=1\u0026p=%E3%80%90v2%E5%AF%BE%E5%BF%9C%E3%80%91%E6%94%B9%E8%A8%82%E6%96%B0%E7%89%88%20micro%3Abit%E3%81%A7%E3%81%82%E3%81%9D%E3%81%BC%E3%81%86!%20%E3%81%9F%E3%81%AE%E3%81%97%E3%81%84%E9%9B%BB%E5%AD%90%E5%B7%A5%E4%BD%9C%26%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0","s_n":"yahoo","u_so":3,"a_id":1832853,"p_id":1225,"pc_id":1925,"pl_id":27061,"id":22}],"eid":"GM3uR","s":"s"});
</script>
<div id="msmaflink-GM3uR">リンク</div>
]]></content:encoded>
					
					<wfw:commentRss>https://living-maou.com/microbit-count100/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>誕生日やクリスマスに！小学生がずっと遊びたくなるプログラミングロボット8選</title>
		<link>https://living-maou.com/teaching-material-physical/</link>
					<comments>https://living-maou.com/teaching-material-physical/#respond</comments>
		
		<dc:creator><![CDATA[メソ]]></dc:creator>
		<pubDate>Tue, 06 Feb 2024 01:36:32 +0000</pubDate>
				<category><![CDATA[フィジカルプログラミング]]></category>
		<category><![CDATA[embot]]></category>
		<category><![CDATA[KOOV]]></category>
		<category><![CDATA[LEGO Education]]></category>
		<category><![CDATA[MaBeee]]></category>
		<category><![CDATA[mBot]]></category>
		<category><![CDATA[micro:bit]]></category>
		<category><![CDATA[RaspberryPi]]></category>
		<category><![CDATA[Sphero]]></category>
		<category><![CDATA[プログラミング教材]]></category>
		<guid isPermaLink="false">https://living-maou.com/?p=6442</guid>

					<description><![CDATA[誕生日やクリスマス、入学祝いなど――せっかくの特別な日は、子どもの笑顔が見たいですよね。 でも、いざプレゼントを選ぼうとすると… ゲーム以外で夢中になれるものって何だろう 子どもは楽しんでも、親にとって迷惑にならないかな [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2024/02/eyecatch-physical-present.jpg"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2024/02/eyecatch-physical-present.jpg" alt="" width="800" height="450" class="aligncenter size-full wp-image-7697" srcset="https://living-maou.com/wp-content/uploads/2024/02/eyecatch-physical-present.jpg 800w, https://living-maou.com/wp-content/uploads/2024/02/eyecatch-physical-present-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2024/02/eyecatch-physical-present-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2024/02/eyecatch-physical-present-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2024/02/eyecatch-physical-present-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2024/02/eyecatch-physical-present-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2024/02/eyecatch-physical-present-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<div class="information-box common-icon-box"><span class="fz-14px">このページにはアフィリエイトリンクが含まれています。</span></div>
<p><!-- リンクを介して商品を購入した場合、当ブログに報酬が支払われることがあります。またリンクから購入しても読者様のご負担はございません。 --></p>

<p>誕生日やクリスマス、入学祝いなど――せっかくの特別な日は、子どもの笑顔が見たいですよね。</p>
<p>でも、いざプレゼントを選ぼうとすると…</p>
<div class="blank-box bb-blue">
<ul>
<li>ゲーム以外で夢中になれるものって何だろう</li>
<li>子どもは楽しんでも、親にとって迷惑にならないかな</li>
<li>勉強になるものを贈りたいけど、「つまらない」と思われたらどうしよう</li>
</ul>
</div>
<p>「何をあげたらいいの？」と迷ってしまうこと、ありませんか？</p>
<p>そんな人におすすめなのが、<b>遊びながら学べる「フィジカルプログラミングキット」</b>です。</p>
<p><b>フィジカルプログラミング</b>とは、電子部品やモーターを組み合わせて<span class="marker-under-red">ロボットや工作物を作り、それをプログラミングで動かすこと</span>。<br />
作って動かす体験を通して、「考える力」「集中力」「創造性」が自然と育まれます。</p>
<p>「ゲームばかりで困っている…」というおうちの方にもぴったり。<br />
お子さんが新しいことに夢中になり、視野が広がるきっかけになりますよ。</p>
<p>この記事では、小学生におすすめのフィジカルプログラミングキットを紹介します。<br />
遊びと学びが両立できる、とっておきのプレゼント選びの参考にしてみてください。</p>
<p>&nbsp;</p>
<div class="blogcard-type bct-related">

<a rel="noopener" target="_self" href="https://living-maou.com/teaching-material/" title="学び好きな子に育つ！考えて作る楽しさを味わえるプログラミング玩具7選" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2020/02/eyecatch-teaching-material02-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2020/02/eyecatch-teaching-material02-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2020/02/eyecatch-teaching-material02-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2020/02/eyecatch-teaching-material02-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2020/02/eyecatch-teaching-material02-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2020/02/eyecatch-teaching-material02-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2020/02/eyecatch-teaching-material02-320x180.jpg 320w, https://living-maou.com/wp-content/uploads/2020/02/eyecatch-teaching-material02.jpg 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">学び好きな子に育つ！考えて作る楽しさを味わえるプログラミング玩具7選</div><div class="blogcard-snippet internal-blogcard-snippet">子ども向けのプログラミング教材やおもちゃは種類や難易度がさまざま。どれを選べばいいのか迷ってしまいませんか？【リビングの魔王】では年齢や興味関心に合わせて選ぶポイントや、おすすめの教材・おもちゃを紹介。プログラミング学習の参考にしてみてください。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<h2><span id="toc1">フィジカルプログラミング 3つのタイプ</span></h2>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2024/02/teaching-material-physical.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-6444" src="https://living-maou.com/wp-content/uploads/2024/02/teaching-material-physical.png" alt="" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2024/02/teaching-material-physical.png 800w, https://living-maou.com/wp-content/uploads/2024/02/teaching-material-physical-500x281.png 500w, https://living-maou.com/wp-content/uploads/2024/02/teaching-material-physical-300x169.png 300w, https://living-maou.com/wp-content/uploads/2024/02/teaching-material-physical-768x432.png 768w, https://living-maou.com/wp-content/uploads/2024/02/teaching-material-physical-120x68.png 120w, https://living-maou.com/wp-content/uploads/2024/02/teaching-material-physical-160x90.png 160w, https://living-maou.com/wp-content/uploads/2024/02/teaching-material-physical-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>フィジカルプログラミングのキットは、大きく3つのタイプに分けられます。</p>
<div class="blank-box bb-blue">
<ul>
<li>マイコンボードやシングルボードコンピュータなどの<a href="#type1">小さなコンピュータ</a></li>
<li>部品を組み立てプログラミングで制御する<a href="#type2">ロボット</a></li>
<li>プログラミングで制御できる<a href="#type3">おもちゃ</a></li>
</ul>
</div>
<p>各タイプの特徴とメリット・デメリットを紹介します。</p>
<p>&nbsp;</p>
<h3 id="type1"><span id="toc2">小さなコンピュータ</span></h3>
<p><b>マイコンボード</b>や<b>シングルボードコンピュータ</b>は、<span class="marker-under-red">手のひらに収まるサイズの小さなコンピュータ</span>です。</p>
<p><b>マイコンボード</b>は、LEDを光らせたりモーターを回したり、センサーをつないで周囲の温度や明るさを読み取ったりできます。</p>
<p>一方、<b>シングルボードコンピュータ</b>は、マウスやキーボード、ディスプレイをつないで、普通のパソコンのように使えるタイプです。</p>
<p>どちらもカスタマイズの自由度が高く、必要な機能を追加して自分だけの環境を作れます。<br />
ただし、見た目に華やかさがなく、子どもの興味を引きにくいかもしれません。</p>
<p><a href="#micom">↓おすすめの小さなコンピュータをみる</a></p>
<p>&nbsp;</p>
<h3 id="type2"><span id="toc3">ロボット</span></h3>
<p><b>ロボット</b>は、<span class="marker-under-red">組み立てからプログラミングまで体験できる学習用のキット</span>です。</p>
<p>組み立ての過程で機械の構造や動きの仕組みを学び、プログラミングでロボットを思い通りに動かす体験ができます。</p>
<p>カスタマイズの幅が広く、本格的な動きや複雑な動作を作れるのが特徴。<br />
ただし、組み立てには時間や集中力が必要なため、じっくり取り組むのが好きな子に向いています。</p>
<p>見た目に華やかで子どもの興味を引きやすい反面、価格は高めです。</p>
<p><a href="#robot">↓おすすめのロボットをみる</a></p>
<p>&nbsp;</p>
<h3 id="type3"><span id="toc4">プログラミングおもちゃ</span></h3>
<p><b>プログラミングおもちゃ</b>は、<span class="marker-under-red">プログラミングによって、おもちゃの動きを制御する</span>ことができます。</p>
<p>操作がかんたんで、小さな子でも始めやすいのが特徴です。</p>
<p>遊びの中でプログラミングを学ぶことができるので、プログラミングの楽しさを体験するのに適しています。</p>
<p>手軽さが魅力ですが、複雑な動きや本格的なプログラミング学習には向かない場合があります。</p>
<p><a href="#toy">↓おすすめのプログラミングおもちゃをみる</a></p>
<p>&nbsp;</p>
<h2 id="micom"><span id="toc5">おすすめ小さなコンピュータ</span></h2>
<p>おすすめの小さなコンピュータを紹介します。</p>
<div class="scrollable-table"><table>
<tbody>
<tr>
<th>プログラミング教材</th>
<th>対象年齢</th>
<th>特徴</th>
</tr>
<tr>
<td><a href="#microbit">micro:bit（マイクロビット）</a></td>
<td align="center">8歳～</td>
<td>BBCで開発された教育向けのマイコンボード</td>
</tr>
<tr>
<td><a href="#raspi">Raspberry Pi（ラズベリーパイ）</a></td>
<td align="center">8歳～</td>
<td>クレジットカードサイズのシングルボードコンピュータ</td>
</tr>
</tbody>
</table></div>
<p>&nbsp;</p>
<h3 id="microbit"><span id="toc6">micro:bit（マイクロビット）</span></h3>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2020/06/microbit_start01_06.jpg"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-633" src="https://living-maou.com/wp-content/uploads/2020/06/microbit_start01_06.jpg" alt="マイクロビット" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2020/06/microbit_start01_06.jpg 800w, https://living-maou.com/wp-content/uploads/2020/06/microbit_start01_06-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2020/06/microbit_start01_06-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2020/06/microbit_start01_06-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2020/06/microbit_start01_06-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2020/06/microbit_start01_06-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2020/06/microbit_start01_06-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p><a rel="nofollow noopener" target="_blank" href="//af.moshimo.com/af/c/click?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062&amp;url=https%3A%2F%2Fwww.amazon.co.jp%2Fdp%2FB08P4D3N8K">micro:bit（マイクロビット）<span class="fa fa-external-link external-icon anchor-icon"></span></a><img loading="lazy" decoding="async" style="border: 0px;" src="//i.moshimo.com/af/i/impression?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062" alt="" width="1" height="1" />は、英国放送協会(BBC)で開発された小さなコンピュータ。</p>
<p>LEDやボタン、温度センサー、加速度センサー、コンパスなどが最初から搭載されており、追加パーツなしでもいろいろな作品を作ることができます。</p>
<p data-start="218" data-end="290">プログラミングは、ブロックを組み合わせるタイプの「MakeCode」やPythonなどで可能。小学生からでも感覚的に扱いやすいのが特徴です。</p>
<p data-start="292" data-end="407">たとえば、LED画面を使って自分だけのミニゲームを作ったり、コンパス機能を使って宝探しゲームをしてみたり。<br />
ちょっとしたアイデアが、身近な遊びや日常を楽しく変えてくれます。</p>
<div class="blogcard-type bct-detail">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-matome/" title="micro:bit（マイクロビット）で出来ることと使い方まとめ" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2020/09/eyecatch_microbit_matome2206-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2020/09/eyecatch_microbit_matome2206-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2020/09/eyecatch_microbit_matome2206-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2020/09/eyecatch_microbit_matome2206-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2020/09/eyecatch_microbit_matome2206-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2020/09/eyecatch_microbit_matome2206-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2020/09/eyecatch_microbit_matome2206-320x180.jpg 320w, https://living-maou.com/wp-content/uploads/2020/09/eyecatch_microbit_matome2206.jpg 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">micro:bit（マイクロビット）で出来ることと使い方まとめ</div><div class="blogcard-snippet internal-blogcard-snippet">micro:bit（マイクロビット）で出来ることと使い方を紹介。この記事ではマイクロビットのセンサーなどの機能とその使い方を解説した記事をまとめました。【リビングの魔王】でこれまで紹介した作品も紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<!-- START MoshimoAffiliateEasyLink -->
<script type="text/javascript">
(function(b,c,f,g,a,d,e){b.MoshimoAffiliateObject=a;
b[a]=b[a]||function(){arguments.currentScript=c.currentScript
||c.scripts[c.scripts.length-2];(b[a].q=b[a].q||[]).push(arguments)};
c.getElementById(a)||(d=c.createElement(f),d.src=g,
d.id=a,e=c.getElementsByTagName("body")[0],e.appendChild(d))})
(window,document,"script","//dn.msmstatic.com/site/cardlink/bundle.js?20220329","msmaflink");
msmaflink({"n":"MICRO-BIT V2.21（マイクロビット）新バージョン名 技適取得済 正規品！","b":"BBC MICRO:BIT","t":"MEFV2S","d":"https:\/\/m.media-amazon.com","c_p":"\/images\/I","p":["\/31WHlhqwHsL._SL500_.jpg","\/31ZKF5TP+IL._SL500_.jpg","\/31JuMd8uObL._SL500_.jpg"],"u":{"u":"https:\/\/www.amazon.co.jp\/dp\/B08P4D3N8K","t":"amazon","r_v":""},"v":"2.1","b_l":[{"id":1,"u_tx":"Amazonで見る","u_bc":"#f79256","u_url":"https:\/\/www.amazon.co.jp\/dp\/B08P4D3N8K","a_id":1826192,"p_id":170,"pl_id":27060,"pc_id":185,"s_n":"amazon","u_so":1},{"id":16,"u_tx":"楽天市場で見る","u_bc":"#f76956","u_url":"https:\/\/search.rakuten.co.jp\/search\/mall\/MICRO-BIT%20V2.21%EF%BC%88%E3%83%9E%E3%82%A4%E3%82%AF%E3%83%AD%E3%83%93%E3%83%83%E3%83%88%EF%BC%89%E6%96%B0%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E5%90%8D%20%E6%8A%80%E9%81%A9%E5%8F%96%E5%BE%97%E6%B8%88%20%E6%AD%A3%E8%A6%8F%E5%93%81%EF%BC%81\/","a_id":1820957,"p_id":54,"pl_id":27059,"pc_id":54,"s_n":"rakuten","u_so":2},{"id":15,"u_tx":"Yahoo!ショッピングで見る","u_bc":"#66a7ff","u_url":"https:\/\/shopping.yahoo.co.jp\/search?first=1\u0026p=MICRO-BIT%20V2.21%EF%BC%88%E3%83%9E%E3%82%A4%E3%82%AF%E3%83%AD%E3%83%93%E3%83%83%E3%83%88%EF%BC%89%E6%96%B0%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E5%90%8D%20%E6%8A%80%E9%81%A9%E5%8F%96%E5%BE%97%E6%B8%88%20%E6%AD%A3%E8%A6%8F%E5%93%81%EF%BC%81","a_id":1832853,"p_id":1225,"pl_id":27061,"pc_id":1925,"s_n":"yahoo","u_so":3}],"eid":"OO8Ok","s":"s"});
</script>
<div id="msmaflink-OO8Ok">リンク</div>
<!-- MoshimoAffiliateEasyLink END -->
<h3 id="raspi"><span id="toc7">Raspberry Pi（ラズベリーパイ）</span></h3>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2024/05/raspberrypi4-jibunpc01-01.jpg"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2024/05/raspberrypi4-jibunpc01-01.jpg" alt="Raspberry Pi4 Model B" width="800" height="450" class="aligncenter size-full wp-image-6675" srcset="https://living-maou.com/wp-content/uploads/2024/05/raspberrypi4-jibunpc01-01.jpg 800w, https://living-maou.com/wp-content/uploads/2024/05/raspberrypi4-jibunpc01-01-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2024/05/raspberrypi4-jibunpc01-01-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2024/05/raspberrypi4-jibunpc01-01-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2024/05/raspberrypi4-jibunpc01-01-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2024/05/raspberrypi4-jibunpc01-01-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2024/05/raspberrypi4-jibunpc01-01-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p><a rel="nofollow noopener" target="_blank" href="//af.moshimo.com/af/c/click?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062&amp;url=https%3A%2F%2Fwww.amazon.co.jp%2Fdp%2FB07ZRF5BC1" referrerpolicy="no-referrer-when-downgrade">Raspberry Pi（ラズベリーパイ）<span class="fa fa-external-link external-icon anchor-icon"></span></a><img decoding="async" src="//i.moshimo.com/af/i/impression?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062" alt="" loading="lazy" width="1" height="1" style="border: none;" />は、イギリスのラズベリーパイ財団が開発した、クレジットカードサイズの小さなコンピュータです。</p>
<p data-start="170" data-end="275">Webブラウザやオフィスソフト、動画再生ソフトをインストールすれば、ふつうのパソコンのように使えて、ScratchやPythonでのプログラミングや、LED・センサーなどの電子部品を使った工作も楽しめます。</p>
<p data-start="277" data-end="387">組み立てや初期設定を通して、「ハード（機械）」と「ソフト（プログラム）」の両方をバランスよく学べるのが魅力です。</p>
<p data-start="277" data-end="387">ラスベリーパイで自分専用のパソコンを組み立ててマイクラを遊ぶ、といったワクワクする体験もできます。</p>
<div class="blogcard-type bct-detail">

<a rel="noopener" target="_self" href="https://living-maou.com/raspberrypi4-jibunpc01/" title="【Raspberry Pi】ラズベリーパイでジブン専用パソコン作ってみた（子供の科学）" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2024/05/eyecatch-raspberrypi4-jibunpc01-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2024/05/eyecatch-raspberrypi4-jibunpc01-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2024/05/eyecatch-raspberrypi4-jibunpc01-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2024/05/eyecatch-raspberrypi4-jibunpc01-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2024/05/eyecatch-raspberrypi4-jibunpc01-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2024/05/eyecatch-raspberrypi4-jibunpc01-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2024/05/eyecatch-raspberrypi4-jibunpc01-320x180.jpg 320w, https://living-maou.com/wp-content/uploads/2024/05/eyecatch-raspberrypi4-jibunpc01.jpg 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【Raspberry Pi】ラズベリーパイでジブン専用パソコン作ってみた（子供の科学）</div><div class="blogcard-snippet internal-blogcard-snippet">Raspberry Pi4 ModelBの組み立て方を紹介。【リビングの魔王】では『子供の科学』で紹介されている「ジブン専用パソコンキット3.5S」と同等の環境を作れるように、必要なものから組み立て方、設定手順までを、初心者にも分かりやすく紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<!-- START MoshimoAffiliateEasyLink -->
<script type="text/javascript">
(function(b,c,f,g,a,d,e){b.MoshimoAffiliateObject=a;
b[a]=b[a]||function(){arguments.currentScript=c.currentScript
||c.scripts[c.scripts.length-2];(b[a].q=b[a].q||[]).push(arguments)};
c.getElementById(a)||(d=c.createElement(f),d.src=g,
d.id=a,e=c.getElementsByTagName("body")[0],e.appendChild(d))})
(window,document,"script","//dn.msmstatic.com/site/cardlink/bundle.js?20220329","msmaflink");
msmaflink({"n":"【国内正規代理店品】Raspberry Pi4 ModelB 4GB ラズベリーパイ4 技適対応品【RS・OKdo版】","b":"Raspberry Pi","t":"Raspberry Pi 4 Model B 4GB","d":"https:\/\/m.media-amazon.com","c_p":"\/images\/I","p":["\/51ETv8Le3nL._SL500_.jpg","\/51HqZNH5TZL._SL500_.jpg","\/51516bJdm+L._SL500_.jpg","\/41YDrovi0lL._SL500_.jpg","\/516EIfbwvQL._SL500_.jpg"],"u":{"u":"https:\/\/www.amazon.co.jp\/dp\/B081YD3VL5","t":"amazon","r_v":""},"v":"2.1","b_l":[{"id":1,"u_tx":"Amazonで見る","u_bc":"#f79256","u_url":"https:\/\/www.amazon.co.jp\/dp\/B081YD3VL5","a_id":1826192,"p_id":170,"pl_id":27060,"pc_id":185,"s_n":"amazon","u_so":1},{"id":29,"u_tx":"楽天市場で見る","u_bc":"#f76956","u_url":"https:\/\/search.rakuten.co.jp\/search\/mall\/%E3%80%90%E5%9B%BD%E5%86%85%E6%AD%A3%E8%A6%8F%E4%BB%A3%E7%90%86%E5%BA%97%E5%93%81%E3%80%91Raspberry%20Pi4%20ModelB%204GB%20%E3%83%A9%E3%82%BA%E3%83%99%E3%83%AA%E3%83%BC%E3%83%91%E3%82%A44%20%E6%8A%80%E9%81%A9%E5%AF%BE%E5%BF%9C%E5%93%81%E3%80%90RS%E3%83%BBOKdo%E7%89%88%E3%80%91\/","a_id":1820957,"p_id":54,"pl_id":27059,"pc_id":54,"s_n":"rakuten","u_so":2},{"id":30,"u_tx":"Yahoo!ショッピングで見る","u_bc":"#66a7ff","u_url":"https:\/\/shopping.yahoo.co.jp\/search?first=1\u0026p=%E3%80%90%E5%9B%BD%E5%86%85%E6%AD%A3%E8%A6%8F%E4%BB%A3%E7%90%86%E5%BA%97%E5%93%81%E3%80%91Raspberry%20Pi4%20ModelB%204GB%20%E3%83%A9%E3%82%BA%E3%83%99%E3%83%AA%E3%83%BC%E3%83%91%E3%82%A44%20%E6%8A%80%E9%81%A9%E5%AF%BE%E5%BF%9C%E5%93%81%E3%80%90RS%E3%83%BBOKdo%E7%89%88%E3%80%91","a_id":1832853,"p_id":1225,"pl_id":27061,"pc_id":1925,"s_n":"yahoo","u_so":3}],"eid":"by9Sl","s":"s"});
</script>
<div id="msmaflink-by9Sl">リンク</div>
<!-- MoshimoAffiliateEasyLink END -->
<h2 id="robot"><span id="toc8">おすすめロボット</span></h2>
<p>おすすめのロボットを4つ紹介します。</p>
<div class="scrollable-table"><table>
<tbody>
<tr>
<th>プログラミング教材</th>
<th>対象年齢</th>
<th>特徴</th>
</tr>
<tr>
<td><a href="#lego1">レゴエデュケーション SPIKE ベーシック</a></td>
<td align="center">6歳～</td>
<td>レゴブロックを使ってSTEAM教育</td>
</tr>
<tr>
<td><a href="#embot">embot（エムボット）</a></td>
<td align="center">6歳～</td>
<td>ダンボールと電子部品を組み合わせてロボットを作る</td>
</tr>
<tr>
<td><a href="#koov">KOOV（クーブ）</a></td>
<td align="center">8歳～</td>
<td>ソニーが開発したプログラミング学習キット</td>
</tr>
<tr>
<td><a href="#mbot">mBot（エムボット）</a></td>
<td align="center">8歳～</td>
<td>プログラミングロボットおもちゃ</td>
</tr>
</tbody>
</table></div>
<p>&nbsp;</p>
<h3 id="lego1"><span id="toc9">レゴエデュケーション SPIKE ベーシック</span></h3>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2023/10/lego-spike-basic17.jpg"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-6382" src="https://living-maou.com/wp-content/uploads/2023/10/lego-spike-basic17.jpg" alt="レゴ エデュケーション SPIKE ベーシックの作品" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2023/10/lego-spike-basic17.jpg 800w, https://living-maou.com/wp-content/uploads/2023/10/lego-spike-basic17-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2023/10/lego-spike-basic17-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2023/10/lego-spike-basic17-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2023/10/lego-spike-basic17-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2023/10/lego-spike-basic17-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2023/10/lego-spike-basic17-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p><b>レゴ エデュケーション SPIKE シリーズ</b>は、レゴブロックとプログラミングを使って、STEAM（科学・技術・工学・数学・芸術）を学べるキットです。</p>
<p>ブロックの組み立て、プログラミングで動かしてみることで、子どもの創造性や論理的思考力を育むことができます。</p>
<p>「<a rel="nofollow noopener" target="_blank" href="https://af.moshimo.com/af/c/click?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062&amp;url=https%3A%2F%2Fwww.amazon.co.jp%2Fdp%2FB0CJQNYYXM">レゴ エデュケーションSPIKE ベーシック<span class="fa fa-external-link external-icon anchor-icon"></span></a><img loading="lazy" decoding="async" src="https://i.moshimo.com/af/i/impression?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062" alt="" width="1" height="1" />」は、小学校低学年から中学年向け。ScratchJrやScratchをベースにしたビジュアルプログラミングを採用しており、年齢や習熟度に合わせて進められます。</p>
<p>おなじみのレゴが、自分の指示どおりに動き出す瞬間は、とても気分がアガりますよ！</p>
<p>また、小学校高学年から中学生向けの「<a rel="nofollow noopener" target="_blank" href="https://af.moshimo.com/af/c/click?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062&amp;url=https%3A%2F%2Fwww.amazon.co.jp%2Fdp%2FB08L53WRNG">レゴ エデュケーションSPIKE プライム<span class="fa fa-external-link external-icon anchor-icon"></span></a><img loading="lazy" decoding="async" src="https://i.moshimo.com/af/i/impression?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062" alt="" width="1" height="1" />」もあります。</p>
<div class="blogcard-type bct-detail">

<a rel="noopener" target="_self" href="https://living-maou.com/lego-spikebasic-review/" title="「あ、レゴだ！」から始まるプログラミング学習【SPIKEベーシックレビュー】" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2023/10/eyecatch-lego-spike-basic-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2023/10/eyecatch-lego-spike-basic-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2023/10/eyecatch-lego-spike-basic-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2023/10/eyecatch-lego-spike-basic-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2023/10/eyecatch-lego-spike-basic-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2023/10/eyecatch-lego-spike-basic-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2023/10/eyecatch-lego-spike-basic-320x180.jpg 320w, https://living-maou.com/wp-content/uploads/2023/10/eyecatch-lego-spike-basic.jpg 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">「あ、レゴだ！」から始まるプログラミング学習【SPIKEベーシックレビュー】</div><div class="blogcard-snippet internal-blogcard-snippet">レゴエデュケーションSPIKEベーシックは、小学校低学年から始められるプログラミング学習キットです。【リビングの魔王】ではブロックの組み立てからプログラミングまで、実際に遊んで徹底レビューします。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<div class="micro-top micro-center">＼小学生向けのプログラミングキット／</div><!-- START MoshimoAffiliateEasyLink -->
<script type="text/javascript">
(function(b,c,f,g,a,d,e){b.MoshimoAffiliateObject=a;
b[a]=b[a]||function(){arguments.currentScript=c.currentScript
||c.scripts[c.scripts.length-2];(b[a].q=b[a].q||[]).push(arguments)};
c.getElementById(a)||(d=c.createElement(f),d.src=g,
d.id=a,e=c.getElementsByTagName("body")[0],e.appendChild(d))})
(window,document,"script","//dn.msmstatic.com/site/cardlink/bundle.js?20220329","msmaflink");
msmaflink({"n":"レゴ エデュケーション SPIKE スパイク ベーシック 45345 プログラミング教材 ナリカ E31-7810 LEGO","b":"レゴエデュケーション","t":"45345","d":"https:\/\/m.media-amazon.com","c_p":"\/images\/I","p":["\/51bNpBHizyL._SL500_.jpg","\/31QSKQwykiL._SL500_.jpg","\/31PYPGpTc7L._SL500_.jpg","\/316w-bqFzuL._SL500_.jpg"],"u":{"u":"https:\/\/www.amazon.co.jp\/dp\/B0CJQNYYXM","t":"amazon","r_v":""},"v":"2.1","b_l":[{"id":1,"u_tx":"Amazonで見る","u_bc":"#f79256","u_url":"https:\/\/www.amazon.co.jp\/dp\/B0CJQNYYXM","a_id":1826192,"p_id":170,"pl_id":27060,"pc_id":185,"s_n":"amazon","u_so":1},{"id":29,"u_tx":"楽天市場で見る","u_bc":"#f76956","u_url":"https:\/\/search.rakuten.co.jp\/search\/mall\/%E3%83%AC%E3%82%B4+%E3%82%A8%E3%83%87%E3%83%A5%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3+SPIKE+%E3%82%B9%E3%83%91%E3%82%A4%E3%82%AF+%E3%83%99%E3%83%BC%E3%82%B7%E3%83%83%E3%82%AF\/","a_id":1820957,"p_id":54,"pl_id":27059,"pc_id":54,"s_n":"rakuten","u_so":2},{"id":30,"u_tx":"Yahoo!ショッピングで見る","u_bc":"#66a7ff","u_url":"https:\/\/shopping.yahoo.co.jp\/search?area=13\u0026astk=\u0026aq=\u0026oq=\u0026first=1\u0026ss_first=1\u0026ts=1697678325\u0026mcr=cd8bc788abfe151a3522830d11d3589b\u0026sretry=1\u0026p=%E3%83%AC%E3%82%B4+%E3%82%A8%E3%83%87%E3%83%A5%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3+SPIKE+%E3%82%B9%E3%83%91%E3%82%A4%E3%82%AF+%E3%83%99%E3%83%BC%E3%82%B7%E3%83%83%E3%82%AF\u0026sc_i=shp_pc_search_searchBox_2","a_id":1832853,"p_id":1225,"pl_id":27061,"pc_id":1925,"s_n":"yahoo","u_so":3}],"eid":"mWjIv","s":"s"});
</script>
<div id="msmaflink-mWjIv">リンク</div>
<!-- MoshimoAffiliateEasyLink END -->
<h3 id="embot"><span id="toc10">embot（エムボット）</span></h3>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2020/07/embot_review_06.jpg"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-810" src="https://living-maou.com/wp-content/uploads/2020/07/embot_review_06.jpg" alt="embot" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2020/07/embot_review_06.jpg 800w, https://living-maou.com/wp-content/uploads/2020/07/embot_review_06-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2020/07/embot_review_06-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2020/07/embot_review_06-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2020/07/embot_review_06-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2020/07/embot_review_06-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2020/07/embot_review_06-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p><a rel="nofollow noopener" target="_blank" href="//af.moshimo.com/af/c/click?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062&amp;url=https%3A%2F%2Fwww.amazon.co.jp%2Fdp%2FB0CNR1LS37">embot（エムボット）<span class="fa fa-external-link external-icon anchor-icon"></span></a><img loading="lazy" decoding="async" style="border: none;" src="//i.moshimo.com/af/i/impression?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062" alt="" width="1" height="1" />とは、NTTドコモの新規事業から生まれたプログラミングロボットです。</p>
<p>ダンボールとモーターやLEDライトなどを組み合わせ、専用アプリを使って動かします。2023年12月にパワーアップした「embot+」はスピーカー搭載で遊び方がさらに広がりました。</p>
<p>付属のキット以外にも、紙コップや空き箱など身近な素材を使って遊びが広がるから、工作やデコレーションが好きな子にぴったりです。</p>
<p>下のレビュー記事は、2023年12月より前のバージョンのものです。</p>
<div class="blogcard-type bct-detail">

<a rel="noopener" target="_self" href="https://living-maou.com/embot-review/" title="【知育玩具】子ども向けプログラミングおもちゃembot（エムボット）レビュー" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2020/07/eyecatch_embot_review-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2020/07/eyecatch_embot_review-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2020/07/eyecatch_embot_review-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2020/07/eyecatch_embot_review-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2020/07/eyecatch_embot_review-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2020/07/eyecatch_embot_review-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2020/07/eyecatch_embot_review-320x180.jpg 320w, https://living-maou.com/wp-content/uploads/2020/07/eyecatch_embot_review.jpg 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【知育玩具】子ども向けプログラミングおもちゃembot（エムボット）レビュー</div><div class="blogcard-snippet internal-blogcard-snippet">embot（エムボット）は手ごろな価格でオリジナルロボットが作れるプログラミングおもちゃ。段階的にプログラミングを学べるので初心者にもオススメです。【リビングの魔王】ではembotの特徴や実際に作ってプログラミングしてみた感想を紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<!--
<div class="micro-top micro-center">＼Amazonブラックフライデー 25%OFF！／</div>
-->
<div class="micro-top micro-center">＼2023年12月「embot+」にパワーアップ！／</div><!-- START MoshimoAffiliateEasyLink -->
<script type="text/javascript">
(function(b,c,f,g,a,d,e){b.MoshimoAffiliateObject=a;
b[a]=b[a]||function(){arguments.currentScript=c.currentScript
||c.scripts[c.scripts.length-2];(b[a].q=b[a].q||[]).push(arguments)};
c.getElementById(a)||(d=c.createElement(f),d.src=g,
d.id=a,e=c.getElementsByTagName("body")[0],e.appendChild(d))})
(window,document,"script","//dn.msmstatic.com/site/cardlink/bundle.js?20220329","msmaflink");
msmaflink({"n":"embot+（エムボットプラス）スターターキット","b":"ノーブランド品","t":"em-0001","d":"https://m.media-amazon.com","c_p":"/images/I","p":["/51QcbTNsZEL._SL500_.jpg","/51c6pWJo-tL._SL500_.jpg","/51XqNpFj7WL._SL500_.jpg","/51m2CMdtpkL._SL500_.jpg","/41dH8sYYjSL._SL500_.jpg","/41o3RITm+lL._SL500_.jpg"],"u":{"u":"https://www.amazon.co.jp/dp/B0CNR1LS37","t":"amazon","r_v":""},"v":"2.1","b_l":[{"id":1,"u_tx":"Amazonで見る","u_bc":"#f79256","u_url":"https://www.amazon.co.jp/dp/B0CNR1LS37","a_id":1826192,"p_id":170,"pl_id":27060,"pc_id":185,"s_n":"amazon","u_so":1},{"id":29,"u_tx":"楽天市場で見る","u_bc":"#f76956","u_url":"https://search.rakuten.co.jp/search/mall/embot%2B%EF%BC%88%E3%82%A8%E3%83%A0%E3%83%9C%E3%83%83%E3%83%88%E3%83%97%E3%83%A9%E3%82%B9%EF%BC%89%E3%82%B9%E3%82%BF%E3%83%BC%E3%82%BF%E3%83%BC%E3%82%AD%E3%83%83%E3%83%88/","a_id":1820957,"p_id":54,"pl_id":27059,"pc_id":54,"s_n":"rakuten","u_so":2},{"id":30,"u_tx":"Yahoo!ショッピングで見る","u_bc":"#66a7ff","u_url":"https://shopping.yahoo.co.jp/search?first=1u0026p=embot%2B%EF%BC%88%E3%82%A8%E3%83%A0%E3%83%9C%E3%83%83%E3%83%88%E3%83%97%E3%83%A9%E3%82%B9%EF%BC%89%E3%82%B9%E3%82%BF%E3%83%BC%E3%82%BF%E3%83%BC%E3%82%AD%E3%83%83%E3%83%88","a_id":1832853,"p_id":1225,"pl_id":27061,"pc_id":1925,"s_n":"yahoo","u_so":3}],"eid":"eSFFD","s":"s"});
</script>
<div id="msmaflink-eSFFD">リンク</div><!-- MoshimoAffiliateEasyLink END -->
<div class="micro-bottom micro-center">スピーカーが新たに追加されました</div>
<h3 id="koov"><span id="toc11">KOOV（クーブ）</span></h3>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2023/02/koov-review29.jpg"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-5201" src="https://living-maou.com/wp-content/uploads/2023/02/koov-review29.jpg" alt="KOOVの学習コースで作れる作品例" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2023/02/koov-review29.jpg 800w, https://living-maou.com/wp-content/uploads/2023/02/koov-review29-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2023/02/koov-review29-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2023/02/koov-review29-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2023/02/koov-review29-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2023/02/koov-review29-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2023/02/koov-review29-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p><a rel="nofollow noopener" target="_blank" href="https://t.felmat.net/fmcl?ak=N10026Y.1.A144021K.Z81001U">KOOV（クーブ）<span class="fa fa-external-link external-icon anchor-icon"></span></a><img loading="lazy" decoding="async" src="https://t.felmat.net/fmimp/N10026Y.A144021K.Z81001U" width="1" height="1" alt="" style="border: none;" />は、ソニーが開発したロボット・プログラミング学習キット。</p>
<p>ブロックやセンサーなどの電子パーツを組み合わせてロボットを作成し、プログラミングで動きをつけます。</p>
<p>KOOVには専用アプリが用意されていて、プログラミングの方法やロボットのデザイン方法を学んだり、レシピを選んで作品を作ったりできます。</p>
<p>半透明のカラフルなブロックが美しく、組み立てるのが楽しくなります。レシピはロボットや乗り物だけでなく、動物もいっぱい。男の子だけでなく女の子も楽しめます。</p>
<p>作ったあとはインテリアとして飾っても映えますよ。</p>
<div class="blogcard-type bct-detail">

<a rel="noopener" target="_self" href="https://living-maou.com/koov-review/" title="かわいすぎてシェア不可避！ソニーのプログラミング教材「KOOV」レビュー" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2023/02/koov-eyecatch-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2023/02/koov-eyecatch-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2023/02/koov-eyecatch-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2023/02/koov-eyecatch-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2023/02/koov-eyecatch-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2023/02/koov-eyecatch-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2023/02/koov-eyecatch-320x180.jpg 320w, https://living-maou.com/wp-content/uploads/2023/02/koov-eyecatch.jpg 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">かわいすぎてシェア不可避！ソニーのプログラミング教材「KOOV」レビュー</div><div class="blogcard-snippet internal-blogcard-snippet">「KOOV（クーブ）」はソニーが開発した子ども向けのプログラミング教材。プログラミングやロボット製作の初心者でもかんたんに楽しめるキットです。【リビングの魔王】ではKOOVの特徴や使い方を徹底レビューします。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<!--
<div class="micro-top micro-center">＼Amazon ブラックフライデー 最大30%OFF！／
-->
<div class="micro-top micro-center">＼動物や乗り物など様々な形を表現できる！／
<!-- START MoshimoAffiliateEasyLink -->
<script type="text/javascript">
(function(b,c,f,g,a,d,e){b.MoshimoAffiliateObject=a;
b[a]=b[a]||function(){arguments.currentScript=c.currentScript
||c.scripts[c.scripts.length-2];(b[a].q=b[a].q||[]).push(arguments)};
c.getElementById(a)||(d=c.createElement(f),d.src=g,
d.id=a,e=c.getElementsByTagName("body")[0],e.appendChild(d))})
(window,document,"script","//dn.msmstatic.com/site/cardlink/bundle.js?20220329","msmaflink");
msmaflink({"n":"ソニー KOOV 子供/小学生 向け 電子 工作キット [ 楽しく 組み立て 、 プログラミング ロボット 工学 が 学べる 知育 玩具/おもちゃ ] 教育 ギフト 入学祝いに 人気 (エントリーキット)","b":"Ｋｏｏｖ","t":"EKV-070D","d":"https://m.media-amazon.com","c_p":"/images/I","p":["/41Kt6he+zzL._SL500_.jpg","/41hWERQZHXL._SL500_.jpg","/418TbeACvwL._SL500_.jpg","/41L9rGhhs6L._SL500_.jpg","/41UFEbj+y8L._SL500_.jpg","/41255Nb9QyL._SL500_.jpg","/41To3GDoulL._SL500_.jpg"],"u":{"u":"https://www.amazon.co.jp/dp/B0CYGR6XLV","t":"amazon","r_v":""},"v":"2.1","b_l":[{"id":1,"u_tx":"Amazonで見る","u_bc":"#f79256","u_url":"https://www.amazon.co.jp/dp/B0CYGR6XLV","a_id":1826192,"p_id":170,"pl_id":27060,"pc_id":185,"s_n":"amazon","u_so":1},{"id":29,"u_tx":"楽天市場で見る","u_bc":"#f76956","u_url":"https://search.rakuten.co.jp/search/mall/%E3%82%BD%E3%83%8B%E3%83%BC%20KOOV%20%E5%AD%90%E4%BE%9B%2F%E5%B0%8F%E5%AD%A6%E7%94%9F%20%E5%90%91%E3%81%91%20%E9%9B%BB%E5%AD%90%20%E5%B7%A5%E4%BD%9C%E3%82%AD%E3%83%83%E3%83%88%20%5B%20%E6%A5%BD%E3%81%97%E3%81%8F%20%E7%B5%84%E3%81%BF%E7%AB%8B%E3%81%A6%20%E3%80%81%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%20%E3%83%AD%E3%83%9C%E3%83%83%E3%83%88%20%E5%B7%A5%E5%AD%A6%20%E3%81%8C%20%E5%AD%A6%E3%81%B9%E3%82%8B%20%E7%9F%A5%E8%82%B2%20%E7%8E%A9%E5%85%B7%2F%E3%81%8A%E3%82%82%E3%81%A1%E3%82%83%20%5D%20%E6%95%99%E8%82%B2%20%E3%82%AE%E3%83%95%E3%83%88%20%E5%85%A5%E5%AD%A6%E7%A5%9D%E3%81%84%E3%81%AB%20%E4%BA%BA%E6%B0%97%20(%E3%82%A8%E3%83%B3%E3%83%88%E3%83%AA%E3%83%BC%E3%82%AD%E3%83%83%E3%83%88)/","a_id":1820957,"p_id":54,"pl_id":27059,"pc_id":54,"s_n":"rakuten","u_so":2},{"id":30,"u_tx":"Yahoo!ショッピングで見る","u_bc":"#66a7ff","u_url":"https://shopping.yahoo.co.jp/search?area=13u0026astk=u0026aq=u0026oq=u0026first=1u0026ss_first=1u0026ts=1713399952u0026mcr=635f33ec25c9a5b33c1340211c852716u0026p=%E3%82%BD%E3%83%8B%E3%83%BC+KOOVu0026sc_i=shopping-pc-web-result-item-h_srch-kwdu0026sretry=1","a_id":1832853,"p_id":1225,"pl_id":27061,"pc_id":1925,"s_n":"yahoo","u_so":3}],"eid":"FdD6x","s":"s"});
</script></div>
<div id="msmaflink-FdD6x">リンク</div>
<!-- MoshimoAffiliateEasyLink END -->
<h3><span id="toc12">mBot（エムボット）</span></h3>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2025/07/mbot-review01.jpg"><img loading="lazy" decoding="async" src="https://living-maou.com/wp-content/uploads/2025/07/mbot-review01.jpg" alt="mBot" width="800" height="450" class="aligncenter size-full wp-image-7642" srcset="https://living-maou.com/wp-content/uploads/2025/07/mbot-review01.jpg 800w, https://living-maou.com/wp-content/uploads/2025/07/mbot-review01-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2025/07/mbot-review01-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2025/07/mbot-review01-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2025/07/mbot-review01-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2025/07/mbot-review01-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2025/07/mbot-review01-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p><a rel="nofollow noopener" target="_blank" href="//af.moshimo.com/af/c/click?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062&amp;url=https%3A%2F%2Fwww.amazon.co.jp%2Fdp%2FB0BS6C99RT" referrerpolicy="no-referrer-when-downgrade">mBot（エムボット）<span class="fa fa-external-link external-icon anchor-icon"></span></a><img decoding="async" src="//i.moshimo.com/af/i/impression?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062" alt="" loading="lazy" width="1" height="1" style="border: none;" />は、電子工学・ロボット工学・プログラミングといった分野を、楽しく体験しながら学べるプログラミングロボットおもちゃです。</p>
<p>小学校低学年からでも比較的かんたんに組み立てられ、ロボットらしさがありつつも、かわいらしく親しみやすいデザイン。</p>
<p>完成したロボットは、リモコンやアプリ、プログラミングで自由に動かせます。</p>
<p>パーツもかなり充実しているのに1万円くらいと、手を出しやすい価格も魅力です。</p>
<p>ライントレースでコースを走らせたり、障害物の位置によって進む方向を変えるプログラムを作ったり。遊びながらセンサーやモーターの仕組みにも自然と興味が湧いてきます。</p>
<p>さらに、上位モデルの「<a rel="nofollow noopener" target="_blank" href="//af.moshimo.com/af/c/click?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062&amp;url=https%3A%2F%2Fwww.amazon.co.jp%2Fdp%2FB0919F9CKS" referrerpolicy="no-referrer-when-downgrade">mBot2<span class="fa fa-external-link external-icon anchor-icon"></span></a><img decoding="async" src="//i.moshimo.com/af/i/impression?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062" alt="" loading="lazy" width="1" height="1" style="border: none;" />」では、テキストプログラミングやAI・IoTの学習にもチャレンジできます。</p>
<div class="blogcard-type bct-detail">

<a rel="noopener" target="_self" href="https://living-maou.com/mbot-review/" title="【mBotレビュー】小学生のプログラミング・STEM入門にぴったり！楽しく学べるロボット" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2025/07/eyecatch-mbot-review-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2025/07/eyecatch-mbot-review-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2025/07/eyecatch-mbot-review-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2025/07/eyecatch-mbot-review-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2025/07/eyecatch-mbot-review-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2025/07/eyecatch-mbot-review-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2025/07/eyecatch-mbot-review-320x180.jpg 320w, https://living-maou.com/wp-content/uploads/2025/07/eyecatch-mbot-review.jpg 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【mBotレビュー】小学生のプログラミング・STEM入門にぴったり！楽しく学べるロボット</div><div class="blogcard-snippet internal-blogcard-snippet">mBot（エムボット）」は、Makeblock社が開発したプログラミング教材ロボット。家庭でSTEM教育やプログラミング学習を始めたい人にぴったりです。【リビングの魔王】では、実際に組み立て・操作して感じた特徴や使い方をわかりやすくレビューします。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<!-- START MoshimoAffiliateEasyLink --><script type="text/javascript">
(function(b,c,f,g,a,d,e){b.MoshimoAffiliateObject=a;
b[a]=b[a]||function(){arguments.currentScript=c.currentScript
||c.scripts[c.scripts.length-2];(b[a].q=b[a].q||[]).push(arguments)};
c.getElementById(a)||(d=c.createElement(f),d.src=g,
d.id=a,e=c.getElementsByTagName("body")[0],e.appendChild(d))})
(window,document,"script","//dn.msmstatic.com/site/cardlink/bundle.js?20220329","msmaflink");
msmaflink({"n":"Makeblock mBot プログラミング ロボット おもちゃ キット STEM 知育玩具 Scratch Arduino 初心者向けロボット工学 電子工学 コーディング プログラミング 勉強 8歳以上 子どものプレゼント","b":"Makeblock","t":"","d":"https:\/\/m.media-amazon.com","c_p":"\/images\/I","p":["\/51W8wFihzFL._SL500_.jpg","\/51rJ5-hr4gL._SL500_.jpg","\/51FaSF1GXtL._SL500_.jpg","\/51K7KXUjcOL._SL500_.jpg","\/51Dqdt6C5AL._SL500_.jpg","\/51d8baWnOwL._SL500_.jpg","\/51lmEcwCSuL._SL500_.jpg","\/51dPGdImdKL._SL500_.jpg"],"u":{"u":"https:\/\/www.amazon.co.jp\/dp\/B0BS6C99RT","t":"amazon","r_v":""},"v":"2.1","b_l":[{"id":1,"u_tx":"Amazonで見る","u_bc":"#f79256","u_url":"https:\/\/www.amazon.co.jp\/dp\/B0BS6C99RT","a_id":1826192,"p_id":170,"pl_id":27060,"pc_id":185,"s_n":"amazon","u_so":1},{"u_bc":"#f76956","u_tx":"楽天市場で見る","u_url":"https:\/\/search.rakuten.co.jp\/search\/mall\/Makeblock%20mBot%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%20%E3%83%AD%E3%83%9C%E3%83%83%E3%83%88%20%E3%81%8A%E3%82%82%E3%81%A1%E3%82%83%20%E3%82%AD%E3%83%83%E3%83%88%20STEM%20%E7%9F%A5%E8%82%B2%E7%8E%A9%E5%85%B7%20Scratch%20Arduino%20%E5%88%9D%E5%BF%83%E8%80%85%E5%90%91%E3%81%91%E3%83%AD%E3%83%9C%E3%83%83%E3%83%88%E5%B7%A5%E5%AD%A6%20%E9%9B%BB%E5%AD%90%E5%B7%A5%E5%AD%A6%20%E3%82%B3%E3%83%BC%E3%83%87%E3%82%A3%E3%83%B3%E3%82%B0%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%20%E5%8B%89%E5%BC%B7%208%E6%AD%B3%E4%BB%A5%E4%B8%8A%20%E5%AD%90%E3%81%A9%E3%82%82%E3%81%AE%E3%83%97%E3%83%AC%E3%82%BC%E3%83%B3%E3%83%88\/","s_n":"rakuten","u_so":2,"a_id":1820957,"p_id":54,"pc_id":54,"pl_id":27059,"id":33},{"u_bc":"#66a7ff","u_tx":"Yahoo!ショッピングで見る","u_url":"https:\/\/shopping.yahoo.co.jp\/search?first=1\u0026p=Makeblock%20mBot%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%20%E3%83%AD%E3%83%9C%E3%83%83%E3%83%88%20%E3%81%8A%E3%82%82%E3%81%A1%E3%82%83%20%E3%82%AD%E3%83%83%E3%83%88%20STEM%20%E7%9F%A5%E8%82%B2%E7%8E%A9%E5%85%B7%20Scratch%20Arduino%20%E5%88%9D%E5%BF%83%E8%80%85%E5%90%91%E3%81%91%E3%83%AD%E3%83%9C%E3%83%83%E3%83%88%E5%B7%A5%E5%AD%A6%20%E9%9B%BB%E5%AD%90%E5%B7%A5%E5%AD%A6%20%E3%82%B3%E3%83%BC%E3%83%87%E3%82%A3%E3%83%B3%E3%82%B0%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%20%E5%8B%89%E5%BC%B7%208%E6%AD%B3%E4%BB%A5%E4%B8%8A%20%E5%AD%90%E3%81%A9%E3%82%82%E3%81%AE%E3%83%97%E3%83%AC%E3%82%BC%E3%83%B3%E3%83%88","s_n":"yahoo","u_so":3,"a_id":1832853,"p_id":1225,"pc_id":1925,"pl_id":27061}],"eid":"NLi9j","s":"s"});
</script>
<div id="msmaflink-NLi9j">リンク</div>
<!-- MoshimoAffiliateEasyLink END -->
<h2 id="toy"><span id="toc13">おすすめプログラミングおもちゃ</span></h2>
<p>おすすめのプログラミングおもちゃを2つ紹介します。</p>
<div class="scrollable-table"><table>
<tbody>
<tr>
<th>プログラミング教材</th>
<th>対象年齢</th>
<th>特徴</th>
</tr>
<tr>
<td><a href="#mabeee">MaBeee（マビー）</a></td>
<td align="center">3歳～</td>
<td>電池につけて好きなおもちゃをコントロールできる</td>
</tr>
<tr>
<td><a href="#spheromini">Sphero Mini（スフィロミニ）</a></td>
<td align="center">8歳～</td>
<td>プログラミングできるボール型のロボット</td>
</tr>
</tbody>
</table></div>
<p>&nbsp;</p>
<h3 id="mabeee"><span id="toc14">MaBeee（マビー）</span></h3>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/11/MaBeee01.jpg"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4714" src="https://living-maou.com/wp-content/uploads/2022/11/MaBeee01.jpg" alt="MaBeeeの遊び方" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/11/MaBeee01.jpg 800w, https://living-maou.com/wp-content/uploads/2022/11/MaBeee01-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2022/11/MaBeee01-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2022/11/MaBeee01-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2022/11/MaBeee01-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2022/11/MaBeee01-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2022/11/MaBeee01-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p><a rel="nofollow noopener" target="_blank" href="//af.moshimo.com/af/c/click?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062&amp;url=https%3A%2F%2Fwww.amazon.co.jp%2Fdp%2FB074KC6Z7Y">MaBeee（マビー）<span class="fa fa-external-link external-icon anchor-icon"></span></a><img loading="lazy" decoding="async" style="border: 0px;" src="//i.moshimo.com/af/i/impression?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062" alt="" width="1" height="1" />は、単3の乾電池で動くおもちゃやライトなどを、専用アプリでコントロールできる乾電池型IoT製品です。</p>
<p>MaBeeeの中に単4電池を入れ、単3電池で動く製品に入れるだけで、コントロール可能に。</p>
<p>たとえば、プラレールやミニ四駆のスピードを変えて遊んだり、イルミネーションをプログラミングで点滅させておうちをパーティー会場に変身させたり。身近なおもちゃがぐっと楽しくなります。</p>
<p>単3電池で動くものであればOKなので、おもちゃと一緒に贈ると喜ばれそうです。</p>
<p>また、Scratch（スクラッチ）と接続することができるので、プログラミングの勉強にもなります。（Scratchに対応しているMaBeeeの型番は「MB-3003WB」のみです）</p>
<div class="blogcard-type bct-detail">

<a rel="noopener" target="_self" href="https://living-maou.com/mabeee-review/" title="【MaBeeeレビュー】お気に入りのおもちゃでプログラミングを学べる乾電池型IoT製品" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2022/11/eyecatch-MaBeee-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2022/11/eyecatch-MaBeee-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2022/11/eyecatch-MaBeee-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2022/11/eyecatch-MaBeee-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2022/11/eyecatch-MaBeee-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2022/11/eyecatch-MaBeee-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2022/11/eyecatch-MaBeee-320x180.jpg 320w, https://living-maou.com/wp-content/uploads/2022/11/eyecatch-MaBeee.jpg 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【MaBeeeレビュー】お気に入りのおもちゃでプログラミングを学べる乾電池型IoT製品</div><div class="blogcard-snippet internal-blogcard-snippet">「MaBeee（マビー）」は乾電池型IoT製品。単3の乾電池で動くおもちゃやライトなどを専用アプリ制御したり、Scratchでプログラミングして動かすことができます。【リビングの魔王】ではMaBeeeの使い方や遊び方についてレビューします。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<!-- START MoshimoAffiliateEasyLink -->
<script type="text/javascript">
(function(b,c,f,g,a,d,e){b.MoshimoAffiliateObject=a;
b[a]=b[a]||function(){arguments.currentScript=c.currentScript
||c.scripts[c.scripts.length-2];(b[a].q=b[a].q||[]).push(arguments)};
c.getElementById(a)||(d=c.createElement(f),d.src=g,
d.id=a,e=c.getElementsByTagName("body")[0],e.appendChild(d))})
(window,document,"script","//dn.msmstatic.com/site/cardlink/bundle.js?20220329","msmaflink");
msmaflink({"n":"ノバルス 乾電池型IoT 《MaBeee》 単3電池形状 1本入 MB-3003WB1","b":"ノバルス","t":"MB-3003WB1","d":"https:\/\/m.media-amazon.com","c_p":"\/images\/I","p":["\/31JA945rh-L._SL500_.jpg","\/41A9T1TaV5L._SL500_.jpg","\/51f0AxjLWTL._SL500_.jpg","\/51Y09pT3+mL._SL500_.jpg","\/51msFAoTf5L._SL500_.jpg","\/51YGYbgFNKL._SL500_.jpg","\/51xLaWITpJL._SL500_.jpg"],"u":{"u":"https:\/\/www.amazon.co.jp\/dp\/B074KC6Z7Y","t":"amazon","r_v":""},"v":"2.1","b_l":[{"id":1,"u_tx":"Amazonで見る","u_bc":"#f79256","u_url":"https:\/\/www.amazon.co.jp\/dp\/B074KC6Z7Y","a_id":1826192,"p_id":170,"pl_id":27060,"pc_id":185,"s_n":"amazon","u_so":1},{"id":25,"u_tx":"楽天市場で見る","u_bc":"#f76956","u_url":"https:\/\/search.rakuten.co.jp\/search\/mall\/%E3%83%8E%E3%83%90%E3%83%AB%E3%82%B9%20%E4%B9%BE%E9%9B%BB%E6%B1%A0%E5%9E%8BIoT%20%E3%80%8AMaBeee%E3%80%8B%20%E5%8D%983%E9%9B%BB%E6%B1%A0%E5%BD%A2%E7%8A%B6%201%E6%9C%AC%E5%85%A5%20MB-3003WB1\/","a_id":1820957,"p_id":54,"pl_id":27059,"pc_id":54,"s_n":"rakuten","u_so":2},{"id":26,"u_tx":"Yahoo!ショッピングで見る","u_bc":"#66a7ff","u_url":"https:\/\/shopping.yahoo.co.jp\/search?first=1\u0026p=%E3%83%8E%E3%83%90%E3%83%AB%E3%82%B9%20%E4%B9%BE%E9%9B%BB%E6%B1%A0%E5%9E%8BIoT%20%E3%80%8AMaBeee%E3%80%8B%20%E5%8D%983%E9%9B%BB%E6%B1%A0%E5%BD%A2%E7%8A%B6%201%E6%9C%AC%E5%85%A5%20MB-3003WB1","a_id":1832853,"p_id":1225,"pl_id":27061,"pc_id":1925,"s_n":"yahoo","u_so":3}],"eid":"u4rGJ","s":"s"});
</script>
<div id="msmaflink-u4rGJ">リンク</div>
<!-- MoshimoAffiliateEasyLink END -->
<h3 id="spheromini"><span id="toc15">Sphero Mini（スフィロミニ）</span></h3>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/09/sphero-mini-rev14.jpg"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4405" src="https://living-maou.com/wp-content/uploads/2022/09/sphero-mini-rev14.jpg" alt="sphero mini" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/09/sphero-mini-rev14.jpg 800w, https://living-maou.com/wp-content/uploads/2022/09/sphero-mini-rev14-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2022/09/sphero-mini-rev14-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2022/09/sphero-mini-rev14-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2022/09/sphero-mini-rev14-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2022/09/sphero-mini-rev14-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2022/09/sphero-mini-rev14-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p><a rel="nofollow noopener" target="_blank" href="//af.moshimo.com/af/c/click?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062&amp;url=https%3A%2F%2Fwww.amazon.co.jp%2Fdp%2FB072B6QVVW">Sphero Mini（スフィロミニ）<span class="fa fa-external-link external-icon anchor-icon"></span></a><img loading="lazy" decoding="async" style="border: 0px;" src="//i.moshimo.com/af/i/impression?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062" alt="" width="1" height="1" />は、スマホやタブレットから操作できる手のひらサイズの球体型ロボットです。</p>
<p>プログラミングは、ドロー（線を描く）、ブロック、テキスト(JavaScript)の3つの方法があり、子どもの年齢や習熟度に応じて選択可能。プログラミング初心者から上級者まで楽しめます。</p>
<p>スマホで操作して部屋の中を走らせたり、障害物コースを作ってタイムアタックをしたり、プログラミングで自動走行や光の色変化を設定したり。まるで小さなペットのように遊べます。</p>
<div class="blogcard-type bct-detail">

<a rel="noopener" target="_self" href="https://living-maou.com/spheromini-review/" title="【Sphero miniレビュー】プログラミング初心者から上級者まで楽しめる球体型ロボット" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2022/09/eyecatch-sphero-review-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2022/09/eyecatch-sphero-review-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2022/09/eyecatch-sphero-review-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2022/09/eyecatch-sphero-review-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2022/09/eyecatch-sphero-review-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2022/09/eyecatch-sphero-review-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2022/09/eyecatch-sphero-review-320x180.jpg 320w, https://living-maou.com/wp-content/uploads/2022/09/eyecatch-sphero-review.jpg 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【Sphero miniレビュー】プログラミング初心者から上級者まで楽しめる球体型ロボット</div><div class="blogcard-snippet internal-blogcard-snippet">「Sphero mini」は、6,000円前後で手に入る初心者向けのプログラミングロボット。おうちでプログラミングを学ぶのにピッタリの玩具です。【リビングの魔王】ではSphero miniの特徴や使い方をレビューします。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<!-- START MoshimoAffiliateEasyLink -->
<script type="text/javascript">
(function(b,c,f,g,a,d,e){b.MoshimoAffiliateObject=a;
b[a]=b[a]||function(){arguments.currentScript=c.currentScript
||c.scripts[c.scripts.length-2];(b[a].q=b[a].q||[]).push(arguments)};
c.getElementById(a)||(d=c.createElement(f),d.src=g,
d.id=a,e=c.getElementsByTagName("body")[0],e.appendChild(d))})
(window,document,"script","//dn.msmstatic.com/site/cardlink/bundle.js?20220329","msmaflink");
msmaflink({"n":"Sphero Mini 知育 \/ STEAM \/ おもちゃ \/ スマ ートトイ \/ プログラミングできるロボティックボール ブルー 【日本正規代理店品】","b":"Sphero","t":"M001BRW","d":"https:\/\/m.media-amazon.com","c_p":"\/images\/I","p":["\/31VEdYcG5kL._SL500_.jpg","\/41A1bymtCaL._SL500_.jpg","\/41vO9-2osDL._SL500_.jpg","\/518w+YIOQlL._SL500_.jpg","\/41IH7FcvGDL._SL500_.jpg","\/51JFb25n-rL._SL500_.jpg"],"u":{"u":"https:\/\/www.amazon.co.jp\/dp\/B072B6QVVW","t":"amazon","r_v":""},"v":"2.1","b_l":[{"id":1,"u_tx":"Amazonで見る","u_bc":"#f79256","u_url":"https:\/\/www.amazon.co.jp\/dp\/B072B6QVVW","a_id":1826192,"p_id":170,"pl_id":27060,"pc_id":185,"s_n":"amazon","u_so":1},{"id":23,"u_tx":"楽天市場で見る","u_bc":"#f76956","u_url":"https:\/\/search.rakuten.co.jp\/search\/mall\/Sphero%20Mini%20%E7%9F%A5%E8%82%B2%20%2F%20STEAM%20%2F%20%E3%81%8A%E3%82%82%E3%81%A1%E3%82%83%20%2F%20%E3%82%B9%E3%83%9E%20%E3%83%BC%E3%83%88%E3%83%88%E3%82%A4%20%2F%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%E3%81%A7%E3%81%8D%E3%82%8B%E3%83%AD%E3%83%9C%E3%83%86%E3%82%A3%E3%83%83%E3%82%AF%E3%83%9C%E3%83%BC%E3%83%AB%20%E3%83%96%E3%83%AB%E3%83%BC%20%E3%80%90%E6%97%A5%E6%9C%AC%E6%AD%A3%E8%A6%8F%E4%BB%A3%E7%90%86%E5%BA%97%E5%93%81%E3%80%91\/","a_id":1820957,"p_id":54,"pl_id":27059,"pc_id":54,"s_n":"rakuten","u_so":2},{"id":24,"u_tx":"Yahoo!ショッピングで見る","u_bc":"#66a7ff","u_url":"https:\/\/shopping.yahoo.co.jp\/search?first=1\u0026ss_first=1\u0026ts=1662111350\u0026mcr=04d906273ae077d8b040c0e11c05bc00\u0026area=13\u0026astk=\u0026aq=\u0026oq=\u0026p=Sphero+Mini\u0026sc_i=shp_pc_search_searchBox_2\u0026sretry=1","a_id":1832853,"p_id":1225,"pl_id":27061,"pc_id":1925,"s_n":"yahoo","u_so":3}],"eid":"nd8Wp","s":"s"});
</script>
<div id="msmaflink-nd8Wp">リンク</div>
<!-- MoshimoAffiliateEasyLink END -->
<h2><span id="toc16">まとめ</span></h2>
<p>小学生におすすめのフィジカルプログラミングキットを紹介しました。</p>
<p>フィジカルプログラミングは、ビジュアルプログラミングに比べて、プログラミングの結果が目に見える形で現れるため、プログラミングによってコンピュータがどのように動くか実感を持ちやすいです。</p>
<p>ただし、比較的高価なものも多く、部品も細かく紛失しやすいので管理に注意が必要です。</p>
<p>まずは、プログラミングの基礎を学べるキットから始め、だんだん難易度の高いものにチャレンジしていくとよいでしょう。</p>
<p>ぜひお子さんと一緒に遊ぶことからはじめて、プログラミングの楽しさや面白さを実感してみてくださいね。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://living-maou.com/teaching-material-physical/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【マイクロビット×MakeCode】ネコのおひるね（チュートリアル：Cat Napping）</title>
		<link>https://living-maou.com/microbit-tutorial12/</link>
					<comments>https://living-maou.com/microbit-tutorial12/#respond</comments>
		
		<dc:creator><![CDATA[メソ]]></dc:creator>
		<pubDate>Fri, 04 Nov 2022 01:48:32 +0000</pubDate>
				<category><![CDATA[micro:bit]]></category>
		<category><![CDATA[MakeCode]]></category>
		<guid isPermaLink="false">https://living-maou.com/?p=4581</guid>

					<description><![CDATA[この記事では、MakeCode for micro:bitのチュートリアル「ネコのおひるね（Cat Napping）」を解説かいせつします。 「ネコのおひるね（Cat Napping）」では、拡張かくちょう機能きのうのd [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/eyecatch-catnapping.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4582" src="https://living-maou.com/wp-content/uploads/2022/10/eyecatch-catnapping.png" alt="" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/eyecatch-catnapping.png 800w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-catnapping-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-catnapping-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-catnapping-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-catnapping-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-catnapping-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-catnapping-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>この記事では、MakeCode for micro:bitのチュートリアル<b>「ネコのおひるね（Cat Napping）」</b>を<ruby>解説<rt>かいせつ</rt></ruby>します。</p>
<p>「ネコのおひるね（Cat Napping）」では、<ruby>拡張<rt>かくちょう</rt></ruby><ruby>機能<rt>きのう</rt></ruby>の<b>datalogger</b>を使って、明るさと温度を<ruby>記録<rt>きろく</rt></ruby>するプログラムを作ります。</p>
<p>ネコのライチのために、おひるねスポットを<ruby>探<rt>さが</rt></ruby>してあげましょう！</p>
<div class="blank-box bb-tab bb-memo bb-red">※新しいバージョン(V2.0～)用のチュートリアルです。</div>
<p>&nbsp;</p>
<div class="blogcard-type bct-prev">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-tutorial11" title="【マイクロビット×MakeCode】おばけをふき飛ばせ！（チュートリアル：Blow Away）" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-160x90.png" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-320x180.png 320w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway.png 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット×MakeCode】おばけをふき飛ばせ！（チュートリアル：Blow Away）</div><div class="blogcard-snippet internal-blogcard-snippet">MakeCode for micro:bitのチュートリアル「Blow Away」について解説。マイクロビットのマイクを使ってオバケをふき飛ばすプログラムを作ります。【リビングの魔王】では初心者にも分かりやすいよう手順をひとつひとつ丁寧に紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<h2><span id="toc1">拡張機能「datalogger」とは</span></h2>
<p>今回使用する<ruby>拡張<rt>かくちょう</rt></ruby><ruby>機能<rt>きのう</rt></ruby><b>「datalogger」</b>では、マイクロビットを<b>データロガー</b>として使うことができるようになります。</p>
<p><span style="color: #ff0000;">新しいバージョン(V2.0～)のマイクロビットのみ<ruby>使用可能<rt>しようかのう</rt></ruby></span>です。</p>
<p><b>データロギング</b>は、<span class="marker-under-red">時間の<ruby>経過<rt>けいか</rt></ruby>にともなうデータの<ruby>記録<rt>きろく</rt></ruby></span>のこと。</p>
<p>センサーで<ruby>測定<rt>そくてい</rt></ruby>された<ruby>値<rt>ね</rt></ruby>をフラッシュメモリへ<ruby>記録<rt>きろく</rt></ruby>することができ、マイクロビットの<ruby>電源<rt>でんげん</rt></ruby>を切っても<ruby>記録<rt>きろく</rt></ruby>されたデータは<ruby>保持<rt>ほじ</rt></ruby>されます。</p>
<p>&nbsp;</p>
<p><ruby>記録<rt>きろく</rt></ruby>したデータをWebブラウザで開くと、<ruby>画像<rt>がぞう</rt></ruby>のような表が<ruby>表示<rt>ひょうじ</rt></ruby>されます。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping11.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4592" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping11.png" alt="MY_DATAをブラウザで開くと表が表示される。" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping11.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping11-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping11-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping11-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping11-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping11-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping11-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc2">チュートリアルを開始する</span></h2>
<p>MakeCode for micro:bitの<a rel="noopener" target="_blank" href="https://makecode.microbit.org/">ホーム画面<span class="fa fa-external-link external-icon anchor-icon"></span></a>を開きます。</p>
<p>チュートリアル<b>「Cat Napping」</b>を<ruby>選択<rt>せんたく</rt></ruby>し、ブロックの<b>「チュートリアルを開始」</b>をクリックしましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping01.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4583" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping01.png" alt="「Cat Napping」をはじめる" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping01.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping01-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping01-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping01-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping01-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping01-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping01-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc3">不要なブロックを消す</span></h2>
<p><span style="color: #1e90ff;"><b>「ずっと」</b></span>ブロックは今回使わないので消しましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-3467" src="https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02.png" alt="「ずっと」ブロックを消す" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02.png 800w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc4">変数「logging」を作成する</span></h2>
<p><ruby>変数<rt>へんすう</rt></ruby>カテゴリを<ruby>選<rt>えら</rt></ruby>んで<b>「<ruby>変数<rt>へんすう</rt></ruby>を<ruby>追加<rt>ついか</rt></ruby>する&#8230;」</b>をクリックし、<b>logging</b>という名前の<ruby>変数<rt>へんすう</rt></ruby>を作りましょう。</p>
<p><span style="color: #ff0000;"><b><ruby>変数<rt>へんすう</rt></ruby></b></span>とは、プログラムで使う数字や文字のようなデータを<ruby>一時的<rt>いちじてき</rt></ruby>に<ruby>保存<rt>ほぞん</rt></ruby>するための場所のこと。</p>
<p>よく<b>数字や文字を入れておく箱</b>と言われたりします。</p>
<p>くわしくは「<a rel="noopener" target="_self" href="https://living-maou.com/scratch-variable/"><ruby>変数<rt>へんすう</rt></ruby>とは？スクラッチ（Scratch）を使ってわかりやすく<ruby>解説<rt>かいせつ</rt></ruby><span class="fa fa-external-link internal-icon anchor-icon"></span></a>」で<ruby>解説<rt>かいせつ</rt></ruby>しています。</p>
<p>&nbsp;</p>
<h3><span id="toc5">変数「logging」はデータを記録しているかどうか表す</span></h3>
<p><ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「logging」</b></span>は、マイクロビットがデータを<b>「<ruby>記録<rt>きろく</rt></ruby>しているか」</b>または<b>「<ruby>記録<rt>きろく</rt></ruby>していないか」</b>表す<ruby>役割<rt>やくわり</rt></ruby>があります。</p>
<div class="blank-box bb-blue">
<ul>
<li><ruby>記録<rt>きろく</rt></ruby>している場合は<span style="color: #00a4a6;"><b>「真（しん）」</b></span>を<ruby>保存<rt>ほぞん</rt></ruby></li>
<li><ruby>記録<rt>きろく</rt></ruby>していない場合は<span style="color: #00a4a6;"><b>「偽（ぎ）」</b></span>を<ruby>保存<rt>ほぞん</rt></ruby></li>
</ul>
</div>
<p><span style="color: #ff0000;"><b>真（しん）</b></span>と<span style="color: #ff0000;"><b>偽（ぎ）</b></span>とは、かんたんにいうと、</p>
<ul>
<li><ruby>真<rt>しん</rt></ruby>はそうだよ</li>
<li><ruby>偽<rt>ぎ</rt></ruby>はちがうよ</li>
</ul>
<p>という意味。コインの表と<ruby>裏<rt>うら</rt></ruby>のような<ruby>関係<rt>かんけい</rt></ruby>です。</p>
<p><ruby>英語<rt>えいご</rt></ruby>で、<ruby>真<rt>しん</rt></ruby>はtrue、<ruby>偽<rt>ぎ</rt></ruby>はfalseと<ruby>表現<rt>ひょうげん</rt></ruby>されます。</p>
<p><ruby>真偽<rt>しんぎ</rt></ruby><ruby>値<rt>ち</rt></ruby>については「<a rel="noopener" target="_self" href="https://living-maou.com/scratch-logicaloperation/">【子ども向け】<ruby>論理<rt>ろんり</rt></ruby><ruby>演算<rt>えんざん</rt></ruby>（かつ・または・ではない）とは？スクラッチ(Scratch)を使って<ruby>解説<rt>かいせつ</rt></ruby><span class="fa fa-external-link internal-icon anchor-icon"></span></a>」でくわしく<ruby>解説<rt>かいせつ</rt></ruby>しています。</p>
<p>&nbsp;</p>
<h3><span id="toc6">変数「logging」の初期値を設定する</span></h3>
<p><ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「logging」</b></span>を<ruby>作成<rt>さくせい</rt></ruby>したら、<ruby>変数<rt>へんすう</rt></ruby>カテゴリから<span style="color: #dc143c;"><b>「<ruby>変数<rt>へんすう</rt></ruby> logging を 0 にする」</b></span>ブロックを出し、<span style="color: #1e90ff;"><b>「<ruby>最初<rt>さいしょ</rt></ruby>だけ」</b></span>ブロックの中に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><ruby>最初<rt>さいしょ</rt></ruby>は「<ruby>記録<rt>きろく</rt></ruby>していない」<ruby>状態<rt>じょうたい</rt></ruby>にしたいので、<ruby>論理<rt>ろんり</rt></ruby>カテゴリから<span style="color: #00a4a6;"><b>「<ruby>偽<rt>ぎ</rt></ruby>」</b></span>ブロックを出し、<span style="color: #dc143c;"><b>「<ruby>変数<rt>へんすう</rt></ruby> logging を 0 にする」</b></span>ブロックの 0 の部分に<ruby>配置<rt>はいち</rt></ruby>しましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping02.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4584" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping02.png" alt="変数「logging」を作成する" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping02.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping02-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping02-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping02-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping02-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping02-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping02-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc7">Aボタンをスイッチにする</span></h2>
<p>Aボタンを<ruby>記録<rt>きろく</rt></ruby>の開始／<ruby>停止<rt>ていし</rt></ruby>のスイッチにします。</p>
<p>入力カテゴリから<span style="color: #d400d4;"><b>「ボタンAが<ruby>押<rt>お</rt></ruby>されたとき」</b></span>ブロックを出し、プログラミングエリアに<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><ruby>変数<rt>へんすう</rt></ruby>カテゴリから<span style="color: #dc143c;"><b>「<ruby>変数<rt>へんすう</rt></ruby> logging を 0 にする」</b></span>ブロックを出し、<span style="color: #d400d4;"><b>「ボタンAが<ruby>押<rt>お</rt></ruby>されたとき」</b></span>ブロックの中に<ruby>配置<rt>はいち</rt></ruby>しましょう。</p>
<p><ruby>論理<rt>ろんり</rt></ruby>カテゴリから<span style="color: #00a4a6;"><b>「ではない」</b></span>ブロックを出し、<span style="color: #dc143c;"><b>「<ruby>変数<rt>へんすう</rt></ruby> logging を 0 にする」</b></span>ブロックの 0 の部分に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><ruby>変数<rt>へんすう</rt></ruby>カテゴリから<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「logging」</b></span>ブロックを出し、<span style="color: #00a4a6;"><b>「ではない」</b></span>ブロックの空いている部分に<ruby>配置<rt>はいち</rt></ruby>しましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping03.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4585" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping03.png" alt="Aボタンをスイッチにする" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping03.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping03-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping03-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping03-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping03-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping03-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping03-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>これでAボタンをおすたびに、<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「logging」</b></span>が<ruby>逆<rt>ぎゃく</rt></ruby>の<ruby>値<rt>あたい</rt></ruby>（真⇔<ruby>偽<rt>ぎ</rt></ruby>）に<ruby>変<rt>か</rt></ruby>わります。</p>
<p>&nbsp;</p>
<h2><span id="toc8">インジケータを作る</span></h2>
<p>人間が見てデータを<ruby>記録<rt>きろく</rt></ruby>中であることが分かった方が<ruby>便利<rt>べんり</rt></ruby>ですよね。</p>
<p>LED画面とスピーカーを使ってインジケータを作りましょう。<b>インジケータ</b>とは、<span class="marker-under-red">動作<ruby>状態<rt>じょうたい</rt></ruby>を表す<ruby>装置<rt>そうち</rt></ruby>や<ruby>機能<rt>きのう</rt></ruby></span>のことです。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping04.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4586" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping04.png" alt="インジケータを作る" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping04.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping04-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping04-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping04-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping04-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping04-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping04-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h3><span id="toc9">もし記録中なら／でなければ</span></h3>
<p><ruby>論理<rt>ろんり</rt></ruby>カテゴリから<span style="color: #00a4a6;"><b>「もし&lt;真&gt;なら／でなければ」</b></span>ブロックを出し、<span style="color: #dc143c;"><b>「<ruby>変数<rt>へんすう</rt></ruby> logging を loggingではない にする」</b></span>の下に<ruby>配置<rt>はいち</rt></ruby>しましょう。</p>
<p><ruby>変数<rt>へんすう</rt></ruby>カテゴリの<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「logging」</b></span>を出し、<span style="color: #00a4a6;"><b>「もし&lt;真&gt;なら／でなければ」</b></span>ブロックの&lt;真&gt;の部分に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>&nbsp;</p>
<p><b>「もし logging なら」</b>という<ruby>条件<rt>じょうけん</rt></ruby>は、<b>「<ruby>変数<rt>へんすう</rt></ruby>「logging」が真なら」</b>と同じ意味です。</p>
<p><span style="color: #00a4a6;"><b>「もし&lt;真&gt;なら／でなければ」</b></span>は、もし<ruby>条件<rt>じょうけん</rt></ruby>が正しい（真）場合「なら」の下にある<ruby>命令<rt>めいれい</rt></ruby>を実行し、正しくない（<ruby>偽<rt>ぎ</rt></ruby>）場合は<b>「でなければ」</b>の下にある<ruby>命令<rt>めいれい</rt></ruby>を実行するブロック。</p>
<p>なので<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「logging」</b></span>の<ruby>値<rt>あたい</rt></ruby>が<b>真</b>の場合、<b>「なら」</b>の下にある<ruby>命令<rt>めいれい</rt></ruby>が実行されます。</p>
<p>&nbsp;</p>
<h3><span id="toc10">記録中はLED画面にアイコンを表示する</span></h3>
<p><ruby>記録<rt>きろく</rt></ruby>中は、LED画面にアイコンを<ruby>表示<rt>ひょうじ</rt></ruby>します。</p>
<p><ruby>基本<rt>きほん</rt></ruby>カテゴリから<span style="color: #1e90ff;"><b>「アイコンを<ruby>表示<rt>ひょうじ</rt></ruby>」</b></span>ブロックを出し、<span style="color: #00a4a6;"><b>「もし logging なら／でなければ」</b></span>ブロックの「もし logging なら」の下に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>アイコンは太陽に<ruby>似<rt>に</rt></ruby>ている「まと」を<ruby>選<rt>えら</rt></ruby>びましょう。</p>
<p>&nbsp;</p>
<h3><span id="toc11">記録を開始した時音を鳴らす</span></h3>
<p><ruby>記録<rt>きろく</rt></ruby>を開始した時、音を鳴らしてお知らせしましょう。</p>
<p>音楽カテゴリから<span style="color: #e63022;"><b>「play sound くすくす<ruby>笑<rt>わら</rt></ruby>う until done」</b></span>ブロックを出し、<span style="color: #1e90ff;"><b>「アイコンを<ruby>表示<rt>ひょうじ</rt></ruby>」</b></span>ブロックの下に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>鳴らす音は「くすくす<ruby>笑<rt>わら</rt></ruby>う」から「ハロー」に<ruby>変更<rt>へんこう</rt></ruby>します。</p>
<p>&nbsp;</p>
<h3><span id="toc12">記録をしていない時は表示を消す</span></h3>
<p><ruby>記録<rt>きろく</rt></ruby>をしていない時は、LED<ruby>表示<rt>ひょうじ</rt></ruby>を消しましょう。</p>
<p><ruby>基本<rt>きほん</rt></ruby>カテゴリから<span style="color: #1e90ff;"><b>「<ruby>表示<rt>ひょうじ</rt></ruby>を消す」</b></span>ブロックを出し、<span style="color: #00a4a6;"><b>「もし logging なら／でなければ」</b></span>ブロックの「でなければ」の下に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>&nbsp;</p>
<h2><span id="toc13">1分ごとにデータを記録する</span></h2>
<p>フラッシュストレージ（<ruby>保存<rt>ほぞん</rt></ruby>する場所）がいっぱいにならないように、<span class="marker-under-red">1分ごとにデータを<ruby>記録<rt>きろく</rt></ruby></span>するようにします。</p>
<p>ループカテゴリから<span style="color: #00aa00;"><b>「every 500 ms」</b></span>ブロックを出し、プログラミングエリアに<ruby>配置<rt>はいち</rt></ruby>しましょう。</p>
<p>待ち時間は「500」ms から「60000」msに<ruby>変<rt>か</rt></ruby>えます。1minute（1分）を<ruby>選<rt>えら</rt></ruby>ぶと<ruby>自動的<rt>じどうてき</rt></ruby>に60000に<ruby>変更<rt>へんこう</rt></ruby>されます。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping05.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4588" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping05.png" alt="「every 500 ms」ブロック" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping05.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping05-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping05-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping05-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping05-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping05-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping05-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<div class="blank-box bb-tab bb-memo bb-blue"><span style="color: #00aa00;"><b>「every 500 ms」ブロック</b></span><br />
指定した時間（ミリ秒）ごとに、中に<ruby>配置<rt>はいち</rt></ruby>したプログラムを実行します。<br />
1ミリ秒は1,000分の1秒です。</div>
<p>&nbsp;</p>
<p><span class="marker-under-red"><ruby>記録<rt>きろく</rt></ruby>中（loggingが真）のときだけ<ruby>記録<rt>きろく</rt></ruby>したい</span>です。</p>
<p><ruby>論理<rt>ろんり</rt></ruby>カテゴリから<span style="color: #00a4a6;"><b>「もし&lt;真&gt;なら」</b></span>ブロックを<span style="color: #00aa00;"><b>「every 60000 ms」</b></span>の中に<ruby>配置<rt>はいち</rt></ruby>し、<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「logging」</b></span>を<span style="color: #00a4a6;"><b>「もし&lt;真&gt;なら」</b></span>ブロックの&lt;真&gt;の部分に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping06.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4587" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping06.png" alt="1分ごとにデータを記録する" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping06.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping06-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping06-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping06-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping06-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping06-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping06-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc14">温度と明るさを記録する</span></h2>
<p>Data Loggerカテゴリから<span style="color: #378273;"><b>「log data colmn &#8221; &#8221; value 0」</b></span>ブロックを出し<span style="color: #00a4a6;"><b>「もし logging なら」</b></span>ブロックの中に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>columnの後ろの&#8221;&#8221;をクリックして、&#8221;temp&#8221;と入力します。tempは温度という意味。</p>
<p>入力カテゴリから<span style="color: #d400d4;"><b>「温度（℃）」</b></span>ブロックを出し、valueの後ろの0の部分に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>同じように、明るさも<ruby>記録<rt>きろく</rt></ruby>しましょう。</p>
<p><span style="color: #378273;"><b>「log data colmn &#8220;temp&#8221; value 温度（℃）」</b></span>ブロックの<ruby>右側<rt>みぎがわ</rt></ruby>にある「＋」をクリックすると、新しい行が<ruby>追加<rt>ついか</rt></ruby>されます。</p>
<p>columnの後ろの&#8221;&#8221;をクリックして、&#8221;light&#8221;と入力します。lightは光という意味。</p>
<p>入力カテゴリから<span style="color: #d400d4;"><b>「明るさ」</b></span>ブロックを出し、valueの後ろの0の部分に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping08.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4589" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping08.png" alt="温度と明るさを記録する" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping08.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping08-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping08-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping08-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping08-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping08-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping08-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<div class="blank-box bb-tab bb-memo bb-blue"><b><span style="color: #378273;">「log data colmn &#8221; &#8221; value 0」</span>ブロック</b><br />
フフラッシュストレージにデータを<ruby>記録<rt>きろく</rt></ruby>する。<br />
・column：列の見出しになる文字列<br />
・value：<ruby>記録<rt>きろく</rt></ruby>する<ruby>値<rt>あたい</rt></ruby></div>
<p>&nbsp;</p>
<h2><span id="toc15">シミュレーターで確認する</span></h2>
<p>シミュレーターで作ったプログラムを<ruby>試<rt>ため</rt></ruby>してみましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping09.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4590" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping09.png" alt="「Show data シミュレーター」ボタンで記録を見る" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping09.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping09-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping09-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping09-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping09-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping09-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping09-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>Aボタンをおして、データの<ruby>記録<rt>きろく</rt></ruby>を開始してみてください。</p>
<p><b>「Show data シミュレーター」</b>ボタンをクリックすると、<ruby>記録<rt>きろく</rt></ruby>したデータを見られます。</p>
<p>timeは<ruby>電源<rt>でんげん</rt></ruby>が入ってから<ruby>経過<rt>けいか</rt></ruby>した時間（秒）を表していて、tempとlightはcolumnで指定した文字列です。温度と明るさが<ruby>記録<rt>きろく</rt></ruby>されています。</p>
<p><b>「←<ruby>戻<rt>もど</rt></ruby>る」</b>ボタンでプログラミングの画面にもどります。</p>
<p>&nbsp;</p>
<h2><span id="toc16">マイクロビットにプログラムを転送する</span></h2>
<p>シミュレーターで正しく動くことを<ruby>確認<rt>かくにん</rt></ruby>できたら、マイクロビットに転送して動かしてみましょう。</p>
<p>マイクロビットにプログラムを転送する<ruby>方法<rt>ほうほう</rt></ruby>は「<a rel="noopener" target="_self" href="https://living-maou.com/microbit-usb-connection/">【マイクロビット】パソコンとのつなぎ方・外し方、プログラムの転送<ruby>方法<rt>ほうほう</rt></ruby><span class="fa fa-external-link internal-icon anchor-icon"></span></a>」でくわしく<ruby>紹介<rt>しょうかい</rt></ruby>しています。</p>
<p>Aボタンをおして、データの<ruby>記録<rt>きろく</rt></ruby>を開始してみてください。</p>
<p>1時間ぐらい<ruby>放置<rt>ほうち</rt></ruby>した後、もう一度Aボタンをおしてデータの<ruby>記録<rt>きろく</rt></ruby>を<ruby>停止<rt>ていし</rt></ruby>します。</p>
<p>&nbsp;</p>
<h2><span id="toc17">記録したデータを確認する</span></h2>
<p><ruby>記録<rt>きろく</rt></ruby>したデータを見てみましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping10.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4591" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping10.png" alt="MY_DATAファイル" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping10.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping10-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping10-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping10-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping10-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping10-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping10-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>USBケーブルでマイクロビットとパソコンをつなぐと、<b>「MICROBIT」</b>ドライブが<ruby>表示<rt>ひょうじ</rt></ruby>されます。</p>
<p>その中に、<b>MY_DATA</b>というファイルができているはずです。</p>
<p>MY_DATAをダブルクリックしてウェブブラウザ（ChromeやEgeなど）で開くと、データの入った表が<ruby>表示<rt>ひょうじ</rt></ruby>されます。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping11.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4592" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping11.png" alt="MY_DATAをブラウザで開くと表が表示される。" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping11.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping11-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping11-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping11-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping11-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping11-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping11-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<div class="blank-box bb-blue">
<ul>
<li>Downloadボタン：データを CSV (カンマ区切り値) ファイルとしてダウンロードする。</li>
<li>Copyボタン：データをコピーする。スプレッドシート（Excel、Google Sheets、Apple Numbers など）に<ruby>直接<rt>ちょくせつ</rt></ruby><ruby>貼<rt>は</rt></ruby>り<ruby>付<rt>つ</rt></ruby>けることができる。</li>
</ul>
</div>
<p>&nbsp;</p>
<h2><span id="toc18">まとめ</span></h2>
<p>チュートリアル<b>「ネコのおひるね（Cat Napping）」</b>について<ruby>紹介<rt>しょうかい</rt></ruby>しました。</p>
<p>家の中で一番日当たりがよくて、一番<ruby>暖<rt>あたた</rt></ruby>かい場所を<ruby>探<rt>さが</rt></ruby>して、ライチの<ruby>日向<rt>ひなた</rt></ruby>ぼっこスポットを<ruby>探<rt>さが</rt></ruby>してみてくださいね。</p>
<h3><span id="toc19">今回使用したブロック</span></h3>
<div class="blank-box bb-blue">
<ul>
<li><b><span style="color: #00aa00;">「every 500 ms」</span>ブロック</b><br />
指定した時間（ミリ秒）ごとに、中に<ruby>配置<rt>はいち</rt></ruby>したプログラムを実行します。<br />
1ミリ秒は1,000分の1秒です。<br />
<em>　</em></li>
<li><b><span style="color: #378273;">「log data colmn &#8221; &#8221; value 0」</span>ブロック</b><br />
フラッシュストレージにデータを<ruby>記録<rt>きろく</rt></ruby>する。<br />
column：列の見出しになる文字列<br />
value：<ruby>記録<rt>きろく</rt></ruby>する<ruby>値<rt>あたい</rt></ruby></li>
</ul>
</div>
<p>&nbsp;</p>
<h3><span id="toc20">拡張機能「datalogger」</span></h3>
<p><ruby>拡張<rt>かくちょう</rt></ruby><ruby>機能<rt>きのう</rt></ruby>「datalogger」は、マイクロビットをデータロガーとして使うことができるようになります。</p>
<p>ツールボックスにある「＋<ruby>拡張<rt>かくちょう</rt></ruby><ruby>機能<rt>きのう</rt></ruby>」をクリックし「datalogger」を<ruby>選択<rt>せんたく</rt></ruby>。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping12.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4593" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping12.png" alt="拡張機能「datalogger」" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping12.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping12-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping12-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping12-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping12-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping12-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping12-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>ツールボックスに「Data Logger」カテゴリが追加されます。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping13.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4594" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping13.png" alt="「Data Logger」のブロック" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping13.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping13-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping13-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping13-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping13-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping13-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-catnapping13-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<div class="blank-box bb-blue">
<ul>
<li><b><span style="color: #378273;">「set columns &#8221; &#8220;」</span>ブロック</b><br />
今後のデータロギングに<ruby>必要<rt>ひつよう</rt></ruby>な列の見出しを<ruby>設定<rt>せってい</rt></ruby>します。<br />
<em>　</em></li>
<li><b><span style="color: #378273;">「delete log」</span>ブロック</b><br />
列の見出しをふくめて、<ruby>記録<rt>きろく</rt></ruby>をすべて消します。<br />
<em>　</em></li>
<li><b><span style="color: #378273;">「on log full」</span>ブロック</b><br />
データログがいっぱいになったとき、中にあるプログラムを実行します。</li>
</ul>
</div>
<p>マイクロビットから<ruby>記録<rt>きろく</rt></ruby>したデータを消したい場合は、プログラム上で<b><span style="color: #378273;">「delete log」</span></b>ブロックを使って消すか、プログラムをもう一度ダウンロードすることで消せます。</p>
<p>データログがいっぱいになった時の<ruby>対処<rt>たいしょ</rt></ruby><ruby>方法<rt>ほうほう</rt></ruby>もプログラムすることができますよ。</p>
<p>マイクロビット公式「<a rel="noopener" target="_blank" href="https://microbit.org/get-started/user-guide/data-logging/">micro:bitによるデータロギング<span class="fa fa-external-link external-icon anchor-icon"></span></a>」</p>
<p>&nbsp;</p>
<div class="blogcard-type bct-related">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-tutorial00/" title="【マイクロビット×MakeCode】チュートリアルでプログラミングの練習をしよう！" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2022/06/eyecatch-microbit_tutorial-160x90.png" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2022/06/eyecatch-microbit_tutorial-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/06/eyecatch-microbit_tutorial-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/06/eyecatch-microbit_tutorial-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/06/eyecatch-microbit_tutorial-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/06/eyecatch-microbit_tutorial-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/06/eyecatch-microbit_tutorial-320x180.png 320w, https://living-maou.com/wp-content/uploads/2022/06/eyecatch-microbit_tutorial.png 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット×MakeCode】チュートリアルでプログラミングの練習をしよう！</div><div class="blogcard-snippet internal-blogcard-snippet">MakeCode for micro:bitのチュートリアルを解説した記事のまとめ。【リビングの魔王】では説明が英語で心が折れそう、プログラムの内容をもっとくわしく解説してほしいという人のために、チュートリアルの内容や手順を丁寧に解説します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://living-maou.com/microbit-tutorial12/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【マイクロビット×MakeCode】おばけをふき飛ばせ！（チュートリアル：Blow Away）</title>
		<link>https://living-maou.com/microbit-tutorial11/</link>
					<comments>https://living-maou.com/microbit-tutorial11/#respond</comments>
		
		<dc:creator><![CDATA[メソ]]></dc:creator>
		<pubDate>Wed, 05 Oct 2022 01:08:37 +0000</pubDate>
				<category><![CDATA[micro:bit]]></category>
		<category><![CDATA[MakeCode]]></category>
		<guid isPermaLink="false">https://living-maou.com/?p=4477</guid>

					<description><![CDATA[この記事では、MakeCode for micro:bitのチュートリアル「おばけをふき飛とばせ！（Blow Away）」を解説かいせつします。 マイクロビットに取りついたオバケをふき飛とばすプログラムを作りながら、マイ [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4478" src="https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway.png" alt="" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway.png 800w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>この記事では、MakeCode for micro:bitのチュートリアル<b>「おばけをふき<ruby>飛<rt>と</rt></ruby>ばせ！（Blow Away）」</b>を<ruby>解説<rt>かいせつ</rt></ruby>します。</p>
<p>マイクロビットに取りついたオバケをふき<ruby>飛<rt>と</rt></ruby>ばすプログラムを作りながら、マイクの使い方や、<ruby>好<rt>す</rt></ruby>きな場所のLEDを<ruby>点<rt>つ</rt></ruby>けたり消したりする<ruby>方法<rt>ほうほう</rt></ruby>を学びます。</p>
<div class="blank-box bb-tab bb-memo bb-red">※新しいバージョン(V2.0～)用のチュートリアルです。</div>
<p>&nbsp;</p>
<div class="blogcard-type bct-prev">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-tutorial10" title="【マイクロビット×MakeCode】クラップライト（チュートリアル：Clap Lights）" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-160x90.png" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-320x180.png 320w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights.png 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット×MakeCode】クラップライト（チュートリアル：Clap Lights）</div><div class="blogcard-snippet internal-blogcard-snippet">MakeCode for micro:bitのチュートリアル「クラップライト（Clap Lights）」について解説。手をたたいた音でLEDを点灯／消灯するプログラムを作ります。【リビングの魔王】では初心者にも分かりやすいよう丁寧に紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<h2><span id="toc1">チュートリアルを開始する</span></h2>
<p>MakeCode for micro:bitの<a rel="noopener" target="_blank" href="https://makecode.microbit.org/">ホーム画面<span class="fa fa-external-link external-icon anchor-icon"></span></a>を開きます。</p>
<p>チュートリアル<b>「Blow Away」</b>を<ruby>選択<rt>せんたく</rt></ruby>し、ブロックの<b>「チュートリアルを開始」</b>をクリックしましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway01.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4479" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway01.png" alt="チュートリアル「Blow Away」をはじめる" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway01.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway01-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway01-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway01-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway01-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway01-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway01-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc2">やせいの ヘブンが あらわれた！</span></h2>
<p>まず、おばけのヘブンをマイクロビットに取りつかせましょう。</p>
<p><ruby>基本<rt>きほん</rt></ruby>カテゴリにある<span style="color: #1e90ff;"><b>「アイコンを<ruby>表示<rt>ひょうじ</rt></ruby>」</b></span>ブロックを出し、<span style="color: #1e90ff;"><b>「<ruby>最初<rt>さいしょ</rt></ruby>だけ」</b></span>ブロックの中に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><ruby>表示<rt>ひょうじ</rt></ruby>するアイコンを「ハート」から「おばけ」に<ruby>変更<rt>へんこう</rt></ruby>しましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway02.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4480" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway02.png" alt="おばけをLEDに表示する" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway02.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway02-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway02-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway02-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway02-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway02-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway02-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc3">ループを回す</span></h2>
<p>ループカテゴリにある<span style="color: #00aa00;"><b>「くりかえし」</b></span>ブロックを出し、<span style="color: #1e90ff;"><b>「ずっと」</b></span>ブロックの中に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>回数は4回のままでOKです。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway03.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4481" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway03.png" alt="ずっとブロックの中にくりかえしブロックを入れる" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway03.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway03-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway03-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway03-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway03-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway03-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway03-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc4">大きな音がきらいなヘブン</span></h2>
<p>ヘブンは大きな音がすると<ruby>飛<rt>と</rt></ruby>んでいってしまいます。</p>
<p>大きな音がしたかどうか<ruby>判定<rt>はんてい</rt></ruby>する<ruby>命令<rt>めいれい</rt></ruby>を入れましょう。</p>
<p><ruby>論理<rt>ろんり</rt></ruby>カテゴリにある<span style="color: #00a4a6;"><b>「もし&lt;真&gt;なら」</b></span>ブロックを出し、<span style="color: #00aa00;"><b>「くりかえし」</b></span>ブロックの中に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><ruby>論理<rt>ろんり</rt></ruby>カテゴリにある<span style="color: #00a4a6;"><b>「0 = 0」</b></span>ブロックを出し、<span style="color: #00a4a6;"><b>「もし&lt;真&gt;なら」</b></span>ブロックの&lt;真&gt;の部分に<ruby>配置<rt>はいち</rt></ruby>しましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway04.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4482" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway04.png" alt="もし&lt;真&gt;ならブロックを出し、くりかえしブロックの中に配置する" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway04.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway04-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway04-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway04-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway04-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway04-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway04-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>ヘブンがうるさいと感じる<ruby>条件<rt>じょうけん</rt></ruby>を<ruby>設定<rt>せってい</rt></ruby>しましょう。まわり音の大きさと、<ruby>基準<rt>きじゅん</rt></ruby>になる<ruby>値<rt>あたい</rt></ruby>を<ruby>比較<rt>ひかく</rt></ruby>します。</p>
<p>入力カテゴリにある<span style="color: #d400d4;"><b>「まわりの音の大きさ」</b></span>ブロックを出し、<span style="color: #00a4a6;"><b>「0 = 0」</b></span>ブロックの<ruby>左側<rt>ひだりがわ</rt></ruby>に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><span style="color: #d400d4;"><b><span style="color: #00a4a6;">「</span>まわりの音の大きさ<span style="color: #00a4a6;"> = 0」</span></b></span>ブロックの「=」をクリックして、「&gt;」に<ruby>変更<rt>へんこう</rt></ruby>しましょう。</p>
<p><ruby>最後<rt>さいご</rt></ruby>に、<span style="color: #d400d4;"><b><span style="color: #00a4a6;">「</span>まわりの音の大きさ<span style="color: #00a4a6;"> &gt; 0」</span></b></span>ブロックの<ruby>右側<rt>みぎがわ</rt></ruby>の0を128に<ruby>変更<rt>へんこう</rt></ruby>します。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway05.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4483" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway05.png" alt="もしまわりの音の大きさが128より大きかったら" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway05.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway05-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway05-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway05-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway05-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway05-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway05-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>これで<b>もしまわりの音の大きさが128より大きかったら</b>という<ruby>判定<rt>はんてい</rt></ruby>ができました。</p>
<div class="blank-box bb-tab bb-memo bb-blue"><b><span style="color: #d400d4;">「まわりの音の大きさ」</span>ブロック</b><br />
<ruby>内臓<rt>ないぞう</rt></ruby>マイクに入ってきた<ruby>音量<rt>おんりょう</rt></ruby>を<ruby>取得<rt>しゅとく</rt></ruby>し、0～255の<ruby>範囲<rt>はんい</rt></ruby>で返します。</div>
<p>&nbsp;</p>
<h2><span id="toc5">LEDの座標を保存する変数を作る</span></h2>
<h3><span id="toc6">変数を2つ作る</span></h3>
<p>LEDの<ruby>座標<rt>ざひょう</rt></ruby>を<ruby>保存<rt>ほぞん</rt></ruby>するための<ruby>変数<rt>へんすう</rt></ruby>を2つ作ります。</p>
<p><ruby>変数<rt>へんすう</rt></ruby>カテゴリを<ruby>選<rt>えら</rt></ruby>んで<span style="color: #dc143c;"><b>「<ruby>変数<rt>へんすう</rt></ruby>を<ruby>追加<rt>ついか</rt></ruby>する&#8230;」</b></span>をクリックし、「col」と「row」という名前の<ruby>変数<rt>へんすう</rt></ruby>を作りましょう。</p>
<div class="blank-box bb-blue">
<ul>
<li><ruby>変数<rt>へんすう</rt></ruby>「col」：LEDの横の<ruby>位置<rt>いち</rt></ruby>を<ruby>保存<rt>ほぞん</rt></ruby>（colはcolumnの<ruby>略<rt>りゃく</rt></ruby>）</li>
<li><ruby>変数<rt>へんすう</rt></ruby>「row」：LEDのたての<ruby>位置<rt>いち</rt></ruby>を<ruby>保存<rt>ほぞん</rt></ruby></li>
</ul>
</div>
<p><span style="color: #ff0000;"><b><ruby>変数<rt>へんすう</rt></ruby></b></span>とは、プログラムで使う数字や文字のようなデータを<ruby>一時的<rt>いちじてき</rt></ruby>に<ruby>保存<rt>ほぞん</rt></ruby>するための場所のこと。</p>
<p>よく<b>数字や文字を入れておく箱</b>と言われたりします。</p>
<p>くわしくは「<a rel="noopener" target="_self" href="https://living-maou.com/scratch-variable/"><ruby>変数<rt>へんすう</rt></ruby>とは？スクラッチ（Scratch）を使ってわかりやすく<ruby>解説<rt>かいせつ</rt></ruby><span class="fa fa-external-link internal-icon anchor-icon"></span></a>」で<ruby>解説<rt>かいせつ</rt></ruby>しています。</p>
<p>&nbsp;</p>
<h3><span id="toc7">LEDディスプレイの座標位置</span></h3>
<p>マイクロビットのLEDディスプレイは5&#215;5のライトから<ruby>構成<rt>こうせい</rt></ruby>されていて、X<ruby>軸方向<rt>じくほうこう</rt></ruby>（横方向）とY<ruby>軸方向<rt>じくほうこう</rt></ruby>（たて方向）の<ruby>数値<rt>すうち</rt></ruby>で<ruby>位置<rt>いち</rt></ruby>を表しています。</p>
<p>一番左上のLEDの<ruby>位置<rt>いち</rt></ruby>は(0,0)、一番右下のLEDの<ruby>位置<rt>いち</rt></ruby>は(4,4）と表します。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway06.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4484" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway06.png" alt="マイクロビットのLEDディスプレイの座標" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway06.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway06-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway06-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway06-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway06-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway06-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway06-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc8">ヘブンがふき飛ばされるアニメーション</span></h2>
<p>ヘブンがふき<ruby>飛<rt>と</rt></ruby>ばされるアニメーションを作りましょう。</p>
<p>まわりの音が大きい（128より大きい）間、LEDディスプレイからランダムな<ruby>位置<rt>いち</rt></ruby>のライトを<ruby>選<rt>えら</rt></ruby>んで右に<ruby>移動<rt>いどう</rt></ruby>させることをくり返します。</p>
<h3><span id="toc9">LEDディスプレイからランダムな位置のライトを選ぶ</span></h3>
<p>まずは、LEDディスプレイからランダムな<ruby>位置<rt>いち</rt></ruby>のライトを<ruby>選<rt>えら</rt></ruby>びましょう。</p>
<p><ruby>変数<rt>へんすう</rt></ruby>カテゴリにある<span style="color: #dc143c;"><b>「row を 0 にする」</b></span>ブロックを出し、<span style="color: #00a4a6;"><b>「もしまわりの音の大きさが128より大きかったら」</b></span>ブロックの中に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>計算カテゴリから<span style="color: #9400d3;"><b>「0 から 10 までの<ruby>乱数<rt>らんすう</rt></ruby>」</b></span>ブロックを出し、<span style="color: #dc143c;"><b>「row を 0 にする」</b></span>ブロックの0の場所に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><span style="color: #9400d3;"><b>「0 から 10 までの<ruby>乱数<rt>らんすう</rt></ruby>」</b></span>ブロックの<ruby>最大<rt>さいだい</rt></ruby><ruby>値<rt>ち</rt></ruby>を10から4に<ruby>変更<rt>へんこう</rt></ruby>しましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway07.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4485" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway07.png" alt="LEDディスプレイからランダムな位置のライトを選ぶ" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway07.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway07-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway07-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway07-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway07-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway07-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway07-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>colも同じように、0～4のランダムな<ruby>値<rt>あたい</rt></ruby>を<ruby>設定<rt>せってい</rt></ruby>するようにします。</p>
<p>&nbsp;</p>
<h3><span id="toc10">ランダムに選んだ位置のライトが点灯しているなら</span></h3>
<p>次に、ランダムに<ruby>選<rt>えら</rt></ruby>んだ<ruby>位置<rt>いち</rt></ruby>のライトが<ruby>点灯<rt>てんとう</rt></ruby>しているか<ruby>判定<rt>はんてい</rt></ruby>します。</p>
<p><ruby>論理<rt>ろんり</rt></ruby>カテゴリにある<span style="color: #00a4a6;"><b>「もし&lt;真&gt;なら」</b></span>ブロックを出し、<span style="color: #00a4a6;"><b>「もしまわりの音の大きさが128より大きかったら」</b></span>ブロックの下に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>LEDカテゴリにある<span style="color: #5c2d91;"><b>「LED x 0 y 0 が<ruby>点灯<rt>てんとう</rt></ruby>している」</b></span>を出し、<span style="color: #00a4a6;"><b>「もし&lt;真&gt;なら」</b></span>ブロックの&lt;真&gt;の部分に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>x<ruby>軸<rt>じく</rt></ruby>の0に<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「col」</b></span>、y<ruby>軸<rt>じく</rt></ruby>の0に<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「row」</b></span>を<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>これで<b>ランダムに<ruby>選<rt>えら</rt></ruby>んだ<ruby>位置<rt>いち</rt></ruby>のライトが<ruby>点灯<rt>てんとう</rt></ruby>しているなら</b>という<ruby>判定<rt>はんてい</rt></ruby>ができました。</p>
<p>&nbsp;</p>
<h3><span id="toc11">点灯しているライトを右に移動させる</span></h3>
<p><ruby>点灯<rt>てんとう</rt></ruby>しているライトを消し1つ右のライトを<ruby>点灯<rt>てんとう</rt></ruby>させることで、右に<ruby>移動<rt>いどう</rt></ruby>させます。</p>
<p>LEDカテゴリにある<span style="color: #5c2d91;"><b>「<ruby>消灯<rt>しょうとう</rt></ruby> x 0 y 0」</b></span>ブロックと<span style="color: #5c2d91;"><b>「<ruby>点灯<rt>てんとう</rt></ruby> x 0 y 0」</b></span>ブロックを出し、<span style="color: #00a4a6;"><b>「もしLED x col y row が<ruby>点灯<rt>てんとう</rt></ruby>しているなら」</b></span>ブロックの中に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><span style="color: #5c2d91;"><b>「<ruby>消灯<rt>しょうとう</rt></ruby> x 0 y 0」</b></span>ブロックと<span style="color: #5c2d91;"><b>「<ruby>点灯<rt>てんとう</rt></ruby> x 0 y 0」</b></span>ブロックのx<ruby>軸<rt>じく</rt></ruby>とy<ruby>軸<rt>じく</rt></ruby>にも、<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「col」</b></span>と<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「row」</b></span>をそれぞれ<ruby>配置<rt>はいち</rt></ruby>しましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway08.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4486" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway08.png" alt="ランダムに選んだ位置のライトが点灯しているか判定" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway08.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway08-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway08-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway08-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway08-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway08-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway08-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>このままだと同じ場所のライトを消して<ruby>点<rt>つ</rt></ruby>けているだけになってしまうので、<ruby>消灯<rt>しょうとう</rt></ruby>したライトより1つ右のライトを<ruby>点灯<rt>てんとう</rt></ruby>させます。</p>
<p>計算カテゴリから<span style="color: #9400d3;"><b>「0 + 0」</b></span>ブロックを出し、<span style="color: #5c2d91;"><b>「<ruby>点灯<rt>てんとう</rt></ruby> x col y row」</b></span>ブロックの<span style="color: #dc143c;"><b>「col」</b></span>と<ruby>置<rt>お</rt></ruby>きかえます。その時、プログラミングエリアにグレーアウトした<span style="color: #dc143c;"><b>「col」</b></span>が出てきます。</p>
<p>見つからない場合は<span style="color: #1e90ff;"><b>「ずっと」</b></span>ブロックをドラッグして動かして、後ろにかくれているか<ruby>探<rt>さが</rt></ruby>してみてくださいね。</p>
<p>グレーアウトした<span style="color: #dc143c;"><b>「col」</b></span>は、<span style="color: #9400d3;"><b>「0 + 0」</b></span>ブロックの<ruby>左側<rt>ひだりがわ</rt></ruby>に入れましょう。</p>
<p><ruby>右側<rt>みぎがわ</rt></ruby>の0は1に<ruby>変更<rt>へんこう</rt></ruby>します。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway09.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4487" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway09.png" alt="点灯しているライトより1つ右のライトを点灯" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway09.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway09-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway09-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway09-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway09-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway09-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway09-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>これで<span style="color: #5c2d91;"><b>「<ruby>点灯<rt>てんとう</rt></ruby> x col+1 y row」</b></span>になり、ランダムに<ruby>選<rt>えら</rt></ruby>んだ<ruby>位置<rt>いち</rt></ruby>よりひとつ<ruby>右側<rt>みぎがわ</rt></ruby>のLEDの場所を<ruby>点灯<rt>てんとう</rt></ruby>する<ruby>命令<rt>めいれい</rt></ruby>になります。</p>
<div class="blank-box bb-tab bb-memo bb-blue">
<ul>
<li><b><span style="color: #5c2d91;">「LED x 0 y 0 が<ruby>点灯<rt>てんとう</rt></ruby>している」</span>ブロック</b><br />
X、Y<ruby>座標<rt>ざひょう</rt></ruby>で指定された<ruby>位置<rt>いち</rt></ruby>のLEDの<ruby>状態<rt>じょうたい</rt></ruby>を返します。<br />
<ruby>点灯<rt>てんとう</rt></ruby>している時は「真」、<ruby>消灯<rt>しょうとう</rt></ruby>している場合は「<ruby>偽<rt>ぎ</rt></ruby>」を返します。<br />
<em>　</em></li>
<li><b><span style="color: #5c2d91;">「<ruby>消灯<rt>しょうとう</rt></ruby> x 0 y 0」</span>ブロック</b><br />
X、Y<ruby>座標<rt>ざひょう</rt></ruby>で指定した<ruby>位置<rt>いち</rt></ruby>のLEDを<ruby>消灯<rt>しょうとう</rt></ruby>します。<br />
<em>　</em></li>
<li><b>「<ruby>点灯<rt>てんとう</rt></ruby> x 0 y 0」ブロック</b><br />
X、Y<ruby>座標<rt>ざひょう</rt></ruby>で指定した<ruby>位置<rt>いち</rt></ruby>のLEDを<ruby>点灯<rt>てんとう</rt></ruby>します。</li>
</ul>
</div>
<p>&nbsp;</p>
<h2><span id="toc12">なぜ「ずっと」ブロックの中に「くりかえし」ブロックを入れるの？</span></h2>
<p>これでプログラムは<ruby>完成<rt>かんせい</rt></ruby>です。</p>
<p>しかしなぜ<span style="color: #1e90ff;"><b>「ずっと」</b></span>ブロックの中に、わざわざ<span style="color: #00aa00;"><b>「くりかえし」</b></span>ブロックを入れるのでしょう？</p>
<p>一見意味がないように感じますよね。</p>
<p>なぜかというと<span style="color: #1e90ff;"><b>「ずっと」</b></span>ブロックには<span class="marker-under-red">多少のおくれが発生する</span>からです。</p>
<p><span style="color: #00aa00;"><b>「くりかえし」</b></span>ブロックを使うことで、コードがスピードアップしておくれをさけることができます。</p>
<p>&nbsp;</p>
<h2><span id="toc13">シミュレーターで確認する</span></h2>
<p>シミュレーターで作ったプログラムを<ruby>試<rt>ため</rt></ruby>してみましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway10.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4488" src="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway10.png" alt="シミュレーターで確認" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway10.png 800w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway10-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway10-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway10-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway10-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway10-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/microbit-blowaway10-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>マイクのアイコンの下にあるバーを上下にドラッグすると、まわりの音の大きさを<ruby>調節<rt>ちょうせつ</rt></ruby>することができます。</p>
<p>128より大きくしてみましょう。</p>
<p>ヘブンは右へふき<ruby>飛<rt>と</rt></ruby>んでいきましたか？</p>
<p>&nbsp;</p>
<h2><span id="toc14">マイクロビットにプログラムを転送する</span></h2>
<p>シミュレーターで正しく動くことを<ruby>確認<rt>かくにん</rt></ruby>できたら、マイクロビットに転送して動かしてみましょう。</p>
<p>マイクロビットにプログラムを転送する<ruby>方法<rt>ほうほう</rt></ruby>は「<a rel="noopener" target="_self" href="https://living-maou.com/microbit-usb-connection/">【マイクロビット】パソコンとのつなぎ方・外し方、プログラムの転送<ruby>方法<rt>ほうほう</rt></ruby><span class="fa fa-external-link internal-icon anchor-icon"></span></a>」でくわしく<ruby>紹介<rt>しょうかい</rt></ruby>しています。</p>
<p>マイクロビットに息をふきかけて、ヘブンがふき<ruby>飛<rt>と</rt></ruby>ぶのを見てみましょう。</p>
<p>マイクロビット<ruby>裏面<rt>りめん</rt></ruby>のリセットボタンをおすと、ヘブンを<ruby>復活<rt>ふっかつ</rt></ruby>させることができますよ。</p>
<p>&nbsp;</p>
<h2><span id="toc15">まとめ</span></h2>
<p>チチュートリアル<b>「おばけをふき<ruby>飛<rt>と</rt></ruby>ばせ！（Blow Away）」</b>について<ruby>紹介<rt>しょうかい</rt></ruby>しました。</p>
<h3><span id="toc16">今回使用したブロック</span></h3>
<div class="blank-box bb-blue">
<ul>
<li><b><span style="color: #d400d4;">「まわりの音の大きさ」</span>ブロック</b><br />
<ruby>内臓<rt>ないぞう</rt></ruby>マイクに入ってきた<ruby>音量<rt>おんりょう</rt></ruby>を<ruby>取得<rt>しゅとく</rt></ruby>し、0～255の<ruby>範囲<rt>はんい</rt></ruby>で返します。<br />
<em> </em></li>
<li><b><span style="color: #5c2d91;">「LED x 0 y 0 が<ruby>点灯<rt>てんとう</rt></ruby>している」</span>ブロック</b><br />
X、Y<ruby>座標<rt>ざひょう</rt></ruby>で指定された<ruby>位置<rt>いち</rt></ruby>のLEDの<ruby>状態<rt>じょうたい</rt></ruby>を返します。<br />
<ruby>点灯<rt>てんとう</rt></ruby>している時は「真」、<ruby>消灯<rt>しょうとう</rt></ruby>している場合は「<ruby>偽<rt>ぎ</rt></ruby>」を返します。<br />
<em> </em></li>
<li><b><span style="color: #5c2d91;">「<ruby>消灯<rt>しょうとう</rt></ruby> x 0 y 0」</span>ブロック</b><br />
X、Y<ruby>座標<rt>ざひょう</rt></ruby>で指定した<ruby>位置<rt>いち</rt></ruby>のLEDを<ruby>消灯<rt>しょうとう</rt></ruby>します。<br />
<em> </em></li>
<li><b><span style="color: #5c2d91;">「<ruby>点灯<rt>てんとう</rt></ruby> x 0 y 0」</span>ブロック</b><br />
X、Y<ruby>座標<rt>ざひょう</rt></ruby>で指定した<ruby>位置<rt>いち</rt></ruby>のLEDを<ruby>点灯<rt>てんとう</rt></ruby>します。</li>
</ul>
</div>
<p>&nbsp;</p>
<p>下の記事でマイクの<ruby>機能<rt>きのう</rt></ruby>についてくわしく<ruby>解説<rt>かいせつ</rt></ruby>しているので、よかったら読んでみてください。</p>
<div class="blogcard-type bct-together">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-microphone/" title="【マイクロビット×メイクコード】マイクを使った簡単なプログラムを作ってみよう" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_microphone-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_microphone-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_microphone-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_microphone.jpg 800w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_microphone-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_microphone-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_microphone-1536x864.jpg 1536w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_microphone-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_microphone-320x180.jpg 320w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット×メイクコード】マイクを使った簡単なプログラムを作ってみよう</div><div class="blogcard-snippet internal-blogcard-snippet">マイクロビットのマイクの使い方とかんたんなプログラムを紹介。【リビングの魔王】ではマイクに関するブロックの使い方を、かんたんなプログラムを例に使いつつ初心者にも分かりやすいように紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<p>&nbsp;</p>
<div class="blogcard-type bct-next">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-tutorial12/" title="【マイクロビット×MakeCode】ネコのおひるね（チュートリアル：Cat Napping）" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2022/10/eyecatch-catnapping-160x90.png" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2022/10/eyecatch-catnapping-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-catnapping-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-catnapping-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-catnapping-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-catnapping-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-catnapping-320x180.png 320w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-catnapping.png 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット×MakeCode】ネコのおひるね（チュートリアル：Cat Napping）</div><div class="blogcard-snippet internal-blogcard-snippet">MakeCode for micro:bitのチュートリアル「ネコのおひるね（Cat Napping）」について解説。拡張機能の「datalogger」を使って明るさと温度を記録します。ネコのライチのために、おひるねスポットを探してあげましょう！</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://living-maou.com/microbit-tutorial11/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【マイクロビット×MakeCode】クラップライト（チュートリアル：Clap Lights）</title>
		<link>https://living-maou.com/microbit-tutorial10/</link>
					<comments>https://living-maou.com/microbit-tutorial10/#respond</comments>
		
		<dc:creator><![CDATA[メソ]]></dc:creator>
		<pubDate>Mon, 05 Sep 2022 01:41:40 +0000</pubDate>
				<category><![CDATA[micro:bit]]></category>
		<category><![CDATA[MakeCode]]></category>
		<guid isPermaLink="false">https://living-maou.com/?p=4277</guid>

					<description><![CDATA[この記事では、MakeCode for micro:bitのチュートリアル「クラップライト（Clap Lights）」を解説かいせつします。 Clapは英語えいごで「たたく、うつ」という意味。 今回は、マイクロビットにつ [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4278" src="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights.png" alt="" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights.png 800w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>この記事では、MakeCode for micro:bitのチュートリアル<b>「クラップライト（Clap Lights）」</b>を<ruby>解説<rt>かいせつ</rt></ruby>します。</p>
<p>Clapは<ruby>英語<rt>えいご</rt></ruby>で「たたく、うつ」という意味。</p>
<p>今回は、マイクロビットについているマイクを使って、手をたたいた音でLEDを<ruby>点灯<rt>てんとう</rt></ruby>・<ruby>消灯<rt>しょうとう</rt></ruby>させるプログラムを作ります。</p>
<div class="blank-box bb-tab bb-memo bb-red">新しいバージョン(V2.0～)用のチュートリアルです。</div>
<p>&nbsp;</p>
<div class="blogcard-type bct-prev">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-tutorial09" title="【マイクロビット×MakeCode】モールス符号で話そう（チュートリアル：Morse Chat）" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-160x90.png" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-320x180.png 320w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat.png 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット×MakeCode】モールス符号で話そう（チュートリアル：Morse Chat）</div><div class="blogcard-snippet internal-blogcard-snippet">MakeCode for micro:bitのチュートリアル「モールス符号で話そう（Morse Chat）」について解説。ロゴと無線を使って他のマイクロビットとモールス符号を送受信するプログラムを作ります。【リビングの魔王】では初心者にも分かりやすいよう丁寧に紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<h2><span id="toc1">チュートリアルを開始する</span></h2>
<p>MakeCode for micro:bitの<a rel="noopener" target="_blank" href="https://makecode.microbit.org/">ホーム画面<span class="fa fa-external-link external-icon anchor-icon"></span></a>を開きます。</p>
<p>チュートリアル<b>「Clap Lights」</b>を<ruby>選択<rt>せんたく</rt></ruby>し、ブロックの<b>「チュートリアルを開始」</b>をクリックしましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights01.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4279" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights01.png" alt="Clap Lightsを開始する" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights01.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights01-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights01-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights01-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights01-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights01-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights01-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc2">不要なブロックを消す</span></h2>
<p><span style="color: #1e90ff;"><b>「<ruby>最初<rt>さいしょ</rt></ruby>だけ」</b></span>ブロックは今回使わないので消しましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/06/microbit-delete03.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-3559" src="https://living-maou.com/wp-content/uploads/2022/06/microbit-delete03.png" alt="最初だけブロックを消す" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/06/microbit-delete03.png 800w, https://living-maou.com/wp-content/uploads/2022/06/microbit-delete03-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/06/microbit-delete03-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/06/microbit-delete03-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/06/microbit-delete03-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/06/microbit-delete03-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/06/microbit-delete03-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc3">まわりの音がうるさくなったとき</span></h2>
<p>手をたたいて、マイクが音を感知したときの<ruby>処理<rt>しょり</rt></ruby>を作りましょう。</p>
<p>入力カテゴリにある<span style="color: #d400d4;"><b>「まわりの音がうるさくなったとき」</b></span>ブロックを<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights02.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4280" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights02.png" alt="まわりの音がうるさくなったとき" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights02.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights02-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights02-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights02-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights02-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights02-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights02-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<div class="blank-box bb-tab bb-memo bb-blue"><b><span style="color: #d400d4;">「まわりの音がうるさくなったとき」</span>ブロック</b><br />
「うるさいかどうか」のしきい<ruby>値<rt>ち</rt></ruby><ruby>以上<rt>いじょう</rt></ruby>の<ruby>音量<rt>おんりょう</rt></ruby>を感知したとき、中にあるプログラムを実行します。</div>
<p>&nbsp;</p>
<h2><span id="toc4">変数「lightsOn」を作成する</span></h2>
<p><ruby>変数<rt>へんすう</rt></ruby>カテゴリを<ruby>選<rt>えら</rt></ruby>んで<b>「<ruby>変数<rt>へんすう</rt></ruby>を<ruby>追加<rt>ついか</rt></ruby>する&#8230;」</b>をクリックし、lightsOnという名前の<ruby>変数<rt>へんすう</rt></ruby>を作りましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights03.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4281" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights03.png" alt="変数「lightsOn」を作成" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights03.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights03-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights03-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights03-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights03-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights03-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights03-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p><span style="color: #ff0000;"><b><ruby>変数<rt>へんすう</rt></ruby></b></span>とは、プログラムで使う数字や文字のようなデータを<ruby>一時的<rt>いちじてき</rt></ruby>に<ruby>保存<rt>ほぞん</rt></ruby>するための場所のことです。よく<b>数字や文字を入れておく箱</b>と言われたりします。</p>
<p><ruby>変数<rt>へんすう</rt></ruby>について「<a rel="noopener" target="_self" href="https://living-maou.com/scratch-variable/"><ruby>変数<rt>へんすう</rt></ruby>とは？スクラッチ（Scratch）を使って<ruby>解説<rt>かいせつ</rt></ruby><span class="fa fa-external-link internal-icon anchor-icon"></span></a>」でくわしく<ruby>解説<rt>かいせつ</rt></ruby>しています。</p>
<p>&nbsp;</p>
<h3><span id="toc5">「lightsOn」はLEDが点灯しているか記録する変数</span></h3>
<p><ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「lightsOn」</b></span>は、LEDが「<ruby>点灯<rt>てんとう</rt></ruby>しているか」または「<ruby>消灯<rt>しょうとう</rt></ruby>しているか」<ruby>記録<rt>きろく</rt></ruby>する<ruby>役割<rt>やくわり</rt></ruby>があります。</p>
<div class="blank-box bb-blue">
<ul>
<li><ruby>点灯<rt>てんとう</rt></ruby>している場合は<span style="color: #00a4a6;"><b>「真（しん）」</b></span></li>
<li><ruby>消灯<rt>しょうとう</rt></ruby>している場合は<span style="color: #00a4a6;"><b>「偽（ぎ）」</b></span></li>
</ul>
</div>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights04.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4282" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights04.png" alt="真なら点灯、偽なら消灯" width="500" height="281" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights04.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights04-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights04-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights04-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights04-320x180.png 320w" sizes="(max-width: 500px) 100vw, 500px" /></a></p>
<p>そもそも<ruby>真<rt>しん</rt></ruby>と<ruby>偽<rt>ぎ</rt></ruby>って何？ってことですが、カンタンに言うと</p>
<div class="blank-box bb-blue">
<ul>
<li><ruby>真<rt>しん</rt></ruby>はそうだよ</li>
<li><ruby>偽<rt>ぎ</rt></ruby>はちがうよ</li>
</ul>
</div>
<p>という意味です。<ruby>英語<rt>えいご</rt></ruby>で、<ruby>真<rt>しん</rt></ruby>はtrue、<ruby>偽<rt>にせ</rt></ruby>はfalseと<ruby>表現<rt>ひょうげん</rt></ruby>されます。</p>
<p><ruby>真偽<rt>しんぎ</rt></ruby><ruby>値<rt>ち</rt></ruby>については「<a rel="noopener" target="_self" href="https://living-maou.com/scratch-logicaloperation/"><ruby>論理<rt>ろんり</rt></ruby><ruby>演算<rt>えんざん</rt></ruby>（かつ・または・ではない）とは？スクラッチ(Scratch)を使って<ruby>解説<rt>かいせつ</rt></ruby><span class="fa fa-external-link internal-icon anchor-icon"></span></a>」でくわしく<ruby>解説<rt>かいせつ</rt></ruby>しています。</p>
<p>&nbsp;</p>
<h2><span id="toc6">点灯している？消灯している？</span></h2>
<p><ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「lightsOn」</b></span>の<ruby>値<rt>あたい</rt></ruby>が真か<ruby>偽<rt>ぎ</rt></ruby>かで<ruby>処理<rt>しょり</rt></ruby>が分かれます。</p>
<div class="blank-box bb-blue">
<ul>
<li><ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「lightsOn」</b></span>の<ruby>値<rt>あたい</rt></ruby>が<span style="color: #00a4a6;"><b>真</b></span> → LEDを<b><ruby>点灯<rt>てんとう</rt></ruby></b></li>
<li><ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「lightsOn」</b></span>の<ruby>値<rt>あたい</rt></ruby>が<span style="color: #00a4a6;"><b><ruby>偽<rt>ぎ</rt></ruby></b></span> → LEDを<b><ruby>消灯<rt>しょうとう</rt></ruby></b></li>
</ul>
</div>
<p><ruby>論理<rt>ろんり</rt></ruby>カテゴリの<span style="color: #00a4a6;"><b>「もし&lt;真&gt;なら／でなければ」</b></span>ブロックを出し、<span style="color: #d400d4;"><b>「まわりの音がうるさくなったとき」</b></span>ブロックの中に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><ruby>変数<rt>へんすう</rt></ruby>カテゴリの<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「lightsOn」</b></span>を出し、<span style="color: #00a4a6;"><b>「もし&lt;真&gt;なら／でなければ」</b></span>ブロックの<span style="color: #00a4a6;"><b>&lt;真&gt;</b></span>の部分に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights05.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4283" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights05.png" alt="変数「lightsOn」が真なら" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights05.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights05-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights05-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights05-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights05-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights05-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights05-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p><b>「もし lightsOn なら」</b>という<ruby>条件<rt>じょうけん</rt></ruby>にピンとこないかもしれません。</p>
<p>これは<b>「<ruby>変数<rt>へんすう</rt></ruby>「lightsOn」が真なら」</b>と同じ意味です。</p>
<p><span style="color: #00a4a6;"><b>「もし&lt;真&gt;なら／でなければ」</b></span>ブロックは、<span class="marker-under-red">もし<ruby>条件<rt>じょうけん</rt></ruby>が真の場合は「なら」の下にある<ruby>命令<rt>めいれい</rt></ruby>を実行</span>し、<ruby>偽<rt>ぎ</rt></ruby>の場合は「でなければ」の下にある<ruby>命令<rt>めいれい</rt></ruby>を実行します。</p>
<p>なので、<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「lightsOn」</b></span>の<ruby>値<rt>あたい</rt></ruby>が<span style="color: #00a4a6;"><b>真</b></span>の場合、「なら」の下にある<ruby>命令<rt>めいれい</rt></ruby>が実行されます。</p>
<p>&nbsp;</p>
<h3><span id="toc7">変数「lightsOn」が真なら</span></h3>
<p><ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「lightsOn」</b></span>が<span style="color: #00a4a6;"><b>真</b></span>なら、LEDを<ruby>点灯<rt>てんとう</rt></ruby>します。</p>
<p><ruby>基本<rt>きほん</rt></ruby>カテゴリから<span style="color: #1e90ff;"><b>「LED画面に<ruby>表示<rt>ひょうじ</rt></ruby>」</b></span>ブロックを出し、<span style="color: #00a4a6;"><b>「もし lightsOn なら／でなければ」</b></span>ブロックの「もし lightsOn なら」の下に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>LEDは自由にデザインしましょう！</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights06.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4284" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights06.png" alt="lightsOnが真なら、LEDを点灯" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights06.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights06-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights06-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights06-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights06-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights06-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights06-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h3><span id="toc8">変数「lightsOn」が真でなければ</span></h3>
<p><ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「lightsOn」</b></span>が<span style="color: #00a4a6;"><b><ruby>偽<rt>ぎ</rt></ruby></b></span>なら、LEDを<ruby>消灯<rt>しょうとう</rt></ruby>します。</p>
<p><ruby>基本<rt>きほん</rt></ruby>カテゴリから<span style="color: #1e90ff;"><b>「<ruby>表示<rt>ひょうじ</rt></ruby>を消す」</b></span>ブロックを出し、<span style="color: #00a4a6;"><b>「もし lightsOn なら／でなければ」</b></span>ブロックの「でなければ」の下に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights07.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4285" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights07.png" alt="lightsOnが偽なら、LEDを消灯" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights07.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights07-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights07-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights07-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights07-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights07-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights07-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc9">変数「lightsOn」の値を逆にする</span></h2>
<p>手をたたいてマイクが音を感知するたびに、<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「lightsOn」</b></span>を<ruby>逆<rt>ぎゃく</rt></ruby>の<ruby>値<rt>あたい</rt></ruby>（真⇔<ruby>偽<rt>ぎ</rt></ruby>）にします。</p>
<p><ruby>変数<rt>へんすう</rt></ruby>カテゴリから<span style="color: #dc143c;"><b>「<ruby>変数<rt>へんすう</rt></ruby> lightOn を 0 にする」</b></span>ブロック出し、<span style="color: #00a4a6;"><b>「もし lightsOn なら／でなければ」</b></span>ブロックの上に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><ruby>論理<rt>ろんり</rt></ruby>カテゴリから<span style="color: #00a4a6;"><b>「ではない」</b></span>ブロックを出し、<span style="color: #dc143c;"><b>「<ruby>変数<rt>へんすう</rt></ruby> lightOn を 0 にする」</b></span>ブロックの 0 の部分に<ruby>配置<rt>はいち</rt></ruby>しましょう。</p>
<p><ruby>変数<rt>へんすう</rt></ruby>カテゴリから<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「lightsOn」</b></span>ブロックを出し、<span style="color: #00a4a6;"><b>「ではない」</b></span>ブロックの空いている部分に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights08.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4286" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights08.png" alt="lightsOnを逆の値にする" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights08.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights08-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights08-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights08-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights08-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights08-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights08-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<div class="blank-box bb-tab bb-memo bb-blue"><b><span style="color: #00a4a6;">「～ではない」</span>ブロック</b><br />
入力が真なら<ruby>偽<rt>ぎ</rt></ruby>、<ruby>偽<rt>ぎ</rt></ruby>なら真を返します。</div>
<p>&nbsp;</p>
<h2><span id="toc10">シミュレーターで確認する</span></h2>
<p>シミュレーターで作ったプログラムを<ruby>試<rt>ため</rt></ruby>してみましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights09.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4287" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights09.png" alt="シミュレーターで確認する" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights09.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights09-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights09-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights09-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights09-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights09-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights09-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>LEDの右に出てきた<ruby>音量<rt>おんりょう</rt></ruby>のコントローラーを上下にドラッグすることで、<ruby>音量<rt>おんりょう</rt></ruby>を上げ下げできます。</p>
<p><ruby>音量<rt>おんりょう</rt></ruby>を上げてみてください。ある<ruby>値<rt>あたい</rt></ruby><ruby>以上<rt>いじょう</rt></ruby>になると、LEDがついたり消えたりするはずです。</p>
<p>チュートリアルの<ruby>説明<rt>せつめい</rt></ruby>では128<ruby>以上<rt>いじょう</rt></ruby>となっていますが、165<ruby>以上<rt>いじょう</rt></ruby>にするとLEDが<ruby>点灯<rt>てんとう</rt></ruby>・<ruby>消灯<rt>しょうとう</rt></ruby>します。</p>
<p>&nbsp;</p>
<h2><span id="toc11">マイクロビットにプログラムを転送する</span></h2>
<p>シミュレーターで正しく動くことを<ruby>確認<rt>かくにん</rt></ruby>できたら、マイクロビットに転送して動かしてみましょう。</p>
<p>マイクロビットにプログラムを転送する<ruby>方法<rt>ほうほう</rt></ruby>は「<a rel="noopener" target="_self" href="https://living-maou.com/microbit-usb-connection/">【マイクロビット】パソコンとのつなぎ方・外し方、プログラムの転送<ruby>方法<rt>ほうほう</rt></ruby><span class="fa fa-external-link internal-icon anchor-icon"></span></a>」でくわしく<ruby>紹介<rt>しょうかい</rt></ruby>しています。</p>
<p>&nbsp;</p>
<h2><span id="toc12">しきい値を調整する</span></h2>
<p>マイクロビットに転送して動かしてみてると、手をたたいてないのにマイクが音を感知してしまったり、反対に手をたたいても音を感知してくれなかったりするかもしれません。</p>
<p>そんな時は、音の<b>しきい<ruby>値<rt>ち</rt></ruby></b>を調整しましょう。</p>
<p>入力の下にあるその他カテゴリにある<span style="color: #d400d4;"><b>「うるさいかどうかのしきい<ruby>値<rt>ち</rt></ruby>を128に<ruby>設定<rt>せってい</rt></ruby>する」</b></span>ブロックは、「うるさいかどうか」のしきい<ruby>値<rt>ち</rt></ruby>を<ruby>設定<rt>せってい</rt></ruby>するブロックです。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights10.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4288" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights10.png" alt="しきい値を設定する" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights10.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights10-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights10-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights10-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights10-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights10-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights10-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>しきい<ruby>値<rt>ち</rt></ruby>とは、<span class="marker-under-red">さかい目になる<ruby>値<rt>あたい</rt></ruby></span>のこと。まわりの音の大きさがしきい<ruby>値<rt>ち</rt></ruby><ruby>以上<rt>いじょう</rt></ruby>の場合は「うるさい」と<ruby>判断<rt>はんだん</rt></ruby>します。</p>
<p>何も<ruby>設定<rt>せってい</rt></ruby>しなかった場合、しきい<ruby>値<rt>ち</rt></ruby>は165になっています。</p>
<p>しきい<ruby>値<rt>ち</rt></ruby>を小さくすると、小さな音でも感知するようになり、しきい<ruby>値<rt>ち</rt></ruby>を大きくすると、大きな音をたてないと感知しないようになります。</p>
<p><ruby>試行錯誤<rt>しこうさくご</rt></ruby>しながら、ちょうどいい<ruby>値<rt>あたい</rt></ruby>をさがしてみてくださいね。</p>
<p>&nbsp;</p>
<h2><span id="toc13">変数「lightsOn」には、最初何の値が入っている？</span></h2>
<p>プログラムはこれで<ruby>完成<rt>かんせい</rt></ruby>ですが、ここで問題です。</p>
<p><ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「lightsOn」</b></span>には、<ruby>最初<rt>さいしょ</rt></ruby>何の<ruby>値<rt>あたい</rt></ruby>が入っているでしょう？</p>
<p>一番<ruby>最初<rt>さいしょ</rt></ruby>に音を感知した時<span style="color: #dc143c;"><b>「<ruby>変数<rt>へんすう</rt></ruby> lightsOn を lightsOn ではない にする」</b></span>ブロックで、<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「lightsOn」</b></span>が何から何に<ruby>変<rt>か</rt></ruby>わっているのか気になりませんか？</p>
<p>&nbsp;</p>
<p><b>「エディター<ruby>切<rt>き</rt></ruby>り<ruby>替<rt>か</rt></ruby>え」</b>ボタンで、プログラムの<ruby>表示<rt>ひょうじ</rt></ruby>をブロックから<b>JavaScript</b>に切りかえてみてください。</p>
<p>そうすると、ブロックで作ったプログラムがJavaScriptというプログラミング言語で<ruby>表示<rt>ひょうじ</rt></ruby>されます。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights11.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4289" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights11.png" alt="変数「lightsOn」には、最初何の値が入っている？" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights11.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights11-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights11-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights11-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights11-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights11-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-claplights11-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>その中に、</p>
<div class="blank-box bb-green">let lightsOn = false</div>
<p>という<ruby>命令<rt>めいれい</rt></ruby>があります。</p>
<p>これは、<span class="marker-under-red">lightsOn という<ruby>変数<rt>へんすう</rt></ruby>を作って false（<ruby>偽<rt>ぎ</rt></ruby>）を<ruby>設定<rt>せってい</rt></ruby>しなさい</span>という<ruby>命令<rt>めいれい</rt></ruby>です。</p>
<p>よって、<ruby>変数<rt>へんすう</rt></ruby>「lightsOn」には<ruby>最初<rt>さいしょ</rt></ruby>「<ruby>偽<rt>ぎ</rt></ruby>」が<ruby>設定<rt>せってい</rt></ruby>されていることが分かります。</p>
<p>&nbsp;</p>
<p><ruby>変数<rt>へんすう</rt></ruby>は<ruby>最初<rt>さいしょ</rt></ruby>何が入っているか分かりません。使用する前に<ruby>値<rt>あたい</rt></ruby>を入れて<span style="color: #ff0000;"><b><ruby>初期化<rt>しょきか</rt></ruby></b></span>する<ruby>必要<rt>ひつよう</rt></ruby>があります。</p>
<p>ブロックでプログラミングしていると<ruby>変数<rt>へんすう</rt></ruby>に<ruby>最初<rt>さいしょ</rt></ruby>何が入っているのか分かりにくいです。</p>
<p><ruby>変数<rt>へんすう</rt></ruby>にどんな<ruby>値<rt>あたい</rt></ruby>が入っているのか<ruby>意識<rt>いしき</rt></ruby>するようにしましょう。</p>
<p>&nbsp;</p>
<h2><span id="toc14">まとめ</span></h2>
<p>チュートリアル<b>「クラップライト（Clap Lights）」</b>について<ruby>紹介<rt>しょうかい</rt></ruby>しました。</p>
<h3><span id="toc15">今回使用したブロック</span></h3>
<div class="blank-box bb-blue">
<ul>
<li><b><span style="color: #d400d4;">「まわりの音がうるさくなったとき」</span>ブロック</b><br />
「うるさいかどうか」のしきい<ruby>値<rt>ち</rt></ruby><ruby>以上<rt>いじょう</rt></ruby>の<ruby>音量<rt>おんりょう</rt></ruby>を感知したとき、中にあるプログラムを実行します。<br />
<em>　</em></li>
<li><b><span style="color: #00a4a6;">「～ではない」</span>ブロック</b><br />
入力が真なら<ruby>偽<rt>ぎ</rt></ruby>、<ruby>偽<rt>ぎ</rt></ruby>なら真を返します。<br />
<em>　</em></li>
<li><b><span style="color: #d400d4;">「うるさいかどうかのしきい<ruby>値<rt>ち</rt></ruby>を128に<ruby>設定<rt>せってい</rt></ruby>する」</span>ブロック</b><br />
「うるさいかどうか」<ruby>判断<rt>はんだん</rt></ruby>するしきい<ruby>値<rt>ち</rt></ruby>を<ruby>設定<rt>せってい</rt></ruby>する。</li>
</ul>
</div>
<p>&nbsp;</p>
<p>下の記事で、マイクの<ruby>機能<rt>きのう</rt></ruby>についてくわしく<ruby>解説<rt>かいせつ</rt></ruby>しています。<ruby>興味<rt>きょうみ</rt></ruby>があったら読んでみてください。</p>
<div class="blogcard-type bct-together">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-microphone/" title="【マイクロビット×メイクコード】マイクを使った簡単なプログラムを作ってみよう" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_microphone-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_microphone-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_microphone-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_microphone.jpg 800w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_microphone-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_microphone-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_microphone-1536x864.jpg 1536w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_microphone-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_microphone-320x180.jpg 320w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット×メイクコード】マイクを使った簡単なプログラムを作ってみよう</div><div class="blogcard-snippet internal-blogcard-snippet">マイクロビットのマイクの使い方とかんたんなプログラムを紹介。【リビングの魔王】ではマイクに関するブロックの使い方を、かんたんなプログラムを例に使いつつ初心者にも分かりやすいように紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<p>&nbsp;</p>
<div class="blogcard-type bct-next">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-tutorial11/" title="【マイクロビット×MakeCode】おばけをふき飛ばせ！（チュートリアル：Blow Away）" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-160x90.png" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway-320x180.png 320w, https://living-maou.com/wp-content/uploads/2022/10/eyecatch-blowaway.png 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット×MakeCode】おばけをふき飛ばせ！（チュートリアル：Blow Away）</div><div class="blogcard-snippet internal-blogcard-snippet">MakeCode for micro:bitのチュートリアル「Blow Away」について解説。マイクロビットのマイクを使ってオバケをふき飛ばすプログラムを作ります。【リビングの魔王】では初心者にも分かりやすいよう手順をひとつひとつ丁寧に紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://living-maou.com/microbit-tutorial10/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【マイクロビット×MakeCode】モールス符号で話そう（チュートリアル：Morse Chat）</title>
		<link>https://living-maou.com/microbit-tutorial09/</link>
					<comments>https://living-maou.com/microbit-tutorial09/#respond</comments>
		
		<dc:creator><![CDATA[メソ]]></dc:creator>
		<pubDate>Fri, 12 Aug 2022 02:48:37 +0000</pubDate>
				<category><![CDATA[micro:bit]]></category>
		<category><![CDATA[MakeCode]]></category>
		<guid isPermaLink="false">https://living-maou.com/?p=4196</guid>

					<description><![CDATA[この記事では、MakeCode for micro:bitのチュートリアル「モールス符号ふごうで話そう（Morse Chat）」について紹介しょうかいします。 「モールス符号ふごうで話そう（Morse Chat）」では、 [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4197" src="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat.png" alt="" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat.png 800w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>この記事では、MakeCode for micro:bitのチュートリアル<b>「モールス<ruby>符号<rt>ふごう</rt></ruby>で話そう（Morse Chat）」</b>について<ruby>紹介<rt>しょうかい</rt></ruby>します。</p>
<p>「モールス<ruby>符号<rt>ふごう</rt></ruby>で話そう（Morse Chat）」では、ロゴと<ruby>無線<rt>むせん</rt></ruby><ruby>通信<rt>つうしん</rt></ruby><ruby>機能<rt>きのう</rt></ruby>を使って、<ruby>他<rt>ほか</rt></ruby>のマイクロビットとモールス<ruby>符号<rt>ふごう</rt></ruby>をやりとりするプログラムを作ります。</p>
<p><a rel="noopener" target="_blank" href="https://ja.wikipedia.org/wiki/%E3%83%A2%E3%83%BC%E3%83%AB%E3%82%B9%E7%AC%A6%E5%8F%B7">モールス符号（ふごう）<span class="fa fa-external-link external-icon anchor-icon"></span></a>とは、<span class="marker-under-red">長い<ruby>信号<rt>しんごう</rt></ruby>と短い<ruby>信号<rt>しんごう</rt></ruby>を組み合わせて文字や数字などを表す<b><ruby>電信<rt>でんしん</rt></ruby>用の<ruby>符号<rt>ふごう</rt></ruby></b></span>です。</p>
<p>ジブリ<ruby>映画<rt>えいが</rt></ruby>「<ruby>天空<rt>てんくう</rt></ruby>の<ruby>城<rt>しろ</rt></ruby>ラピュタ」の<ruby>冒頭<rt>ぼうとう</rt></ruby>でムスカがモールス<ruby>符号<rt>ふごう</rt></ruby>を送っていたり、「<ruby>崖<rt>がけ</rt></ruby>の上のポニョ」で<ruby>宗介<rt>そうすけ</rt></ruby>がお<ruby>父<rt>とう</rt></ruby>さんとモールス<ruby>符号<rt>ふごう</rt></ruby>で会話しているシーンがありましたね。</p>
<p>それでは、モールス<ruby>符号<rt>ふごう</rt></ruby>でメッセージを<ruby>送受信<rt>そうじゅしん</rt></ruby>してみましょう！</p>
<div class="blank-box bb-tab bb-memo bb-red">新しいバージョン(V2.0～)用のチュートリアルです。<br />
また、<ruby>実機<rt>じっき</rt></ruby>で動かす場合マイクロビットは2台<ruby>以上<rt>いじょう</rt></ruby><ruby>必要<rt>ひつよう</rt></ruby>です。</div>
<p>&nbsp;</p>
<div class="blogcard-type bct-prev">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-tutorial08" title="【マイクロビット×MakeCode】カウントダウン（チュートリアル：Countdown）" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-160x90.png" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-320x180.png 320w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown.png 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット×MakeCode】カウントダウン（チュートリアル：Countdown）</div><div class="blogcard-snippet internal-blogcard-snippet">MakeCode for micro:bitのチュートリアル「カウントダウン（Countdown）」を解説。レースのスタートのような「3、2、1、GO!」とカウントダウンするプログラムを作ります。【リビングの魔王】では初心者にも分かりやすいよう丁寧に紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<h2><span id="toc1">チュートリアルを開始する</span></h2>
<p>MakeCode for micro:bitの<a rel="noopener" target="_blank" href="https://makecode.microbit.org/">ホーム画面<span class="fa fa-external-link external-icon anchor-icon"></span></a>を開きます。</p>
<p>チュートリアル<b>「Morse Chat」</b>を<ruby>選択<rt>せんたく</rt></ruby>し、ブロックの<b>「チュートリアルを開始」</b>をクリックしましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat01.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4198" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat01.png" alt="チュートリアル「Morse Chat」を開始する" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat01.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat01-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat01-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat01-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat01-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat01-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat01-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc2">不要なブロックを消す</span></h2>
<p><span style="color: #1e90ff;"><b>「<ruby>最初<rt>さいしょ</rt></ruby>だけ」「ずっと」</b></span>ブロックは今回使わないので消しましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/05/microbit-delete.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-3422" src="https://living-maou.com/wp-content/uploads/2022/05/microbit-delete.png" alt="「最初だけ」「ずっと」ブロックを消す" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/05/microbit-delete.png 800w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc3">モールス符号「・」を送る</span></h2>
<p>入力カテゴリの<span style="color: #d400d4;"><b>「ロゴが短くタップされた」</b></span>ブロックを出し、中に<ruby>無線<rt>むせん</rt></ruby>カテゴリの<span style="color: #e3008c;"><b>「<ruby>無線<rt>むせん</rt></ruby>で<ruby>数値<rt>すうち</rt></ruby>を<ruby>送信<rt>そうしん</rt></ruby>」</b></span>ブロックを入れます。</p>
<p><ruby>送信<rt>そうしん</rt></ruby>する<ruby>値<rt>あたい</rt></ruby>は0のままでOK。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat02.png"><img loading="lazy" decoding="async" class="aligncenter wp-image-4199 size-full" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat02.png" alt="ロゴが短くタップされた時、無線で0を送信" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat02.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat02-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat02-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat02-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat02-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat02-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat02-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<div class="blank-box bb-tab bb-memo bb-blue"><b><span style="color: #e3008c;">「<ruby>無線<rt>むせん</rt></ruby>で<ruby>数値<rt>すうち</rt></ruby>を<ruby>送信<rt>そうしん</rt></ruby>」</span>ブロック</b><br />
<ruby>無線<rt>むせん</rt></ruby><ruby>通信<rt>つうしん</rt></ruby>で、同じグループのマイクロビットに<ruby>数値<rt>すうち</rt></ruby>を<ruby>送信<rt>そうしん</rt></ruby>します。</div>
<p>&nbsp;</p>
<h2><span id="toc4">モールス符号「－」を送る</span></h2>
<p>もうひとつ<span style="color: #d400d4;"><b>「ロゴが短くタップされた」</b></span>ブロックをプログラミングエリアに出します。</p>
<p>新しく出した<span style="color: #d400d4;"><b>「ロゴが短くタップされた」</b></span>ブロックの<b>「短くタップされた」</b>をクリックして<b>「長くタップされた」</b>に<ruby>変更<rt>へんこう</rt></ruby>しましょう。</p>
<p><span style="color: #d400d4;"><b>「ロゴが長くタップされた」</b></span>ブロックの中に、<ruby>無線<rt>むせん</rt></ruby>カテゴリの<span style="color: #e3008c;"><b>「<ruby>無線<rt>むせん</rt></ruby>で<ruby>数値<rt>すうち</rt></ruby>を<ruby>送信<rt>そうしん</rt></ruby>」</b></span>ブロックを入れ、<ruby>送信<rt>そうしん</rt></ruby>する<ruby>値<rt>あたい</rt></ruby>は<b>1</b>に<ruby>変更<rt>へんこう</rt></ruby>します。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat03.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4200" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat03.png" alt="ロゴが長くタップされた時、無線で1を送信" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat03.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat03-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat03-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat03-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat03-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat03-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat03-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>ここまでで、2<ruby>種類<rt>しゅるい</rt></ruby>の<ruby>信号<rt>しんごう</rt></ruby>を<ruby>送信<rt>そうしん</rt></ruby>するプログラムができました。</p>
<div class="blank-box bb-blue">
<ul>
<li>ロゴを短くタップ（短い<ruby>信号<rt>しんごう</rt></ruby>「・」） → 0を<ruby>送信<rt>そうしん</rt></ruby></li>
<li>ロゴを長くタップ（長い<ruby>信号<rt>しんごう</rt></ruby>「－」） → 1を<ruby>送信<rt>そうしん</rt></ruby></li>
</ul>
</div>
<p>&nbsp;</p>
<h2><span id="toc5">数値を受信したとき</span></h2>
<p>メッセージを<ruby>受信<rt>じゅしん</rt></ruby>したときの<ruby>処理<rt>しょり</rt></ruby>を作りましょう。</p>
<p>LED画面と音で受け取った<ruby>信号<rt>しんごう</rt></ruby>を表します。</p>
<p>短い<ruby>信号<rt>しんごう</rt></ruby>の0を<ruby>受信<rt>じゅしん</rt></ruby>したときと、長い<ruby>信号<rt>しんごう</rt></ruby>の1を<ruby>受信<rt>じゅしん</rt></ruby>したときで<ruby>処理<rt>しょり</rt></ruby>が分かれますよ。</p>
<p>&nbsp;</p>
<p><ruby>無線<rt>むせん</rt></ruby>カテゴリから<span style="color: #e3008c;"><b>「<ruby>無線<rt>むせん</rt></ruby>で<ruby>受信<rt>じゅしん</rt></ruby>したとき(receivedNumber)」</b></span>ブロックを出し、中に<ruby>論理<rt>ろんり</rt></ruby>カテゴリの<span style="color: #00a4a6;"><b>「もし&lt;真&gt;なら／でなければ」</b></span>ブロックを入れます。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat04.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4201" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat04.png" alt="無線で数値を受信したとき" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat04.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat04-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat04-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat04-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat04-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat04-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat04-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<div class="blank-box bb-tab bb-memo bb-blue">
<ul>
<li><b><span style="color: #e3008c;">「<ruby>無線<rt>むせん</rt></ruby>で<ruby>受信<rt>じゅしん</rt></ruby>したとき(receivedNumber)」</span>ブロック</b><br />
マイクロビットが<ruby>無線<rt>むせん</rt></ruby>で<ruby>数値<rt>すうち</rt></ruby>を<ruby>受信<rt>じゅしん</rt></ruby>したとき、中に<ruby>配置<rt>はいち</rt></ruby>したプログラムを実行します。receivedNumberには、<ruby>受信<rt>じゅしん</rt></ruby>した<ruby>数値<rt>すうち</rt></ruby>が<ruby>記憶<rt>きおく</rt></ruby>されています。<br />
<em>　</em></li>
<li><b><span style="color: #00a4a6;">「もし&lt;真&gt;なら／でなければ」</span>ブロック</b><br />
もし<ruby>条件<rt>じょうけん</rt></ruby>が正しい（真）場合、「なら」の下にある<ruby>命令<rt>めいれい</rt></ruby>を実行します。正しくない（<ruby>偽<rt>ぎ</rt></ruby>）場合は、「でなければ」の下にある<ruby>命令<rt>めいれい</rt></ruby>を実行します。</li>
</ul>
</div>
<p>&nbsp;</p>
<p><ruby>判定<rt>はんてい</rt></ruby><ruby>条件<rt>じょうけん</rt></ruby>を<ruby>設定<rt>せってい</rt></ruby>しましょう。</p>
<p><ruby>論理<rt>ろんり</rt></ruby>カテゴリの<span style="color: #00a4a6;"><b>「0 = 0」</b></span>ブロックを出し、<b><span style="color: #00a4a6;">「もし&lt;真&gt;なら／でなければ」</span></b>ブロックの&lt;真&gt;の部分に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><span style="color: #e3008c;"><b>「<ruby>無線<rt>むせん</rt></ruby>で<ruby>受信<rt>じゅしん</rt></ruby>したとき(receivedNumber)」</b></span>ブロックにある<span style="color: #dc143c;"><b>receivedNumber</b></span>を<span style="color: #00a4a6;"><b>「0 = 0」</b></span>ブロックの<ruby>左側<rt>ひだりがわ</rt></ruby>の0の<ruby>位置<rt>いち</rt></ruby>へドラッグアンドドロップしましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat05.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4202" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat05.png" alt="受信した数値が0なら／でなければ" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat05.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat05-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat05-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat05-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat05-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat05-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat05-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>これで<b>「<ruby>受信<rt>じゅしん</rt></ruby>した<ruby>数値<rt>すうち</rt></ruby>が0なら」</b>という<ruby>条件<rt>じょうけん</rt></ruby>になりました。</p>
<p>&nbsp;</p>
<h2><span id="toc6">受信した数値が1だった場合</span></h2>
<p>「<ruby>受信<rt>じゅしん</rt></ruby>した<ruby>数値<rt>すうち</rt></ruby>が0でなければ」の時の<ruby>処理<rt>しょり</rt></ruby>を作ります。</p>
<p><ruby>受信<rt>じゅしん</rt></ruby>した<ruby>数値<rt>すうち</rt></ruby>が0でない場合、<ruby>受信<rt>じゅしん</rt></ruby>した<ruby>数値<rt>すうち</rt></ruby>は1なので長い<ruby>信号<rt>しんごう</rt></ruby>「－」を<ruby>表示<rt>ひょうじ</rt></ruby>します。</p>
<p><ruby>基本<rt>きほん</rt></ruby>カテゴリから<span style="color: #1e90ff;"><b>「LED画面に<ruby>表示<rt>ひょうじ</rt></ruby>」</b></span>ブロックを出し、<span style="color: #00a4a6;"><b>「もし receivedNumber = 0 なら／でなければ」</b></span>ブロックの「でなければ」の下に<ruby>配置<rt>はいち</rt></ruby>しましょう。</p>
<p>中央の3つならんだLEDを<ruby>点灯<rt>てんとう</rt></ruby>させて<b>「－」</b>をかきます。</p>
<p>&nbsp;</p>
<p>音も<ruby>追加<rt>ついか</rt></ruby>しましょう。</p>
<p>音楽カテゴリから<span style="color: #e63022;"><b>「音を鳴らす」</b></span>ブロックを出し、<span style="color: #1e90ff;"><b>「LED画面に<ruby>表示<rt>ひょうじ</rt></ruby>」</b></span>ブロックの下に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>音の高さや長さはそのままでOK。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat06.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4203" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat06.png" alt="受信した数値が1の時の処理" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat06.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat06-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat06-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat06-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat06-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat06-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat06-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc7">受信した数値が0だった場合</span></h2>
<p>「<ruby>受信<rt>じゅしん</rt></ruby>した<ruby>数値<rt>すうち</rt></ruby>が0なら」の時の<ruby>処理<rt>しょり</rt></ruby>を作ります。</p>
<p><ruby>受信<rt>じゅしん</rt></ruby>した<ruby>数値<rt>すうち</rt></ruby>が0の場合は、短い<ruby>信号<rt>しんごう</rt></ruby>「・」です。</p>
<p><ruby>基本<rt>きほん</rt></ruby>カテゴリから<span style="color: #1e90ff;"><b>「LED画面に<ruby>表示<rt>ひょうじ</rt></ruby>」</b></span>ブロックを出し、<span style="color: #00a4a6;"><b>「もし receivedNumber = 0 なら／でなければ」</b></span>ブロックの「もし receivedNumber = 0 なら」の下に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>中央のLEDを<ruby>点灯<rt>てんとう</rt></ruby>させて、<b>「・」</b>をかきます。</p>
<p>&nbsp;</p>
<p>音も<ruby>追加<rt>ついか</rt></ruby>しましょう。</p>
<p>音楽カテゴリから<span style="color: #e63022;"><b>「音を鳴らす」</b></span>ブロックを出し、<span style="color: #1e90ff;"><b>「LED画面に<ruby>表示<rt>ひょうじ</rt></ruby>」</b></span>ブロックの下に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>音の高さはそのまま。長さは－より短くしたいので<b>1/4<ruby>拍<rt>はく</rt></ruby></b>にしましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat07.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4204" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat07.png" alt="受信した数値が0だった時の処理" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat07.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat07-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat07-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat07-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat07-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat07-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat07-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc8">LED画面の表示を消す</span></h2>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat08.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4205" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat08.png" alt="MorseChatプログラム" width="800" height="750" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat08.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat08-500x469.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat08-300x281.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat08-768x720.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>このままだとLED画面に「－」や「・」が<ruby>表示<rt>ひょうじ</rt></ruby>されっぱなしなので、LED画面の<ruby>表示<rt>ひょうじ</rt></ruby>を消しましょう。</p>
<p><ruby>基本<rt>きほん</rt></ruby>カテゴリから<span style="color: #1e90ff;"><b>「<ruby>表示<rt>ひょうじ</rt></ruby>を消す」</b></span>ブロックを出し、<span style="color: #00a4a6;"><b>「もし receivedNumber = 0 なら／でなければ」</b></span>ブロックの下に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>&nbsp;</p>
<h2><span id="toc9">グループ番号を設定</span></h2>
<p>これでチュートリアルのプログラムは<ruby>完成<rt>かんせい</rt></ruby>です。</p>
<p>しかし、チュートリアル「<a rel="noopener" target="_self" href="https://living-maou.com/microbit-tutorial06/">マイクロチャット(Micro Chat)<span class="fa fa-external-link internal-icon anchor-icon"></span></a>」をやったことのある人は、<b><ruby>無線<rt>むせん</rt></ruby>のグループを<ruby>設定<rt>せってい</rt></ruby>しなくていいの？</b>と思ったのではないでしょうか。</p>
<p>&nbsp;</p>
<p><span style="color: #e3008c;"><b>「<ruby>無線<rt>むせん</rt></ruby>のグループを<ruby>設定<rt>せってい</rt></ruby>」</b></span>ブロックを使ってグループ番号を<ruby>設定<rt>せってい</rt></ruby>しなかった場合、<b>プログラムが勝手にグループ番号を決めてしまいます</b>。</p>
<p><span class="marker-under-red">全く同じプログラムを<ruby>複数<rt>ふくすう</rt></ruby>のマイクロビットにダウンロードロードした場合、同じグループ番号になり、おたがい<ruby>通信<rt>つうしん</rt></ruby>することができます。</span></p>
<p>しかし、一部のマイクロビットにだけ<ruby>変更<rt>へんこう</rt></ruby>を<ruby>加<rt>くわ</rt></ruby>えると、<ruby>別々<rt>べつべつ</rt></ruby>のグループになってしまい<ruby>通信<rt>つうしん</rt></ruby>できなくなってしまいます。</p>
<p><ruby>無線<rt>むせん</rt></ruby><ruby>通信<rt>つうしん</rt></ruby>を使うプログラムを作る場合は、グループ番号を<ruby>設定<rt>せってい</rt></ruby>した方がいいと思います。</p>
<p>&nbsp;</p>
<p><b>「<ruby>完了<rt>かんりょう</rt></ruby>」</b>をクリックすると、チュートリアルが<ruby>完了<rt>かんりょう</rt></ruby>し、<ruby>全<rt>すべ</rt></ruby>てのブロックが使えるようになります。</p>
<p><span style="color: #1e90ff;"><b>「<ruby>最初<rt>さいしょ</rt></ruby>だけ」</b></span>ブロックの中に<span style="color: #e3008c;"><b>「<ruby>無線<rt>むせん</rt></ruby>のグループを<ruby>設定<rt>せってい</rt></ruby>」</b></span>ブロックを<ruby>配置<rt>はいち</rt></ruby>しましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat09.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4206" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat09.png" alt="チュートリアルを完了する" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat09.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat09-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat09-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat09-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat09-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat09-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat09-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>近くにいる<ruby>別<rt>べつ</rt></ruby>のグループと番号がカブらない、<ruby>好<rt>す</rt></ruby>きなグループ番号を<ruby>設定<rt>せってい</rt></ruby>してください。</p>
<p>&nbsp;</p>
<h2><span id="toc10">シミュレーターで確認する</span></h2>
<p>シミュレーターで作ったプログラムを<ruby>試<rt>ため</rt></ruby>してみましょう。</p>
<p>シミュレーターのロゴをタッチすると、2つ目のマイクロビットが<ruby>表示<rt>ひょうじ</rt></ruby>されます。（画面が小さいと<ruby>表示<rt>ひょうじ</rt></ruby>されないことがあります）</p>
<p>もう一度ロゴをタッチすると、もう一方のマイクロビットにメッセージを<ruby>送信<rt>そうしん</rt></ruby>します。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat10.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4207" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat10.png" alt="シミュレーターでプログラムを確認" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat10.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat10-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat10-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat10-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat10-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat10-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat10-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<div class="blank-box bb-blue">
<ul>
<li>ロゴを短くタッチ：短い<ruby>信号<rt>しんごう</rt></ruby>「・」を<ruby>送信<rt>そうしん</rt></ruby>。</li>
<li>ロゴを長くタッチ（3つ数える）：長い<ruby>信号<rt>しんごう</rt></ruby>「－」を<ruby>送信<rt>そうしん</rt></ruby>。</li>
</ul>
</div>
<p>&nbsp;</p>
<h2><span id="toc11">マイクロビットにプログラムを転送する</span></h2>
<p>シミュレーターで正しく動くことを<ruby>確認<rt>かくにん</rt></ruby>できたら、マイクロビットに転送して動かしてみましょう。</p>
<p><ruby>実機<rt>じっき</rt></ruby>で動かす場合、マイクロビット（V2.0～）が2台<ruby>以上<rt>いじょう</rt></ruby><ruby>必要<rt>ひつよう</rt></ruby>です。</p>
<p>マイクロビットにプログラムを転送する<ruby>方法<rt>ほうほう</rt></ruby>は「<a rel="noopener" target="_self" href="https://living-maou.com/microbit-usb-connection/">【マイクロビット】パソコンとのつなぎ方・外し方、プログラムの転送<ruby>方法<rt>ほうほう</rt></ruby><span class="fa fa-external-link internal-icon anchor-icon"></span></a>」でくわしく<ruby>紹介<rt>しょうかい</rt></ruby>しています。</p>
<p>&nbsp;</p>
<p>V1.5のマイクロビットでも、ロゴをタッチのコンテナを消せば、<ruby>受信<rt>じゅしん</rt></ruby>だけなら<ruby>可能<rt>かのう</rt></ruby>になります。</p>
<p><ruby>送信<rt>そうしん</rt></ruby>したい場合、ロゴのタッチはボタンなどで代用しましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat11.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4208" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat11.png" alt="V1.5のマイクロビットでやる場合" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat11.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat11-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat11-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat11-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat11-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat11-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-morsechat11-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc12">まとめ</span></h2>
<p><b>「モールス<ruby>符号<rt>ふごう</rt></ruby>で話そう（Morse Chat）」</b>について<ruby>紹介<rt>しょうかい</rt></ruby>しました。</p>
<h3><span id="toc13">今回使用したブロック</span></h3>
<div class="blank-box bb-blue">
<ul>
<li><b><span style="color: #e3008c;">「<ruby>無線<rt>むせん</rt></ruby>で<ruby>数値<rt>すうち</rt></ruby>を<ruby>送信<rt>そうしん</rt></ruby>」</span>ブロック</b><br />
<ruby>無線<rt>むせん</rt></ruby><ruby>通信<rt>つうしん</rt></ruby>で、同じグループのマイクロビットに<ruby>数値<rt>すうち</rt></ruby>を<ruby>送信<rt>そうしん</rt></ruby>します。<br />
<em>　</em></li>
<li><b><span style="color: #e3008c;">「<ruby>無線<rt>むせん</rt></ruby>で<ruby>受信<rt>じゅしん</rt></ruby>したとき(receivedNumber)」</span>ブロック</b><br />
マイクロビットが<ruby>無線<rt>むせん</rt></ruby>で<ruby>数値<rt>すうち</rt></ruby>を<ruby>受信<rt>じゅしん</rt></ruby>したとき、中に<ruby>配置<rt>はいち</rt></ruby>したプログラムを実行します。receivedNumberには、<ruby>受信<rt>じゅしん</rt></ruby>した<ruby>数値<rt>すうち</rt></ruby>が<ruby>記憶<rt>きおく</rt></ruby>されています。<br />
<em>　</em></li>
<li><b><span style="color: #00a4a6;">「もし&lt;真&gt;なら／でなければ」</span>ブロック</b><br />
もし<ruby>条件<rt>じょうけん</rt></ruby>が正しい（真）場合、「なら」の下にある<ruby>命令<rt>めいれい</rt></ruby>を実行します。正しくない（<ruby>偽<rt>ぎ</rt></ruby>）場合は、「でなければ」の下にある<ruby>命令<rt>めいれい</rt></ruby>を実行します。</li>
</ul>
</div>
<p>&nbsp;</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/microbit-touchsensor/">ロゴ<span class="fa fa-external-link internal-icon anchor-icon"></span></a>と<a rel="noopener" target="_self" href="https://living-maou.com/microbit-radio/"><ruby>無線<rt>むせん</rt></ruby><ruby>通信<rt>つうしん</rt></ruby><ruby>機能<rt>きのう</rt></ruby><span class="fa fa-external-link internal-icon anchor-icon"></span></a>の使い方は、下の記事でくわしく<ruby>解説<rt>かいせつ</rt></ruby>しています。</p>
<div class="blogcard-type bct-together">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-touchsensor/" title="【マイクロビット×メイクコード】ロゴ（タッチセンサー）を使った簡単なプログラムを作ってみよう" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_logo-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_logo-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_logo-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_logo.jpg 800w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_logo-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_logo-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_logo-1536x864.jpg 1536w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_logo-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_logo-320x180.jpg 320w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット×メイクコード】ロゴ（タッチセンサー）を使った簡単なプログラムを作ってみよう</div><div class="blogcard-snippet internal-blogcard-snippet">マイクロビットのタッチロゴの機能とかんたんなプログラムを紹介。【リビングの魔王】ではタッチロゴに関するブロックの使い方を、かんたんなプログラムを例に使いつつ初心者にも分かりやすいようていねいに紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<div class="blogcard-type bct-together">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-radio/" title="【マイクロビット×メイクコード】無線通信機能でマリオの世界を再現！ハテナブロックを作ろう" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2021/01/eyecatch_microbit_radio-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2021/01/eyecatch_microbit_radio-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2021/01/eyecatch_microbit_radio-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2021/01/eyecatch_microbit_radio.jpg 800w, https://living-maou.com/wp-content/uploads/2021/01/eyecatch_microbit_radio-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2021/01/eyecatch_microbit_radio-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2021/01/eyecatch_microbit_radio-1536x864.jpg 1536w, https://living-maou.com/wp-content/uploads/2021/01/eyecatch_microbit_radio-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2021/01/eyecatch_microbit_radio-320x180.jpg 320w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット×メイクコード】無線通信機能でマリオの世界を再現！ハテナブロックを作ろう</div><div class="blogcard-snippet internal-blogcard-snippet">マイクロビットの無線通信機能を使ったプログラムを紹介。【リビングの魔王】ではマリオの「ハテナブロック」とブロックを叩いた数を数える「コインカウンター」の作り方を初心者にも分かりやすいようていねいに紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<p>&nbsp;</p>
<div class="blogcard-type bct-next">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-tutorial10/" title="【マイクロビット×MakeCode】クラップライト（チュートリアル：Clap Lights）" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-160x90.png" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights-320x180.png 320w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-claplights.png 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット×MakeCode】クラップライト（チュートリアル：Clap Lights）</div><div class="blogcard-snippet internal-blogcard-snippet">MakeCode for micro:bitのチュートリアル「クラップライト（Clap Lights）」について解説。手をたたいた音でLEDを点灯／消灯するプログラムを作ります。【リビングの魔王】では初心者にも分かりやすいよう丁寧に紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://living-maou.com/microbit-tutorial09/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【マイクロビット×MakeCode】カウントダウン（チュートリアル：Countdown）</title>
		<link>https://living-maou.com/microbit-tutorial08/</link>
					<comments>https://living-maou.com/microbit-tutorial08/#respond</comments>
		
		<dc:creator><![CDATA[メソ]]></dc:creator>
		<pubDate>Fri, 05 Aug 2022 05:05:54 +0000</pubDate>
				<category><![CDATA[micro:bit]]></category>
		<category><![CDATA[MakeCode]]></category>
		<guid isPermaLink="false">https://living-maou.com/?p=4161</guid>

					<description><![CDATA[この記事では、MakeCode for micro:bitのチュートリアル「カウントダウン（Countdown）」について紹介しょうかいします。 「カウントダウン（Countdown）」では、マリオカートのスタートのよう [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4162" src="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown.png" alt="" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown.png 800w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>この記事では、MakeCode for micro:bitのチュートリアル<b>「カウントダウン（Countdown）」</b>について<ruby>紹介<rt>しょうかい</rt></ruby>します。</p>
<p>「カウントダウン（Countdown）」では、マリオカートのスタートのような「3（ピッ）、2（ピッ）、1（ピッ）、GO!（ピー）」という音つきでカウントダウンするプログラムを作ります。</p>
<p>V2.0用のチュートリアルですが、V1.5でもスピーカーをつければ<ruby>作成<rt>さくせい</rt></ruby><ruby>可能<rt>かのう</rt></ruby>です。</p>
<p>&nbsp;</p>
<div class="blogcard-type bct-prev">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-tutorial07" title="【マイクロビット×MakeCode】ペットハムスター（チュートリアル：Pet Hamster）" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2022/07/eyecatch-pethamster-160x90.png" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2022/07/eyecatch-pethamster-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch-pethamster-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch-pethamster-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch-pethamster-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch-pethamster-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch-pethamster-320x180.png 320w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch-pethamster.png 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット×MakeCode】ペットハムスター（チュートリアル：Pet Hamster）</div><div class="blogcard-snippet internal-blogcard-snippet">MakeCode for micro:bitのチュートリアル「ペットハムスター（Pet Hamster）」について解説。プログラミングで自分だけのペットを作ります。【リビングの魔王】では初心者にも分かりやすいよう手順を丁寧に紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<h2><span id="toc1">チュートリアルを開始する</span></h2>
<p>MakeCode for micro:bitの<a rel="noopener" target="_blank" href="https://makecode.microbit.org/">ホーム画面<span class="fa fa-external-link external-icon anchor-icon"></span></a>を開きます。</p>
<p>チュートリアル<b>「Countdown」</b>を<ruby>選択<rt>せんたく</rt></ruby>し、ブロックの<b>「チュートリアルを開始」</b>をクリックしましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown01.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4163" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown01.png" alt="「Countdown」のチュートリアルを開始する" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown01.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown01-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown01-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown01-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown01-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown01-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown01-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc2">不要なブロックを消す</span></h2>
<p><span style="color: #1e90ff;"><b>「ずっと」</b></span>ブロックは今回使わないので消しましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-3467" src="https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02.png" alt="「ずっと」ブロックを消す" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02.png 800w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc3">くりかえすブロックを使って同じ音を3回鳴らす</span></h2>
<p>ループカテゴリにある<span style="color: #00aa00;"><b>「<ruby>変数<rt>へんすう</rt></ruby>カウンターを0～4に<ruby>変<rt>か</rt></ruby>えてくりかえす」</b></span>ブロックを出し、<span style="color: #1e90ff;"><b>「<ruby>最初<rt>さいしょ</rt></ruby>だけ」</b></span>ブロックの中に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>3回くりかえしたいので、0～4の終わりの<ruby>値<rt>あたい</rt></ruby>を2に<ruby>変更<rt>へんこう</rt></ruby>します。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown02.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4164" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown02.png" alt="「変数カウンターを0～4に変えてくりかえす」ブロック" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown02.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown02-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown02-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown02-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown02-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown02-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown02-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<div class="blank-box bb-tab bb-memo bb-blue"><b><span style="color: #00aa00;">「<ruby>変数<rt>へんすう</rt></ruby>カウンターを0～4に<ruby>変<rt>か</rt></ruby>えてくりかえす」</span>ブロック</b><br />
<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「カウンター」</b></span>の<ruby>値<rt>あたい</rt></ruby>を0から終わりの<ruby>値<rt>ね</rt></ruby>まで1ずつ<ruby>増<rt>ふ</rt></ruby>やしながら、中に<ruby>配置<rt>はいち</rt></ruby>したプログラムを実行します。</div>
<p>&nbsp;</p>
<h3><span id="toc4">「変数カウンターを0～4に変えてくりかえす」ブロックの動き</span></h3>
<p><span style="color: #00aa00;"><b>「<ruby>変数<rt>へんすう</rt></ruby>カウンターを0～4に<ruby>変<rt>か</rt></ruby>えてくりかえす」</b></span>ブロックの動きをくわしく<ruby>解説<rt>かいせつ</rt></ruby>します。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown03.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4165" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown03.png" alt="「変数カウンターを0～4に変えてくりかえす」ブロック" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown03.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown03-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown03-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown03-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown03-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown03-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown03-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<h4>変数「カウンター」で何回くり返したか数える</h4>
<p><span style="color: #dc143c;"><b>「カウンター」</b></span>は、何回くり返したか数えるための<ruby>変数<rt>へんすう</rt></ruby>です。</p>
<p>カウンターは0から数え始めるので、終わりの<ruby>値<rt>あたい</rt></ruby>は<b>「くり返したい回数 &#8211; 1」</b>を<ruby>設定<rt>せってい</rt></ruby>します。</p>
<p>なので、3回くり返したい場合は<span style="color: #00aa00;"><b>「<ruby>変数<rt>へんすう</rt></ruby>カウンターを<span style="color: #ff0000;">0～2</span>に<ruby>変<rt>か</rt></ruby>えてくりかえす」</b></span>になります。</p>
<p>&nbsp;</p>
<p><span style="color: #ff0000;"><b><ruby>変数<rt>へんすう</rt></ruby></b></span>とは、プログラムで使う数字や文字のようなデータを<ruby>一時的<rt>いちじてき</rt></ruby>に<ruby>保存<rt>ほぞん</rt></ruby>するための場所のことです。よく<b>数字や文字を入れておく箱</b>と言われたりします。</p>
<p><ruby>変数<rt>へんすう</rt></ruby>については「<a rel="noopener" target="_self" href="https://living-maou.com/scratch-variable/"><ruby>変数<rt>へんすう</rt></ruby>とは？スクラッチ（Scratch）を使ってわかりやすく<ruby>解説<rt>かいせつ</rt></ruby><span class="fa fa-external-link internal-icon anchor-icon"></span></a>」でくわしく<ruby>解説<rt>かいせつ</rt></ruby>しています。</p>
<p>&nbsp;</p>
<h4>「変数カウンターを0～4に変えてくりかえす」ブロックの動き</h4>
<p><span style="color: #00aa00;"><b>「<ruby>変数<rt>へんすう</rt></ruby>カウンターを<span style="color: #ff0000;">0～2</span>に<ruby>変<rt>か</rt></ruby>えてくりかえす」</b></span>の動きが分かりにくいかもしれません。</p>
<p><span style="color: #00aa00;"><b>「<ruby>変数<rt>へんすう</rt></ruby>カウンターを<span style="color: #ff0000;">0～2</span>に<ruby>変<rt>か</rt></ruby>えてくりかえす」</b></span>ブロックの動きを<ruby>分解<rt>ぶんかい</rt></ruby>してみると、分かりやすくなります。</p>
<div class="blank-box bb-blue">
<ol>
<li><ruby>変数<rt>へんすう</rt></ruby>「カウンター」を0にする<br />
<em>　</em></li>
<li><ruby>変数<rt>へんすう</rt></ruby>「カウンター」の<ruby>判定<rt>はんてい</rt></ruby><br />
2.1. カウンター &lt;= 終わりの<ruby>値<rt>あたい</rt></ruby>の場合<br />
<em>　・</em>くりかえすブロックの中の<ruby>命令<rt>めいれい</rt></ruby>を実行<br />
<em>　・</em><ruby>変数<rt>へんすう</rt></ruby>「カウンター」を1<ruby>増<rt>ふ</rt></ruby>やす<br />
<em>　・</em>2へもどる<br />
<em>　</em><br />
2.2.カウンター &gt; 終わりの<ruby>値<rt>あたい</rt></ruby>の場合<br />
<em>　・</em>くりかえし<ruby>終了<rt>しゅうりょう</rt></ruby></li>
</ol>
</div>
<p>&nbsp;</p>
<p>フローチャートにすると下の<ruby>画像<rt>がぞう</rt></ruby>のようになります。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown04.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4166" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown04.png" alt="くりかえしのフローチャート" width="500" height="500" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown04.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown04-300x300.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown04-100x100.png 100w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown04-150x150.png 150w" sizes="(max-width: 500px) 100vw, 500px" /></a></p>
<p>&nbsp;</p>
<p><span style="color: #00aa00;"><b>「<ruby>変数<rt>へんすう</rt></ruby>カウンターを0～2に<ruby>変<rt>か</rt></ruby>えてくりかえす」</b></span>に当てはめてみます。</p>
<div class="blank-box bb-blue">
<ol>
<li><ruby>変数<rt>へんすう</rt></ruby>「カウンター」を0にする<br />
<em>　</em></li>
<li><ruby>変数<rt>へんすう</rt></ruby>「カウンター」= 0 ← 2<ruby>以下<rt>いか</rt></ruby></li>
<li>くりかえすブロックの中の<ruby>命令<rt>めいれい</rt></ruby>（1回目）</li>
<li><ruby>変数<rt>へんすう</rt></ruby>「カウンター」を1<ruby>増<rt>ふ</rt></ruby>やす(0+1=1)<br />
<em>　</em></li>
<li><ruby>変数<rt>へんすう</rt></ruby>「カウンター」= 1 ← 2<ruby>以下<rt>いか</rt></ruby></li>
<li>くりかえすブロックの中の<ruby>命令<rt>めいれい</rt></ruby>（2回目）</li>
<li><ruby>変数<rt>へんすう</rt></ruby>「カウンター」を1<ruby>増<rt>ふ</rt></ruby>やす(1+1=2)<br />
<em>　</em></li>
<li><ruby>変数<rt>へんすう</rt></ruby>「カウンター」= 2 ← 2<ruby>以下<rt>いか</rt></ruby></li>
<li>くりかえすブロックの中の<ruby>命令<rt>めいれい</rt></ruby>（3回目）</li>
<li><ruby>変数<rt>へんすう</rt></ruby>「カウンター」を1<ruby>増<rt>ふ</rt></ruby>やす(2+1=3)<br />
<em>　</em></li>
<li><ruby>変数<rt>へんすう</rt></ruby>「カウンター」= 3 ←2を<ruby>超<rt>こ</rt></ruby>えたのでくりかえし<ruby>終了<rt>しゅうりょう</rt></ruby></li>
</ol>
</div>
<p>このように、ブロックの中の<ruby>命令<rt>めいれい</rt></ruby>が3回実行されます。</p>
<p>&nbsp;</p>
<h2><span id="toc5">音を鳴らす</span></h2>
<p>音楽カテゴリから<span style="color: #e63022;"><b>「音を鳴らす 高さ(Hz) 真ん中のド 長さ 1<ruby>拍<rt>ぱく</rt></ruby>」</b></span>ブロックを出し、<span style="color: #00aa00;"><b>「<ruby>変数<rt>へんすう</rt></ruby>カウンターを0～2に<ruby>変<rt>か</rt></ruby>えてくりかえす」</b></span>ブロックの中に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>音の長さは「真ん中のド」のまま、長さは「1/4<ruby>拍<rt>はく</rt></ruby>」に<ruby>変更<rt>へんこう</rt></ruby>しましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown05.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4167" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown05.png" alt="音を鳴らす" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown05.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown05-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown05-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown05-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown05-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown05-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown05-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<div class="blank-box bb-tab bb-memo bb-blue"><b><span style="color: #e63022;">「音を鳴らす 高さ(Hz) 真ん中のド 長さ 1<ruby>拍<rt>ぱく</rt></ruby>」</span>ブロック</b><br />
指定された長さの間、指定された高さの音を鳴らします。</div>
<p>&nbsp;</p>
<p>シミュレーターの音がじゃまになるようなら、シミュレーターのマイクロビットの下にあるスピーカーボタンをクリックして、ミュートにしましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown11.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4175" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown11.png" alt="スピーカーをクリックしてミュートに" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown11.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown11-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown11-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown11-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown11-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown11-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown11-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc6">カウントダウンを表示する(1)</span></h2>
<p>音がなるたびに、LED画面にカウントダウンの数字を<ruby>表示<rt>ひょうじ</rt></ruby>します。</p>
<p><ruby>基本<rt>きほん</rt></ruby>カテゴリから<span style="color: #1e90ff;"><b>「数を<ruby>表示<rt>ひょうじ</rt></ruby>」</b></span>ブロックを出し、<span style="color: #e63022;"><b>「音を鳴らす」</b></span>ブロックの下に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><span style="color: #00aa00;"><b>「くりかえし」</b></span>ブロックの中にある、<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;"><b>「カウンター」</b></span>をドラッグして取り出し、<span style="color: #1e90ff;"><b>「数を<ruby>表示<rt>ひょうじ</rt></ruby>」</b></span>ブロックの0の部分にはめこみましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown06.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4168" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown06.png" alt="カウンターの値を表示" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown06.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown06-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown06-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown06-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown06-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown06-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown06-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>シミュレーターを見てみると、<b>0 → 1 → 2</b>の<ruby>順番<rt>じゅんばん</rt></ruby>で<ruby>表示<rt>ひょうじ</rt></ruby>されています。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown12.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4169" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown12.png" alt="カウントアップ" width="500" height="900" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown12.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown12-300x540.png 300w" sizes="(max-width: 500px) 100vw, 500px" /></a></p>
<p>これではカウントダウンではなくて、カウントアップです。</p>
<p>カウントダウンになるように変更しましょう。</p>
<p>&nbsp;</p>
<h2><span id="toc7">カウントダウンを表示する(2)</span></h2>
<p>計算カテゴリから<span style="color: #9400d3;"><b>「 0 &#8211; 0 」</b></span>ブロックを出し、ドラッグして<span style="color: #1e90ff;"><b>「数を<ruby>表示<rt>ひょうじ</rt></ruby>」</b></span>ブロックの<span style="color: #dc143c;"><b>「カウンター」</b></span>と<ruby>置<rt>お</rt></ruby>きかえます。</p>
<p>すると、プログラミングエリアにグレーアウトした<span style="color: #dc143c;"><b>「カウンター」</b></span>が出てきます。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown07.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4170" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown07.png" alt="「 0 - 0 」ブロックを出す" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown07.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown07-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown07-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown07-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown07-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown07-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown07-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p><span style="color: #dc143c;"><b>「カウンター」</b></span>が見つからない場合は、<span style="color: #1e90ff;"><b>「<ruby>最初<rt>さいしょ</rt></ruby>だけ」</b></span>ブロックをドラッグして動かして、後ろにかくれているか<ruby>探<rt>さが</rt></ruby>してみてください。</p>
<p>&nbsp;</p>
<p>グレーアウトした<span style="color: #dc143c;"><b>「カウンター」</b></span>は、<span style="color: #9400d3;"><b>「 0 &#8211; 0 」</b></span>ブロックの<ruby>右側<rt>みぎがわ</rt></ruby>に入れましょう。</p>
<p><span style="color: #9400d3;"><b>「 0 &#8211; 0 」</b></span>ブロックの<ruby>左側<rt>ひだりがわ</rt></ruby>は、<b>3</b>にします。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown08.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4171" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown08.png" alt="3-カウンターを表示" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown08.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown08-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown08-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown08-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown08-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown08-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown08-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<p>なぜ、「3 &#8211; カウンター」でカウントダウンになるのでしょうか。</p>
<p>ループするたびに<span style="color: #dc143c;"><b>「カウンター」</b></span>が1つずつ<ruby>増<rt>ふ</rt></ruby>えるので、<ruby>表示<rt>ひょうじ</rt></ruby>される数が1ずつ<ruby>減<rt>へ</rt></ruby>るからです。</p>
<div class="blank-box bb-blue">
<ul>
<li>ループ1回目（カウンター = 0） … 3 &#8211; 0 = <span style="color: #ff0000;">3</span></li>
<li>ループ2回目（カウンター = 1） … 3 &#8211; 1 = <span style="color: #ff0000;">2</span></li>
<li>ループ3回目（カウンター = 2） … 3 &#8211; 2 = <span style="color: #ff0000;">1</span></li>
</ul>
</div>
<p>&nbsp;</p>
<h2><span id="toc8">GO!と表示する</span></h2>
<p><ruby>最後<rt>さいご</rt></ruby>に&#8221;GO!&#8221;と<ruby>表示<rt>ひょうじ</rt></ruby>します。</p>
<p><ruby>基本<rt>きほん</rt></ruby>カテゴリから<span style="color: #1e90ff;"><b>「文字列を<ruby>表示<rt>ひょうじ</rt></ruby>」</b></span>ブロックを出し、<span style="color: #00aa00;"><b>「<ruby>変数<rt>へんすう</rt></ruby>カウンターを0～2に<ruby>変<rt>か</rt></ruby>えてくりかえす」</b></span>ブロックの下に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>&#8220;Hello!&#8221;を &#8220;GO!&#8221;に<ruby>変更<rt>へんこう</rt></ruby>しましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown09.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4173" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown09.png" alt="&quot;GO!&quot;と表示" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown09.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown09-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown09-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown09-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown09-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown09-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown09-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc9">GO!の音を鳴らす</span></h2>
<p>&#8220;GO!&#8221;と<ruby>表示<rt>ひょうじ</rt></ruby>と同時に音を鳴らしましょう。</p>
<p>音楽カテゴリから<span style="color: #e63022;"><b>「音を鳴らす 高さ(Hz) 真ん中のド 長さ 1<ruby>拍<rt>ぱく</rt></ruby>」</b></span>ブロックを出し、<span style="color: #1e90ff;"><b>「文字列を<ruby>表示<rt>ひょうじ</rt></ruby>(&#8220;GO!&#8221;)」</b></span>ブロックの上に<ruby>配置<rt>はいち</rt></ruby>します。音の長さは「真ん中のソ」に<ruby>変更<rt>へんこう</rt></ruby>、長さは1<ruby>拍<rt>ぱく</rt></ruby>のままです。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown10.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4172" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown10.png" alt="&quot;GO!&quot;と表示と同時に音を鳴ら" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown10.png 800w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown10-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown10-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown10-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown10-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown10-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown10-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc10">シミュレーターで確認する</span></h2>
<p>シミュレーターで作ったプログラムを<ruby>試<rt>ため</rt></ruby>してみましょう。</p>
<p>スピーカーをミュートにしていた場合はオンにして<ruby>確認<rt>かくにん</rt></ruby>してみてください。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown13.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4174" src="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown13.png" alt="カウントダウン" width="500" height="900" srcset="https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown13.png 500w, https://living-maou.com/wp-content/uploads/2022/08/microbit-countdown13-300x540.png 300w" sizes="(max-width: 500px) 100vw, 500px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc11">マイクロビットにプログラムを転送する</span></h2>
<p>シミュレーターで正しく動くことを<ruby>確認<rt>かくにん</rt></ruby>できたら、マイクロビットに転送して動かしてみましょう。</p>
<p>マイクロビットにプログラムを転送する<ruby>方法<rt>ほうほう</rt></ruby>は「<a rel="noopener" target="_self" href="https://living-maou.com/microbit-usb-connection/">【マイクロビット】パソコンとのつなぎ方・外し方、プログラムの転送<ruby>方法<rt>ほうほう</rt></ruby><span class="fa fa-external-link internal-icon anchor-icon"></span></a>」でくわしく<ruby>紹介<rt>しょうかい</rt></ruby>しています。</p>
<p>前のバージョンのマイクロビット(V1.5)でもスピーカーをつければ音を鳴らすことができますよ。</p>
<p>&nbsp;</p>
<h2><span id="toc12">まとめ</span></h2>
<p>チュートリアル<b>「カウントダウン（Countdown）」</b>について<ruby>紹介<rt>しょうかい</rt></ruby>しました。</p>
<h3><span id="toc13">今回使用したブロック</span></h3>
<div class="blank-box bb-blue">
<ul>
<li><b><span style="color: #00aa00;">「<ruby>変数<rt>へんすう</rt></ruby>カウンターを0～4に<ruby>変<rt>か</rt></ruby>えてくりかえす」</span>ブロック</b><br />
<ruby>変数<rt>へんすう</rt></ruby><span style="color: #dc143c;">「カウンター」</span>の<ruby>値<rt>あたい</rt></ruby>を0から終わりの<ruby>値<rt>あたい</rt></ruby>まで1ずつ<ruby>増<rt>ふ</rt></ruby>やしながら、中に<ruby>配置<rt>はいち</rt></ruby>したプログラムを実行します。<br />
<em>　</em></li>
<li><b><span style="color: #e63022;">「音を鳴らす 高さ(Hz) 真ん中のド 長さ 1/4<ruby>拍<rt>ぱく</rt></ruby>」</span>ブロック</b><br />
指定された長さの間、指定された高さの音を鳴らします。</li>
</ul>
</div>
<p>&nbsp;</p>
<p>「<a rel="noopener" target="_self" href="https://living-maou.com/microbit-speaker/">【マイクロビット×メイクコード】スピーカーを使って音を鳴らそう<span class="fa fa-external-link internal-icon anchor-icon"></span></a>」でも、音を鳴らすブロックについて<ruby>解説<rt>かいせつ</rt></ruby>しています。</p>
<div class="blogcard-type bct-together">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-speaker/" title="【マイクロビット×メイクコード】スピーカーを使って音を鳴らそう" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_speaker-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_speaker-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_speaker-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_speaker.jpg 800w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_speaker-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_speaker-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_speaker-1536x864.jpg 1536w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_speaker-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2020/12/eyecatch_microbit_speaker-320x180.jpg 320w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット×メイクコード】スピーカーを使って音を鳴らそう</div><div class="blogcard-snippet internal-blogcard-snippet">マイクロビットのスピーカーを使って音を鳴らす方法とかんたんなプログラムを紹介。【リビングの魔王】ではスピーカーに関するブロックの使い方を、かんたんなプログラムを例に使いつつ初心者にも分かりやすいように紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<p>&nbsp;</p>
<div class="blogcard-type bct-next">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-tutorial09/" title="【マイクロビット×MakeCode】モールス符号で話そう（チュートリアル：Morse Chat）" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-160x90.png" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat-320x180.png 320w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-morsechat.png 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット×MakeCode】モールス符号で話そう（チュートリアル：Morse Chat）</div><div class="blogcard-snippet internal-blogcard-snippet">MakeCode for micro:bitのチュートリアル「モールス符号で話そう（Morse Chat）」について解説。ロゴと無線を使って他のマイクロビットとモールス符号を送受信するプログラムを作ります。【リビングの魔王】では初心者にも分かりやすいよう丁寧に紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://living-maou.com/microbit-tutorial08/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【マイクロビット×MakeCode】ペットハムスター（チュートリアル：Pet Hamster）</title>
		<link>https://living-maou.com/microbit-tutorial07/</link>
					<comments>https://living-maou.com/microbit-tutorial07/#respond</comments>
		
		<dc:creator><![CDATA[メソ]]></dc:creator>
		<pubDate>Mon, 25 Jul 2022 02:08:16 +0000</pubDate>
				<category><![CDATA[micro:bit]]></category>
		<category><![CDATA[MakeCode]]></category>
		<guid isPermaLink="false">https://living-maou.com/?p=4125</guid>

					<description><![CDATA[この記事では、MakeCode for micro:bitのチュートリアル「ペットハムスター（Pet Hamster）」について紹介しょうかいします。 「ペットハムスター（Pet Hamster）」では、自分だけのペット [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/07/eyecatch-pethamster.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4126" src="https://living-maou.com/wp-content/uploads/2022/07/eyecatch-pethamster.png" alt="" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/07/eyecatch-pethamster.png 800w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch-pethamster-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch-pethamster-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch-pethamster-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch-pethamster-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch-pethamster-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch-pethamster-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>この記事では、MakeCode for micro:bitのチュートリアル<b>「ペットハムスター（Pet Hamster）」</b>について<ruby>紹介<rt>しょうかい</rt></ruby>します。</p>
<p>「ペットハムスター（Pet Hamster）」では、自分だけのペット、マイクロビットハムスターのサイラスをプログラミング。</p>
<p>ロゴをさわってくすぐると<ruby>笑<rt>わら</rt></ruby>ったり、ゆさぶると悲しくなったり、サイラスのリアクションを作ります。</p>
<p><span style="color: #ff0000;">※新しいバージョン(V2.0～)用のチュートリアルです。</span></p>
<p>&nbsp;</p>
<div class="blogcard-type bct-prev">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-tutorial06" title="【マイクロビット×MakeCode】無線通信でマイクロチャット（チュートリアル：Micro Chat）" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2022/06/eyecatch-microchat-160x90.png" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2022/06/eyecatch-microchat-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/06/eyecatch-microchat-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/06/eyecatch-microchat-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/06/eyecatch-microchat-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/06/eyecatch-microchat-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/06/eyecatch-microchat-320x180.png 320w, https://living-maou.com/wp-content/uploads/2022/06/eyecatch-microchat.png 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット×MakeCode】無線通信でマイクロチャット（チュートリアル：Micro Chat）</div><div class="blogcard-snippet internal-blogcard-snippet">MakeCode for micro:bitのチュートリアル「マイクロチャット(Micro Chat)」について解説。無線通信を使い他のマイクロビットとメッセージを送受信するプログラムを作ります。【リビングの魔王】では初心者にも分かりやすいよう丁寧に紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
<h2><span id="toc1">チュートリアルを開始する</span></h2>
<p>MakeCode for micro:bitの<a rel="noopener" target="_blank" href="https://makecode.microbit.org/">ホーム画面<span class="fa fa-external-link external-icon anchor-icon"></span></a>を開きます。</p>
<p>チュートリアル<b>「Pet Hamster」</b>を<ruby>選択<rt>せんたく</rt></ruby>し、ブロックの<b>「チュートリアルを開始」</b>をクリックしましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster01.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4127" src="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster01.png" alt="チュートリアル「Pet Hamster」を開始" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster01.png 800w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster01-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster01-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster01-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster01-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster01-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster01-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc2">不要なブロックを消す</span></h2>
<p><span style="color: #1e90ff;"><b>「ずっと」</b></span>ブロックは今回使わないので消しましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-3467" src="https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02.png" alt="「ずっと」ブロックを消す" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02.png 800w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/05/microbit-delete02-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc3">いねむりハムスターのサイラス</span></h2>
<p><ruby>基本<rt>きほん</rt></ruby>カテゴリにある<span style="color: #1e90ff;"><b>「アイコンを<ruby>表示<rt>ひょうじ</rt></ruby>」</b></span>ブロックを<span style="color: #1e90ff;"><b>「<ruby>最初<rt>さいしょ</rt></ruby>だけ」</b></span>の中に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p>「ハート」をクリックして、「ねてる顔」に<ruby>変<rt>か</rt></ruby>えましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster02.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4128" src="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster02.png" alt="最初ねてる顔を表示する" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster02.png 800w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster02-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster02-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster02-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster02-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster02-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster02-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>ハムスターのサイラスはいつもねむそうにしています。</p>
<p>なので、<ruby>最初<rt>さいしょ</rt></ruby>はねむっているようにしましょう。</p>
<p>&nbsp;</p>
<h2><span id="toc4">くすぐったい！</span></h2>
<p>マイクロビットのロゴをおすと、サイラスはくすぐったくなり、うれしい顔になります。</p>
<p>入力カテゴリの<span style="color: #d400d4;"><b>「ロゴが短くタップされた」</b></span>ブロックを出し、中に<ruby>基本<rt>きほん</rt></ruby>カテゴリの<span style="color: #1e90ff;"><b>「アイコンを<ruby>表示<rt>ひょうじ</rt></ruby>」</b></span>ブロックを入れます。</p>
<p>アイコンは、「うれしい顔」を<ruby>選択<rt>せんたく</rt></ruby>しましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster03.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4129" src="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster03.png" alt="ロゴを短くタップするとうれしい顔を表示" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster03.png 800w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster03-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster03-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster03-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster03-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster03-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster03-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<div class="blank-box bb-tab bb-memo bb-blue"><b><span style="color: #d400d4;">「ロゴが短くタップされた」</span>ブロック</b><br />
ロゴがおされたとき、中にあるプログラムを実行します。</div>
<p>&nbsp;</p>
<h2><span id="toc5">サイラスの鳴き声</span></h2>
<p>ロゴをさわった時に、鳴き声も出るようにしましょう。</p>
<p>音楽カテゴリの<span style="color: #e63022;"><b>「<ruby>効果音<rt>こうかおん</rt></ruby>くすくす<ruby>笑<rt>わら</rt></ruby>うを鳴らして終わるまで待つ」</b></span>ブロックを出し、<span style="color: #1e90ff;"><b>「アイコンを<ruby>表示<rt>ひょうじ</rt></ruby>（うれしい顔）」</b></span>ブロックの下に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster04.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4130" src="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster04.png" alt="「効果音くすくす笑うを鳴らして終わるまで待つ」ブロックを追加" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster04.png 800w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster04-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster04-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster04-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster04-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster04-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster04-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<div class="blank-box bb-tab bb-memo bb-blue"><b><span style="color: #e63022;">「<ruby>効果音<rt>こうかおん</rt></ruby>くすくす<ruby>笑<rt>わら</rt></ruby>うを鳴らして終わるまで待つ」</span>ブロック</b><br />
<ruby>効果音<rt>こうかおん</rt></ruby>を鳴らします。<ruby>効果音<rt>こうかおん</rt></ruby>が<ruby>完了<rt>かんりょう</rt></ruby>するまで次のブロックは実行されません。</div>
<p>&nbsp;</p>
<h2><span id="toc6">ゆさぶられると……</span></h2>
<p>サイラスはゆさぶられると悲しくなります。</p>
<p>入力カテゴリから<span style="color: #d400d4;"><b>「ゆさぶられたとき」</b></span>ブロックを出し、中に<ruby>基本<rt>きほん</rt></ruby>カテゴリの<span style="color: #1e90ff;"><b>「アイコンを<ruby>表示<rt>ひょうじ</rt></ruby>」</b></span>ブロックを入れます。アイコンは、「かなしい顔」を<ruby>選択<rt>せんたく</rt></ruby>。</p>
<p>音楽カテゴリの<span style="color: #e63022;"><b>「<ruby>効果音<rt>こうかおん</rt></ruby>くすくす<ruby>笑<rt>わら</rt></ruby>うを鳴らして終わるまで待つ」</b></span>ブロックを出し、<span style="color: #1e90ff;"><b>「アイコンを<ruby>表示<rt>ひょうじ</rt></ruby>（かなしい顔）」</b></span>ブロックの下に<ruby>配置<rt>はいち</rt></ruby>します。<ruby>効果音<rt>こうかおん</rt></ruby>は「くすくす<ruby>笑<rt>わら</rt></ruby>う」をクリックして、「悲しい」に<ruby>変<rt>か</rt></ruby>えましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster05.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4131" src="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster05.png" alt="ゆさぶられると悲しい顔を表示" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster05.png 800w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster05-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster05-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster05-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster05-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster05-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster05-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc7">ふたたびねる</span></h2>
<p>サイラスがゆさぶられたり、くすぐられたりした後、またねむるようにします。</p>
<p><ruby>最初<rt>さいしょ</rt></ruby>だけブロックの中にある<span style="color: #1e90ff;"><b>「アイコンを<ruby>表示<rt>ひょうじ</rt></ruby>（ねてる顔）」</b></span>ブロックを右クリックし、「<ruby>複製<rt>ふくせい</rt></ruby>する」を<ruby>選択<rt>せんたく</rt></ruby>します。</p>
<p><span style="color: #1e90ff;"><b>「アイコンを<ruby>表示<rt>ひょうじ</rt></ruby>（ねてる顔）」</b></span>ブロックがコピーされるので、「ゆさぶられたとき」ブロックの中の一番下に<ruby>配置<rt>はいち</rt></ruby>しましょう。</p>
<p>もう一度<span style="color: #1e90ff;"><b>「アイコンを<ruby>表示<rt>ひょうじ</rt></ruby>（ねてる顔）」</b></span>ブロックをコピーして<span style="color: #d400d4;"><b>「ロゴが短くタップされた」</b></span>ブロックの中の一番下に<ruby>配置<rt>はいち</rt></ruby>します。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster06.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4132" src="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster06.png" alt="ふたたびねむっている顔を表示" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster06.png 800w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster06-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster06-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster06-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster06-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster06-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster06-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>&nbsp;</p>
<h2><span id="toc8">シミュレーターで確認する</span></h2>
<p>プログラムが<ruby>完成<rt>かんせい</rt></ruby>しました。シミュレーターでテストしてみましょう。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster07.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4133" src="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster07.png" alt="シミュレーターで確認する" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster07.png 800w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster07-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster07-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster07-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster07-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster07-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster07-320x180.png 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>ロゴをクリックすると、サイラスがくすぐられます。</p>
<p>SHAKE（「ふる」という意味）の横にある●をクリックしすると、サイラスがゆさぶられます。</p>
<p>&nbsp;</p>
<h2><span id="toc9">マイクロビットにプログラムを転送する</span></h2>
<p>シミュレーターで正しく動くことを<ruby>確認<rt>かくにん</rt></ruby>できたら、マイクロビットに転送して動かしてみましょう。</p>
<p>マイクロビットにプログラムを転送する<ruby>方法<rt>ほうほう</rt></ruby>は「<a rel="noopener" target="_self" href="https://living-maou.com/microbit-usb-connection/">【マイクロビット】パソコンとのつなぎ方・外し方、プログラムの転送<ruby>方法<rt>ほうほう</rt></ruby><span class="fa fa-external-link internal-icon anchor-icon"></span></a>」でくわしく<ruby>紹介<rt>しょうかい</rt></ruby>しています。</p>
<p>&nbsp;</p>
<h2><span id="toc10">まとめ</span></h2>
<p>チュートリアル「自分だけのペット（Pet Hamster）」について<ruby>紹介<rt>しょうかい</rt></ruby>しました。</p>
<h3><span id="toc11">今回使用したブロック</span></h3>
<p>今回から、micro:bitV2用のブロックを使っています。</p>
<div class="blank-box bb-blue">
<ul>
<li><b><span style="color: #d400d4;">「ロゴが短くタップされた」</span>ブロック</b><br />
ロゴがおされたとき、中にあるプログラムを実行します。</li>
<li><b><span style="color: #e63022;">「<ruby>効果音<rt>こうかおん</rt></ruby>くすくす<ruby>笑<rt>わら</rt></ruby>うを鳴らして終わるまで待つ」</span>ブロック</b><br />
<ruby>効果音<rt>こうかおん</rt></ruby>を鳴らします。<ruby>効果音<rt>こうかおん</rt></ruby>が<ruby>完了<rt>かんりょう</rt></ruby>するまで次のブロックは実行されません。</li>
</ul>
</div>
<p>&nbsp;</p>
<p>ロゴと音楽カテゴリのブロックの使い方は、下の記事でくわしく<ruby>解説<rt>かいせつ</rt></ruby>しています。</p>
<div class="blank-box bb-blue">
<ul>
<li><a rel="noopener" target="_self" href="https://living-maou.com/microbit-touchsensor/">ロゴ（タッチセンサー）を使った<ruby>簡単<rt>かんたん</rt></ruby>なプログラムを作ってみよう<span class="fa fa-external-link internal-icon anchor-icon"></span></a></li>
<li><a rel="noopener" target="_self" href="https://living-maou.com/microbit-speaker/">スピーカーを使った<ruby>簡単<rt>かんたん</rt></ruby>なプログラムを作ってみよう<span class="fa fa-external-link internal-icon anchor-icon"></span></a></li>
</ul>
</div>
<p><ruby>興味<rt>きょうみ</rt></ruby>があったら読んでみてくださいね。</p>
<p>&nbsp;</p>
<h3><span id="toc12">おまけの工作　よりハムスターらしく</span></h3>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster08.jpg"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4134" src="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster08.jpg" alt="ハムスターっぽくなるように工作" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster08.jpg 800w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster08-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster08-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster08-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster08-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster08-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2022/07/microbit-pethamster08-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>このままだとハムスター感がないので、ハムスターっぽくなるように工作してみました。</p>
<p>マイクロビットを工作で<ruby>装飾<rt>そうしょく</rt></ruby>するのも楽しいですね。</p>
<p>&nbsp;</p>
<div class="blogcard-type bct-next">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-tutorial08/" title="【マイクロビット×MakeCode】カウントダウン（チュートリアル：Countdown）" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-160x90.png" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-160x90.png 160w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-500x281.png 500w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-300x169.png 300w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-768x432.png 768w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-120x68.png 120w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown-320x180.png 320w, https://living-maou.com/wp-content/uploads/2022/08/eyecatch-countdown.png 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【マイクロビット×MakeCode】カウントダウン（チュートリアル：Countdown）</div><div class="blogcard-snippet internal-blogcard-snippet">MakeCode for micro:bitのチュートリアル「カウントダウン（Countdown）」を解説。レースのスタートのような「3、2、1、GO!」とカウントダウンするプログラムを作ります。【リビングの魔王】では初心者にも分かりやすいよう丁寧に紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://living-maou.com/microbit-tutorial07/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【micro:bit（マイクロビット）】3種類の電池ボックスを徹底比較</title>
		<link>https://living-maou.com/microbit-battery/</link>
					<comments>https://living-maou.com/microbit-battery/#respond</comments>
		
		<dc:creator><![CDATA[メソ]]></dc:creator>
		<pubDate>Fri, 15 Jul 2022 05:04:06 +0000</pubDate>
				<category><![CDATA[micro:bit]]></category>
		<guid isPermaLink="false">https://living-maou.com/?p=4055</guid>

					<description><![CDATA[この記事では、micro:bit（マイクロビット）用の電池ボックスを3種類紹介します。 紹介する電池ボックスは、 普通の電池ボックス バングルモジュールキット(SwitchEducation) ワンタッチ電池ボックスTF [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/07/eyecatch_microbit_batterybox.jpg"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-4056" src="https://living-maou.com/wp-content/uploads/2022/07/eyecatch_microbit_batterybox-800x450.jpg" alt="" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/07/eyecatch_microbit_batterybox.jpg 800w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch_microbit_batterybox-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch_microbit_batterybox-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch_microbit_batterybox-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch_microbit_batterybox-1536x864.jpg 1536w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch_microbit_batterybox-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch_microbit_batterybox-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2022/07/eyecatch_microbit_batterybox-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<div class="information-box common-icon-box"><span class="fz-14px">このページにはアフィリエイトリンクが含まれています。</span></div>
<p><!-- リンクを介して商品を購入した場合、当ブログに報酬が支払われることがあります。またリンクから購入しても読者様のご負担はございません。 --></p>

<p>この記事では、micro:bit（マイクロビット）用の電池ボックスを3種類紹介します。</p>
<p>紹介する電池ボックスは、</p>
<div class="blank-box bb-blue">
<ul>
<li><a href="#battery">普通の電池ボックス</a></li>
<li><a href="#bangle">バングルモジュールキット(SwitchEducation)</a></li>
<li><a href="#onetouch">ワンタッチ電池ボックスTFW-BT5(TFabWorks)</a></li>
</ul>
</div>
<p>の3種類。</p>
<div class="blank-box bb-blue">
<ul>
<li>はじめてマイクロビット用の電池ボックスを買おうと思っている</li>
<li>工作の邪魔にならないケーブルなしの電池ボックスが欲しい</li>
<li>着脱がかんたんな電池ボックスが欲しい</li>
<li>マイクロビットを腕につけて使いたい</li>
</ul>
</div>
<p>という方の、電池ボックス選びの参考になれば嬉しいです。</p>
<p>前のバージョンのマイクロビット(V1.5)と新しいバージョンのマイクロビット(V2.0)、両方に使ってみた感想もふまえて紹介します。</p>
<h2><span id="toc1">マイクロビット用電池ボックス3選</span></h2>
<div class="blank-box bb-blue">
<ul>
<li>はじめて買う人は、<a href="#battery">普通の電池ボックス</a></li>
<li>腕につけて使いたい人は、<a href="#bangle">バングルモジュール</a></li>
<li>かんたんに着脱したい人は、<a href="#onetouch">ワンタッチ電池ボックス</a></li>
</ul>
</div>
<p>がオススメです。</p>
<div class="scrollable-table"><table>
<tbody>
<tr>
<th align="center">電池ボックス</th>
<th align="center">価格</th>
<th align="center">着脱方法</th>
<th align="center">電池</th>
<th align="center">電池込みの<br />
重さ</th>
</tr>
<tr>
<td align="center">普通の電池ボックス</td>
<td align="center">300円<br />
くらい</td>
<td align="center">JST-PH<br />
コネクタ</td>
<td align="center">単三電池<br />
または<br />
単四電池</td>
<td align="center">35g<br />
くらい</td>
</tr>
<tr>
<td align="center">バングルモジュール<br />
(SwitchEducation)</td>
<td align="center">1,870円</td>
<td align="center">ネジ止め</td>
<td align="center">ボタン電池<br />
(CR2032)1個</td>
<td align="center">16g</td>
</tr>
<tr>
<td align="center">ワンタッチ電池ボックス<br />
(TFabWorks)</td>
<td align="center">1,089円</td>
<td align="center">バネプラグ</td>
<td align="center">単四電池2本</td>
<td align="center">36g</td>
</tr>
</tbody>
</table></div>
<p style="text-align: right;"><span class="fz-14px">※バングルモジュールとワンタッチ電池ボックスの価格はAmazon(2022/10/18時点)のもの。</span></p>
<p>&nbsp;</p>
<h2 id="battery"><span id="toc2">はじめて買う人は普通の電池ボックス</span></h2>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox01.jpg"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4057" src="https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox01.jpg" alt="マイクロビット用電池ボックス" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox01.jpg 800w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox01-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox01-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox01-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox01-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox01-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox01-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p><span class="marker-under-red">はじめて電池ボックスを買う人</span>は、<a rel="nofollow noopener" target="_blank" href="//af.moshimo.com/af/c/click?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062&amp;url=https%3A%2F%2Fwww.amazon.co.jp%2Fdp%2FB08SL7R9BW">普通の電池ボックス<span class="fa fa-external-link external-icon anchor-icon"></span></a><img loading="lazy" decoding="async" style="border: 0px;" src="//i.moshimo.com/af/i/impression?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062" alt="" width="1" height="1" />をおすすめします。</p>
<p>マイクロビットの裏にあるバッテリーソケットに、JST-PHコネクタを差し込んで使います。</p>
<p><span class="marker-under-red">安く手に入る</span>というのと、<span class="marker-under-red">端子を全て自由に使える</span>ので、1つは持っておきたいです。</p>
<!-- START MoshimoAffiliateEasyLink -->
<script type="text/javascript">
(function(b,c,f,g,a,d,e){b.MoshimoAffiliateObject=a;
b[a]=b[a]||function(){arguments.currentScript=c.currentScript
||c.scripts[c.scripts.length-2];(b[a].q=b[a].q||[]).push(arguments)};
c.getElementById(a)||(d=c.createElement(f),d.src=g,
d.id=a,e=c.getElementsByTagName("body")[0],e.appendChild(d))})
(window,document,"script","//dn.msmstatic.com/site/cardlink/bundle.js?20220329","msmaflink");
msmaflink({"n":"2個 セット 3V AAA バッテリー ケースカバー 電池ボックス 保護ケース for BBC Microbit マイクロビット Micro:bit 部品","b":"STEMDIY","t":"","d":"https:\/\/m.media-amazon.com","c_p":"\/images\/I","p":["\/31k00kTKAJL._SL500_.jpg","\/4116GCk9lcL._SL500_.jpg","\/41H-PfSVPyL._SL500_.jpg","\/31qw0XRnLNL._SL500_.jpg","\/31kqynRvDAL._SL500_.jpg"],"u":{"u":"https:\/\/www.amazon.co.jp\/dp\/B08SL7R9BW","t":"amazon","r_v":""},"v":"2.1","b_l":[{"id":1,"u_tx":"Amazonで見る","u_bc":"#f79256","u_url":"https:\/\/www.amazon.co.jp\/dp\/B08SL7R9BW","a_id":1826192,"p_id":170,"pl_id":27060,"pc_id":185,"s_n":"amazon","u_so":0}],"eid":"kXsDO","s":"s"});
</script>
<div id="msmaflink-kXsDO">リンク</div>
<!-- MoshimoAffiliateEasyLink END -->
<p>商品リンクは、私が買った電池ボックスがAmazonになかったので、かわりのものを選びました。</p>
<div class="blank-box bb-blue">
<ul>
<li>価格：2個850円(Amazon 2022/10/18時点)</li>
<li>電池：単四電池×2本（別売）</li>
<li>着脱方法：JST-PHコネクタ</li>
<li>大きさ：24 x 63 x 14 mm、12.3g</li>
<li>ケーブルの長さ：14.3cm</li>
<li>電池込みの重さ：34g</li>
</ul>
</div>
<p>ON/OFFスイッチ付きのシンプルな電池ボックスです。1個で売っていないのが残念。</p>
<p><a rel="noopener" target="_blank" href="https://www.monotaro.com/p/4023/3008/?utm_id=g_pla&amp;utm_medium=cpc&amp;utm_source=google&amp;utm_campaign=246-833-4061_6466659573_shopping&amp;utm_content=77481173956&amp;utm_term=_380615429419_x_aud-368712506548:pla-888444747587&amp;gclid=CjwKCAjw_b6WBhAQEiwAp4HyIIPhvCH3kutqut0dYOwLVndCGhLkvdB3FPl8AOYRnsy2_7iQocp3-xoCe-cQAvD_BwE">モノタロウ<span class="fa fa-external-link external-icon anchor-icon"></span></a>では、1個199円(2022/7/15時点)の電池ボックスがありました。</p>
<p>しかし、注文が3,500円未満（税別・商品代のみ）の場合、配送料が500円（税別）かかることを考えると、Amazonかホームセンターなどのお店で購入した方がよさそうです。</p>
<p>&nbsp;</p>
<h3><span id="toc3">普通の電池ボックスのメリット</span></h3>
<div class="blank-box bb-blue">
<ul>
<li>値段は200円くらい～、安価</li>
<li>端子を全て自由に使える</li>
<li>V1.5、V2.0どちらでも使用可能</li>
</ul>
</div>
<p>端子をタッチセンサーとして使いたい、またはマイクロビットと何かをつなげたい時に端子を自由に使うことができます。</p>
<p>&nbsp;</p>
<h3><span id="toc4">普通の電池ボックスのデメリット</span></h3>
<div class="blank-box bb-blue">
<ul>
<li>コネクタが抜けにくい！！！</li>
</ul>
</div>
<p>Amazonのレビューにもありましたが、コネクタが外しにくいです。</p>
<p>私が買った電池ボックスも外しにくかったので、この電池ボックスに限った話ではないと思います。</p>
<div class="blank-box bb-tab bb-tips bb-red">外し方のコツ：<span style="color: #ff0000;">ケーブルは引っ張らず</span>、コネクターをつまんでゆっくり外すようにしましょう。</div>
<p>かんたんに着脱したい人は、後述の<a href="#onetouch">ワンタッチ電池ボックス</a>がオススメです。</p>
<p>&nbsp;</p>
<h2 id="bangle"><span id="toc5">腕につけて使いたい人は、バングルモジュール</span></h2>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox02.jpg"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4058" src="https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox02.jpg" alt="バングルモジュール" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox02.jpg 800w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox02-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox02-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox02-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox02-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox02-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox02-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p><span class="marker-under-red">マイクロビットを腕や脚などにつけて使いたい人</span>は、<a rel="nofollow noopener" target="_blank" href="//af.moshimo.com/af/c/click?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062&amp;url=https%3A%2F%2Fwww.amazon.co.jp%2Fdp%2FB08DV92WTG">バングルモジュール<span class="fa fa-external-link external-icon anchor-icon"></span></a><img loading="lazy" decoding="async" style="border: 0px;" src="//i.moshimo.com/af/i/impression?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062" alt="" width="1" height="1" />(SwitchEducation)をオススメします。</p>
<p><span class="marker-under-red">薄くて軽い</span>ので、腕につけた時にスッキリ格好がいいです。</p>
<p><!-- START MoshimoAffiliateEasyLink --><script type="text/javascript">
(function(b,c,f,g,a,d,e){b.MoshimoAffiliateObject=a;
b[a]=b[a]||function(){arguments.currentScript=c.currentScript
||c.scripts[c.scripts.length-2];(b[a].q=b[a].q||[]).push(arguments)};
c.getElementById(a)||(d=c.createElement(f),d.src=g,
d.id=a,e=c.getElementsByTagName("body")[0],e.appendChild(d))})
(window,document,"script","//dn.msmstatic.com/site/cardlink/bundle.js?20220329","msmaflink");
msmaflink({"n":"スイッチエデュケーション micro:bit用バングルモジュールキット [micro:bit（マイクロビット）] 5272","b":"スイッチエデュケーション（Switch Education）","t":"SEDU-052726","d":"https:\/\/m.media-amazon.com","c_p":"\/images\/I","p":["\/417Tj7Zb4OL._SL500_.jpg","\/319WUB4crJL._SL500_.jpg","\/41HpiN+6NLL._SL500_.jpg"],"u":{"u":"https:\/\/www.amazon.co.jp\/dp\/B08DV92WTG","t":"amazon","r_v":""},"v":"2.1","b_l":[{"id":1,"u_tx":"Amazonで見る","u_bc":"#f79256","u_url":"https:\/\/www.amazon.co.jp\/dp\/B08DV92WTG","a_id":1826192,"p_id":170,"pl_id":27060,"pc_id":185,"s_n":"amazon","u_so":0},{"u_bc":"#f76956","u_tx":"楽天市場で見る","u_url":"https:\/\/search.rakuten.co.jp\/search\/mall\/%E3%82%B9%E3%82%A4%E3%83%83%E3%83%81%E3%82%A8%E3%83%87%E3%83%A5%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%20micro%3Abit%E7%94%A8%E3%83%90%E3%83%B3%E3%82%B0%E3%83%AB%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%E3%82%AD%E3%83%83%E3%83%88%20%5Bmicro%3Abit%EF%BC%88%E3%83%9E%E3%82%A4%E3%82%AF%E3%83%AD%E3%83%93%E3%83%83%E3%83%88%EF%BC%89%5D%205272\/","s_n":"rakuten","u_so":4,"a_id":1820957,"p_id":54,"pc_id":54,"pl_id":27059,"id":17},{"u_bc":"#66a7ff","u_tx":"Yahoo!ショッピングで見る","u_url":"https:\/\/shopping.yahoo.co.jp\/search?first=1\u0026p=%E3%82%B9%E3%82%A4%E3%83%83%E3%83%81%E3%82%A8%E3%83%87%E3%83%A5%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%20micro%3Abit%E7%94%A8%E3%83%90%E3%83%B3%E3%82%B0%E3%83%AB%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%E3%82%AD%E3%83%83%E3%83%88%20%5Bmicro%3Abit%EF%BC%88%E3%83%9E%E3%82%A4%E3%82%AF%E3%83%AD%E3%83%93%E3%83%83%E3%83%88%EF%BC%89%5D%205272","s_n":"yahoo","u_so":5,"a_id":1832853,"p_id":1225,"pc_id":1925,"pl_id":27061}],"eid":"UMF62","s":"s"});
</script></p>
<div id="msmaflink-UMF62">リンク</div>
<div class="blank-box bb-blue">
<ul>
<li>価格：1,870円(Amazon 2022/10/18時点)</li>
<li>電池：ボタン電池(CR2032)×1個（別売）</li>
<li>着脱方法：ネジ止め（0、3V、GND端子）</li>
<li>大きさ：50 x 50 x 10 mm、20g</li>
<li>電池込みの重さ：16g（バンド込みで20g）</li>
<li>スピーカー付き</li>
<li>マジックバンド付き</li>
</ul>
</div>
<p><span class="marker-under-red">スピーカーと電源が1つにまとまった</span>便利なモジュールキットです。</p>
<p>バングルモジュールの上にマイクロビットをのせ、ネジで固定して使います。</p>
<p>&nbsp;</p>
<h3><span id="toc6">バングルモジュールのメリット</span></h3>
<div class="blank-box bb-blue">
<ul>
<li>V1.5、V2.0どちらでも使用可能</li>
<li>腕につけられる（V2.0もOK）</li>
<li>ボタン電池なので軽い、薄い</li>
<li>スピーカー付き</li>
<li>マジックバンド付き</li>
</ul>
</div>
<p>V2.0より前に発売されていますが、<span class="marker-under-red">V1.5、V2.0どちらでも使用可能</span>です。</p>
<p>薄くて軽いので、腕につけた時にスッキリ格好がいいですし、工作に取りつけるのも楽だと思います。</p>
<p>マジックバンドも付いているので、購入後すぐ腕につけることが可能。</p>
<p>贅沢を言えば、もっとおしゃれでやわらかい素材のバンドが欲しいかも。</p>
<p>また、スピーカーがついているのでV1.5でも音を鳴らすことができます。（V2.0用にスピーカーなしバージョンも出して欲しい……）</p>
<p>&nbsp;</p>
<h3><span id="toc7">バングルモジュールのデメリット</span></h3>
<div class="blank-box bb-blue">
<ul>
<li>電池の寿命が短い</li>
<li>着脱に少し手間がかかる</li>
<li>0、3V、GND端子を使う</li>
</ul>
</div>
<p>ボタン電池なので、乾電池と比べると電池の寿命が短いです。</p>
<p>また、組み立てにドライバーを使ってネジ止めする必要があります。</p>
<p>少し手間がかかりますが、しっかり固定されます。つけたままにしておくのであれば問題ないと思います。</p>
<p>&nbsp;</p>
<h3><span id="toc8">開封直後に事件が・・・</span></h3>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox03.jpg"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4059" src="https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox03.jpg" alt="壊れたバングルモジュール" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox03.jpg 800w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox03-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox03-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox03-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox03-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox03-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox03-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>落として電池カバーがとれてしまいました。</p>
<p>はんだで付け直して事なきを得ましたが……衝撃に弱い？</p>
<p>とはいえマイクロビット自体、落としたらきっとアウトですよね。</p>
<p>今後は、よりていねいに扱いたいと思います（反省）</p>
<p>&nbsp;</p>
<h2 id="onetouch"><span id="toc9">かんたんに着脱したい人は、ワンタッチ電池ボックス</span></h2>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox04.jpg"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4060" src="https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox04.jpg" alt="ワンタッチ電池ボックス" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox04.jpg 800w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox04-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox04-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox04-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox04-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox04-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox04-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p><span class="marker-under-red">かんたんに電池ボックスを着脱したい人</span>は、<a rel="nofollow noopener" target="_blank" href="//af.moshimo.com/af/c/click?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062&amp;url=https%3A%2F%2Fwww.amazon.co.jp%2Fdp%2FB09NR6KK3D">ワンタッチ電池ボックス<span class="fa fa-external-link external-icon anchor-icon"></span></a><img loading="lazy" decoding="async" style="border: 0px;" src="//i.moshimo.com/af/i/impression?a_id=1826192&amp;p_id=170&amp;pc_id=185&amp;pl_id=4062" alt="" width="1" height="1" />(TFabWorks)をオススメします。</p>
<p><!-- START MoshimoAffiliateEasyLink --><script type="text/javascript">
(function(b,c,f,g,a,d,e){b.MoshimoAffiliateObject=a;
b[a]=b[a]||function(){arguments.currentScript=c.currentScript
||c.scripts[c.scripts.length-2];(b[a].q=b[a].q||[]).push(arguments)};
c.getElementById(a)||(d=c.createElement(f),d.src=g,
d.id=a,e=c.getElementsByTagName("body")[0],e.appendChild(d))})
(window,document,"script","//dn.msmstatic.com/site/cardlink/bundle.js?20220329","msmaflink");
msmaflink({"n":"micro:bit（マイクロビット）用ワンタッチ電池ボックス TFW-BT5","b":"TFabWorks","t":"TFW-BT5","d":"https:\/\/m.media-amazon.com","c_p":"\/images\/I","p":["\/31xB+iuFZ9L._SL500_.jpg","\/41cq9qgJXiL._SL500_.jpg","\/518+kq4feBL._SL500_.jpg","\/41Xx4WkNYNL._SL500_.jpg"],"u":{"u":"https:\/\/www.amazon.co.jp\/dp\/B09NR6KK3D","t":"amazon","r_v":""},"v":"2.1","b_l":[{"id":1,"u_tx":"Amazonで見る","u_bc":"#f79256","u_url":"https:\/\/www.amazon.co.jp\/dp\/B09NR6KK3D","a_id":1826192,"p_id":170,"pl_id":27060,"pc_id":185,"s_n":"amazon","u_so":0},{"u_bc":"#66a7ff","u_tx":"Yahoo!ショッピングで見る","u_url":"https:\/\/shopping.yahoo.co.jp\/search?first=1\u0026p=micro%3Abit%EF%BC%88%E3%83%9E%E3%82%A4%E3%82%AF%E3%83%AD%E3%83%93%E3%83%83%E3%83%88%EF%BC%89%E7%94%A8%E3%83%AF%E3%83%B3%E3%82%BF%E3%83%83%E3%83%81%E9%9B%BB%E6%B1%A0%E3%83%9C%E3%83%83%E3%82%AF%E3%82%B9%20TFW-BT5","s_n":"yahoo","u_so":1,"a_id":1832853,"p_id":1225,"pc_id":1925,"pl_id":27061,"id":18}],"eid":"5o3lB","s":"s"});
</script></p>
<div id="msmaflink-5o3lB">リンク</div>
<div class="blank-box bb-blue">
<ul>
<li>価格：1,089円(Amazon 2022/7/15時点)</li>
<li>電池：単四電池×2本（別売）</li>
<li>着脱方法：バネプラグ（0、3V、GND端子）</li>
<li>大きさ：50 x 50 x 22 mm、10g</li>
<li>電池込みの重さ：36g</li>
</ul>
</div>
<p>ワンタッチ電池ボックスの上にマイクロビットをのせ、0、3V、GND端子のリングにバネプラグ入れて使います。</p>
<p>力のない<span class="marker-under-red">子どもでもかんたんに着脱</span>することができます。</p>
<p>&nbsp;</p>
<h3><span id="toc10">ワンタッチ電池ボックスのメリット</span></h3>
<div class="blank-box bb-blue">
<ul>
<li>V1.5、V2.0どちらでも使用可能</li>
<li>かんたんに着けたり外したりできる</li>
<li>ケーブルがないのでスッキリ使える</li>
</ul>
</div>
<p>こちらもV2.0より前に発売されていますが、V1.5、V2.0どちらでも使用可能です。</p>
<p>端子のリングにバネプラグ入れるだけで着脱できます。</p>
<p>邪魔に感じがちなケーブルがないので、スッキリ使うことができますよ。</p>
<p>&nbsp;</p>
<h3><span id="toc11">ワンタッチ電池ボックスのデメリット</span></h3>
<div class="blank-box bb-blue">
<ul>
<li>腕につけられるけど……</li>
<li>マジックバンドはついていない</li>
<li>0、3V、GND端子を使う</li>
</ul>
</div>
<p>マジックバンドなどを使えば腕につけることができますが、<span class="marker-under-red">マジックバンドは付いていない</span>ので自分で用意する必要があります。</p>
<p>試しにバングルモジュールに付いていたマジックバンドを使って腕につけてみたのですが、V2.0はスピーカーにつっかえて本体が浮いてしまいました。</p>
<p><a rel="noopener" target="_self" href="https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox05.jpg"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4061" src="https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox05.jpg" alt="ワンタッチ電池ボックス　腕につける" width="800" height="450" srcset="https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox05.jpg 800w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox05-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox05-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox05-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox05-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox05-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2022/07/microbit-batterybox05-320x180.jpg 320w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>V2.0の場合、薄い素材のベルトにしないとちょっとカッコ悪いかも。</p>
<p>V1.5は問題なく腕につけられました。</p>
<p>また、乾電池なので厚みがあり重たいです。腕につける目的で購入するのであれば、<a href="#bangle">バングルモジュール</a>の方が使いやすいと思います。</p>
<p>&nbsp;</p>
<h3><span id="toc12">スピーカー付きもあります</span></h3>
<p>ご参考までにスピーカー付きも紹介します。</p>
<p><!-- START MoshimoAffiliateEasyLink --><script type="text/javascript">
(function(b,c,f,g,a,d,e){b.MoshimoAffiliateObject=a;
b[a]=b[a]||function(){arguments.currentScript=c.currentScript
||c.scripts[c.scripts.length-2];(b[a].q=b[a].q||[]).push(arguments)};
c.getElementById(a)||(d=c.createElement(f),d.src=g,
d.id=a,e=c.getElementsByTagName("body")[0],e.appendChild(d))})
(window,document,"script","//dn.msmstatic.com/site/cardlink/bundle.js?20220329","msmaflink");
msmaflink({"n":"micro:bit（マイクロビット）用 電池ボックス（スピーカー付き） (1個)","b":"TFabWorks","t":"TFW-BT3","d":"https:\/\/m.media-amazon.com","c_p":"\/images\/I","p":["\/41Z4nX3CjSL._SL500_.jpg","\/51MU3GdFNkL._SL500_.jpg","\/41zuaZL2XlL._SL500_.jpg","\/51EKAkFGiOL._SL500_.jpg"],"u":{"u":"https:\/\/www.amazon.co.jp\/dp\/B07MDBJ2NY","t":"amazon","r_v":""},"v":"2.1","b_l":[{"id":1,"u_tx":"Amazonで見る","u_bc":"#f79256","u_url":"https:\/\/www.amazon.co.jp\/dp\/B07MDBJ2NY","a_id":1826192,"p_id":170,"pl_id":27060,"pc_id":185,"s_n":"amazon","u_so":0},{"u_bc":"#66a7ff","u_tx":"Yahoo!ショッピングで見る","u_url":"https:\/\/shopping.yahoo.co.jp\/search?first=1\u0026p=micro%3Abit%EF%BC%88%E3%83%9E%E3%82%A4%E3%82%AF%E3%83%AD%E3%83%93%E3%83%83%E3%83%88%EF%BC%89%E7%94%A8%20%E9%9B%BB%E6%B1%A0%E3%83%9C%E3%83%83%E3%82%AF%E3%82%B9%EF%BC%88%E3%82%B9%E3%83%94%E3%83%BC%E3%82%AB%E3%83%BC%E4%BB%98%E3%81%8D%EF%BC%89%20(1%E5%80%8B)","s_n":"yahoo","u_so":2,"a_id":1832853,"p_id":1225,"pc_id":1925,"pl_id":27061,"id":18}],"eid":"mFkR4","s":"s"});
</script></p>
<div id="msmaflink-mFkR4">リンク</div>
<div class="blank-box bb-blue">
<ul>
<li>価格：2,118円(Amazon 2022/10/18時点)</li>
<li>電池：単四電池×2本（別売）</li>
<li>着脱方法：バネプラグ（0、3V、GND端子）</li>
<li>大きさ：50 x 53 x 23 mm、20g</li>
<li>マジックバンド付き</li>
</ul>
</div>
<p>こちらはマジックバンドが付いています。</p>
<p>V1.5はこっちの方がいいかも。</p>
<p>&nbsp;</p>
<h2><span id="toc13">まとめ</span></h2>
<p>3種類の電池ボックスを紹介しました。</p>
<div class="scrollable-table"><table>
<tbody>
<tr>
<th align="center">電池ボックス</th>
<th align="center">価格</th>
<th align="center">着脱方法</th>
<th align="center">電池</th>
<th align="center">電池込みの<br />
重さ</th>
</tr>
<tr>
<td align="center">普通の電池ボックス</td>
<td align="center">300円<br />
くらい</td>
<td align="center">JST-PH<br />
コネクタ</td>
<td align="center">単三電池<br />
または<br />
単四電池</td>
<td align="center">35g<br />
くらい</td>
</tr>
<tr>
<td align="center">バングルモジュール<br />
(SwitchEducation)</td>
<td align="center">1,870円</td>
<td align="center">ネジ止め</td>
<td align="center">ボタン電池<br />
(CR2032)1個</td>
<td align="center">16g</td>
</tr>
<tr>
<td align="center">ワンタッチ電池ボックス<br />
(TFabWorks)</td>
<td align="center">1,089円</td>
<td align="center">バネプラグ</td>
<td align="center">単四電池2本</td>
<td align="center">36g</td>
</tr>
</tbody>
</table></div>
<p style="text-align: right;"><span class="fz-14px">※バングルモジュールとワンタッチ電池ボックスの価格はAmazon(2022/10/18時点)のもの。</span></p>
<p>&nbsp;</p>
<div class="blank-box bb-blue">
<ul>
<li>はじめて電池ボックスを買う人は、<b>普通の電池ボックス</b></li>
<li>マイクロビットを腕につけて使いたい人は、<b>バングルモジュールキット</b></li>
<li>かんたんに着脱したい人は、<b>ワンタッチ電池ボックス</b></li>
</ul>
</div>
<p>がオススメです。</p>
<p>&nbsp;</p>
<!-- START MoshimoAffiliateEasyLink -->
<script type="text/javascript">
(function(b,c,f,g,a,d,e){b.MoshimoAffiliateObject=a;
b[a]=b[a]||function(){arguments.currentScript=c.currentScript
||c.scripts[c.scripts.length-2];(b[a].q=b[a].q||[]).push(arguments)};
c.getElementById(a)||(d=c.createElement(f),d.src=g,
d.id=a,e=c.getElementsByTagName("body")[0],e.appendChild(d))})
(window,document,"script","//dn.msmstatic.com/site/cardlink/bundle.js?20220329","msmaflink");
msmaflink({"n":"2個 セット 3V AAA バッテリー ケースカバー 電池ボックス 保護ケース for BBC Microbit マイクロビット Micro:bit 部品","b":"STEMDIY","t":"","d":"https:\/\/m.media-amazon.com","c_p":"\/images\/I","p":["\/31k00kTKAJL._SL500_.jpg","\/4116GCk9lcL._SL500_.jpg","\/41H-PfSVPyL._SL500_.jpg","\/31qw0XRnLNL._SL500_.jpg","\/31kqynRvDAL._SL500_.jpg"],"u":{"u":"https:\/\/www.amazon.co.jp\/dp\/B08SL7R9BW","t":"amazon","r_v":""},"v":"2.1","b_l":[{"id":1,"u_tx":"Amazonで見る","u_bc":"#f79256","u_url":"https:\/\/www.amazon.co.jp\/dp\/B08SL7R9BW","a_id":1826192,"p_id":170,"pl_id":27060,"pc_id":185,"s_n":"amazon","u_so":0}],"eid":"kXsDO","s":"s"});
</script>
<div id="msmaflink-kXsDO">リンク</div>
<!-- MoshimoAffiliateEasyLink END -->
<p><!-- START MoshimoAffiliateEasyLink --><br />
<script type="text/javascript">
(function(b,c,f,g,a,d,e){b.MoshimoAffiliateObject=a;
b[a]=b[a]||function(){arguments.currentScript=c.currentScript
||c.scripts[c.scripts.length-2];(b[a].q=b[a].q||[]).push(arguments)};
c.getElementById(a)||(d=c.createElement(f),d.src=g,
d.id=a,e=c.getElementsByTagName("body")[0],e.appendChild(d))})
(window,document,"script","//dn.msmstatic.com/site/cardlink/bundle.js?20220329","msmaflink");
msmaflink({"n":"スイッチエデュケーション micro:bit用バングルモジュールキット [micro:bit（マイクロビット）] 5272","b":"スイッチエデュケーション（Switch Education）","t":"SEDU-052726","d":"https:\/\/m.media-amazon.com","c_p":"\/images\/I","p":["\/417Tj7Zb4OL._SL500_.jpg","\/319WUB4crJL._SL500_.jpg","\/41HpiN+6NLL._SL500_.jpg"],"u":{"u":"https:\/\/www.amazon.co.jp\/dp\/B08DV92WTG","t":"amazon","r_v":""},"v":"2.1","b_l":[{"id":1,"u_tx":"Amazonで見る","u_bc":"#f79256","u_url":"https:\/\/www.amazon.co.jp\/dp\/B08DV92WTG","a_id":1826192,"p_id":170,"pl_id":27060,"pc_id":185,"s_n":"amazon","u_so":0},{"u_bc":"#f76956","u_tx":"楽天市場で見る","u_url":"https:\/\/search.rakuten.co.jp\/search\/mall\/%E3%82%B9%E3%82%A4%E3%83%83%E3%83%81%E3%82%A8%E3%83%87%E3%83%A5%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%20micro%3Abit%E7%94%A8%E3%83%90%E3%83%B3%E3%82%B0%E3%83%AB%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%E3%82%AD%E3%83%83%E3%83%88%20%5Bmicro%3Abit%EF%BC%88%E3%83%9E%E3%82%A4%E3%82%AF%E3%83%AD%E3%83%93%E3%83%83%E3%83%88%EF%BC%89%5D%205272\/","s_n":"rakuten","u_so":4,"a_id":1820957,"p_id":54,"pc_id":54,"pl_id":27059,"id":17},{"u_bc":"#66a7ff","u_tx":"Yahoo!ショッピングで見る","u_url":"https:\/\/shopping.yahoo.co.jp\/search?first=1\u0026p=%E3%82%B9%E3%82%A4%E3%83%83%E3%83%81%E3%82%A8%E3%83%87%E3%83%A5%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%20micro%3Abit%E7%94%A8%E3%83%90%E3%83%B3%E3%82%B0%E3%83%AB%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%E3%82%AD%E3%83%83%E3%83%88%20%5Bmicro%3Abit%EF%BC%88%E3%83%9E%E3%82%A4%E3%82%AF%E3%83%AD%E3%83%93%E3%83%83%E3%83%88%EF%BC%89%5D%205272","s_n":"yahoo","u_so":5,"a_id":1832853,"p_id":1225,"pc_id":1925,"pl_id":27061}],"eid":"UMF62","s":"s"});
</script></p>
<div id="msmaflink-UMF62">リンク</div>
<p><!-- MoshimoAffiliateEasyLink END --></p>
<p><!-- START MoshimoAffiliateEasyLink --><br />
<script type="text/javascript">
(function(b,c,f,g,a,d,e){b.MoshimoAffiliateObject=a;
b[a]=b[a]||function(){arguments.currentScript=c.currentScript
||c.scripts[c.scripts.length-2];(b[a].q=b[a].q||[]).push(arguments)};
c.getElementById(a)||(d=c.createElement(f),d.src=g,
d.id=a,e=c.getElementsByTagName("body")[0],e.appendChild(d))})
(window,document,"script","//dn.msmstatic.com/site/cardlink/bundle.js?20220329","msmaflink");
msmaflink({"n":"micro:bit（マイクロビット）用ワンタッチ電池ボックス TFW-BT5","b":"TFabWorks","t":"TFW-BT5","d":"https:\/\/m.media-amazon.com","c_p":"\/images\/I","p":["\/31xB+iuFZ9L._SL500_.jpg","\/41cq9qgJXiL._SL500_.jpg","\/518+kq4feBL._SL500_.jpg","\/41Xx4WkNYNL._SL500_.jpg"],"u":{"u":"https:\/\/www.amazon.co.jp\/dp\/B09NR6KK3D","t":"amazon","r_v":""},"v":"2.1","b_l":[{"id":1,"u_tx":"Amazonで見る","u_bc":"#f79256","u_url":"https:\/\/www.amazon.co.jp\/dp\/B09NR6KK3D","a_id":1826192,"p_id":170,"pl_id":27060,"pc_id":185,"s_n":"amazon","u_so":0},{"u_bc":"#66a7ff","u_tx":"Yahoo!ショッピングで見る","u_url":"https:\/\/shopping.yahoo.co.jp\/search?first=1\u0026p=micro%3Abit%EF%BC%88%E3%83%9E%E3%82%A4%E3%82%AF%E3%83%AD%E3%83%93%E3%83%83%E3%83%88%EF%BC%89%E7%94%A8%E3%83%AF%E3%83%B3%E3%82%BF%E3%83%83%E3%83%81%E9%9B%BB%E6%B1%A0%E3%83%9C%E3%83%83%E3%82%AF%E3%82%B9%20TFW-BT5","s_n":"yahoo","u_so":1,"a_id":1832853,"p_id":1225,"pc_id":1925,"pl_id":27061,"id":18}],"eid":"5o3lB","s":"s"});
</script></p>
<div id="msmaflink-5o3lB">リンク</div>
<p><!-- MoshimoAffiliateEasyLink END --></p>
<p>&nbsp;</p>
<div class="blogcard-type bct-related">

<a rel="noopener" target="_self" href="https://living-maou.com/microbit-matome/" title="micro:bit（マイクロビット）で出来ることと使い方まとめ" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://living-maou.com/wp-content/uploads/2020/09/eyecatch_microbit_matome2206-160x90.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://living-maou.com/wp-content/uploads/2020/09/eyecatch_microbit_matome2206-160x90.jpg 160w, https://living-maou.com/wp-content/uploads/2020/09/eyecatch_microbit_matome2206-500x281.jpg 500w, https://living-maou.com/wp-content/uploads/2020/09/eyecatch_microbit_matome2206-300x169.jpg 300w, https://living-maou.com/wp-content/uploads/2020/09/eyecatch_microbit_matome2206-768x432.jpg 768w, https://living-maou.com/wp-content/uploads/2020/09/eyecatch_microbit_matome2206-120x68.jpg 120w, https://living-maou.com/wp-content/uploads/2020/09/eyecatch_microbit_matome2206-320x180.jpg 320w, https://living-maou.com/wp-content/uploads/2020/09/eyecatch_microbit_matome2206.jpg 800w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">micro:bit（マイクロビット）で出来ることと使い方まとめ</div><div class="blogcard-snippet internal-blogcard-snippet">micro:bit（マイクロビット）で出来ることと使い方を紹介。この記事ではマイクロビットのセンサーなどの機能とその使い方を解説した記事をまとめました。【リビングの魔王】でこれまで紹介した作品も紹介します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://living-maou.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">living-maou.com</div></div></div></div></a>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://living-maou.com/microbit-battery/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
