Scratch is a programming language with block programming. Scratch3 can extend with scratch extension.
Scratchはブロックプログラミング言語です。 Scratch3は拡張機能で拡張できます。
The unofficial Scratch server named Stretch3 has many unofficial extensions including hardware (micro:bit, AkaDako, LEGO, ...), AI (Machine Learning, Pose detection, ...), and so on. Of cource Microbit More can use at Stretch3 shown as red rectangle.
Stretch3という非公式Scratchサーバは、多くの非公式拡張機能を提供しています。 これには、ハードウエアに関するもの(micro:bit, AkaDako, LEGO, ...)やAIに関するもの(機械学習,ポーズ検出, ...)などがあります。 Microbit Moreも、図の赤枠で囲んだように、Stretch3で利用できます。
Microbit More is extension for using micro:bit and Scratch each other. Microbit More can handle all micro:bit function.
Microbit More は、micro:bitとScratchをお互いに使うための拡張機能です。 Microbit Moreは、micro:bitの全ての機能が利用可能です。
Microbit More have label & data command with 3 type blocks.
Microbit Moreには、labelとdataコマンドのための3種類のブロックがあります。
- micro:bitからラベル (label-01) のデータを受け取ったとき
- ラベル(label-01)のデータ
- micro:bitへデータ (data) にラベル (label-01) を付けて送る
The label & data means two type of message.
ラベルとデータは、2種類のメッセージを意味します。
- "label"という名前のついた変数の、その値"data"。
- "label"というイベントを送る("data"を利用しない)。
M5bitLess is an Arduino program for interacting Scratch and M5Stack. M5bitLess behave as micro:bit for Microbit More, so you can use Microbit More extension. However, only micro:bit equivalent functions can be used, so for example, only 5x5 LED-like screen displays can be used with the standard block.
M5bitLessは、ScratchとM5Stackで相互にやり取りするためのArduinoプログラムです。 M5bitLess は、Microbit More用のmicro:bitとして振る舞うので、Microbit More拡張機能を使うことができます。 ただし、micro:bit相当の機能しか使えないため、例えば画面表示は5x5LED風のものしか標準のブロックでは使えません。
In this figure, of all the Microbit More blocks, the block circled by the red rectangle is implemented in M5bitLess. The blocks shown in light red are for handling label&data.
この図では、すべてのMicrobit Moreのブロックが記述されており、赤い四角形で囲まれたブロックがM5bitLessで実装されています。 薄い赤色で示したブロックが、label&dataを扱うためのブロックになります。
The M5bitLess label & data extension is an extension to Microbit More's label and data functionality that allows M5Stack to use features that cannot be achieved with Microbit More's standard blocks.
M5bitLess label & data拡張は、Microbit Moreのlabelとdataの機能を利用して、Microbit Moreの標準的なブロックでは実現できない機能をM5Stackで利用するための拡張です。
Currently, we are implementing a function to draw on the M5Stack display and a function to retrieve keyboard input from the M5Stack.
現在は、M5Stackのディスプレイ上に描画する機能と、M5Stackのキーボード入力を取得する機能を実装しています。
From Scrath to M5Stack, I implement draw picture command. This figure shows how to draw circle at position (x0(=80),y0(=80)), radius r(=80), and color c(=65524).
ScratchからM5Stackへは、描画コマンドを実装しています。 この図では、位置(x0(=80), y0(=80))、半径r(=80)、色c(=65524)の円の書き方を示しています。
From M5Stack to Scratch, I implement send key code pressed at keyboard. This figure shows send key code "q" with label "Key" and data "q", and the cat says "q".
M5StackからScratchへは、キーボードで押されたキーコードの送信を実装しました。 図では、ラベル"Key"にdata"q"を送り、猫が"q"と言います。
In this section, I show some examples using M5bitLess label & data extension.
ここでは、M5bitLessのlabel&data拡張を使ったいくつかの例をお見せします。
Draw heart at M5Stack display using label & data extension. This code draw two circles and one triangle, and string "Heart!!".
label&data拡張を使って、M5Stackの画面にハートを描画します。
https://www.youtube.com/watch?v=Vk8FoH25KJg
Draw circles, rectangles, and string "M5bitLess" location, color, and size randomly.
円や四角形や文字列"M5bitLess"を、位置や色や大きさをランダムに変えて描画します。
https://www.youtube.com/watch?v=FYaJ7QR_N-g
Use the Facemesh extension to detect the nose position, move the cat there, and draw a circle on the M5Stack.
Facemesh拡張機能を使って鼻の位置を検出し、猫をそこに動かすとともに、M5Stackに円を描きます。
https://www.youtube.com/watch?v=SkgIeSZohBQ
You can play Scratch and M5Stack with M5bitLess. The demo branch of M5bitLess github can handle display drawing & key press event.
M5bitLessを使うことで、ScratchとM5Stackで遊ぶことができます。 M5bitLessのgithubのdemoブランチは、描画やキー入力を取り扱うことができます。
Let's play M5bitLess and it’s label & data extension!!
M5bitLessとlabel&data拡張で遊んでね!!
From 24:16. https://www.youtube.com/watch?v=EiLaip5sLhk&t=1456s
This project is for M5Stack Japan Creativity Contest 2022.
System of M5bitLess label & data extension is shown at this figure.
M5bitLess label & data拡張のシステムは、図のようになります。
- ScratchとM5Stackは、Bluetooth経由で、Microbit Moreプロトコルで接続されます。
- M5bitLessを使うことで、M5Stackは、Microbit More用のmicro:bitとして振る舞います。
- M5Stackで、Microbit Moreのブロックの多くが利用できます。
- M5bitLess label & data拡張を使うと、ScratchとM5Stackの間で、文字列や数値データのlabelとdataを送受信できます。