Scratch is a block programming language for all-aged childlen.
Scratch 1.4 is old version of Scratch. It is written in Smalltalk (Squeak 2.8).
Scratch 1.4 can interact other systems using Scratch Remote Sensor Protocol.
Scratchは、全ての年齢の子供たちのための、ブロックプログラミング言語です。
Scratch 1.4はScratchの古いバージョンです。 これは、Smalltalk (Squeak 2.8)で書かれています。
Scratch 1.4はScratch遠隔センサープロトコルを使って、他のシステムと情報のやりとりができます。
Scratch 1.4 has Scratch Remoto Sensor Protocol which is for interacting Scratch and other systems via Network (TCP/IP 42001).
The remote sensor has two commands.
broadcast
: Send event. It can handle using [Control] -> [broadcast] related blocks.sensor-update
:Send variable name and its value. Scratch 1.4は、ネットワーク (TCP/IP 42001)経由のScratch遠隔センサープロトコルを使って他のシステムと情報のやりとりができます。
遠隔センサープロトコルには、二つのコマンドがあります。
broadcast
: イベントを送ります。[制御]カテゴリ -> [を受け取ったとき], [を送って待つ], [を送る]ブロックで利用できます。sensor-update
: 変数名とその値を送ります。
- M5StackからScratchへは、[調べる]カテゴリ -> [センサーの値]ブロックで値を利用できます。
- ScratchからM5Stackへは、[変数]カテゴリの変数値の変更を行うと情報が送られます。
M5Scratch is a program interact M5Stack and Scratch 1.4 each other using Scratch Remoto Sensor Protocol. It is written in Arduino language. The github project is https://github.com/610t/M5Scratch .
M5Scratchは、M5StackとScratch 1.4をScratch遠隔センサープロトコルを使ってお互いにやりとりするプログラムです。 これは、Arduino言語で書かれています。 githubのプロジェクトページは、 https://github.com/610t/M5Scratch です。
These M5Stack functions are supported.
以下のような機能がサポートされています。
To the right of the ":" is the name of the associated event name.
From M5Stack to Scratch.
BtnA
, BtnB
, BtnC
Key_(character name)
From Scratch to M5Stack.
soe
, sce
, som
, scm
":"の右側はイベント名です。
M5StackからScratchへ
- Button:
BtnA
,BtnB
,BtnC
- Keyboard for Face:
Key_(character name)
ScratchからM5Stackへ
- Display Stack-chan face:
soe
,sce
,som
,scm
To the right of the ":" is the name of the associated variable and sensor name.
From M5Stack to Scratch.
ax
, ay
, az
, gx
, gy
, gz
temp
tx
,ty
e
slider
From Scratch to M5Stack.
r
, g
, b
l
tone
, vol
servo_x
, servo_y
x
, y
, z
":"の右側は変数名もしくはセンサー名です。
M5StackからScratchへ
- IMU:
ax
,ay
,az
,gx
,gy
,gz
- Temperature:
temp
- Touchpanel:
tx
,ty
- Encoder:
e
- Analog Pin:
slider
Scratch からM5Stackへ
- Draw circle with color:
r
,g
,b
- LED:
l
- Speaker:
tone
,vol
- Servo:
servo_x
,servo_y
- Show icon:
x
,y
,z
- Stackchan
- Scratch cat
M5Scratch can install from M5Burner.
M5ScratchはM5Burnerからインストールすることができます。
This version of M5Scratch needs SDcard to record setting information.
The filename is m5scratch.txt
.
The setting file's format is:
WiFi_SSID
WiFi_password
Scratch_host_IP_address
M5ScratchはM5Burnerからインストールすることができます。 このバージョンのM5Scratchは設定情報を入れるためにSDカードが必要です。 ファイル名は
m5scratch.txt
で、以下のフォーマットで記述します。
WiFi_SSID WiFi_password Scratch_host_IP_address
https://x.com/610t/status/1815279686207123824
Code.
https://x.com/610t/status/1816362417590526168
Code.
https://x.com/610t/status/1748183655594504468
https://x.com/610t/status/1748167521512145071
https://x.com/610t/status/1816318697881121036
Code.
This project is for M5Stack Japan Creativity Contest 2024(ProtoPedia).
Published at 2024/06/01.
Current version of Scratch is Scratch 3. Can I use M5Stack with Scratch 3? Yes, you can use Scratch 3 using M5bitLess.
M5bitLess is a program interact M5Stack and Scratch 3+ Microbit More each other. It use Microbit More extension for interaction M5Stack and Scratch each other. Microbit More extension is optional extension, so it is available for servers such as Stretch3.
These differences are shown in the table below. | |M5bitLess|M5Scratch| |
--|
|
| |Scratch version|3.0|1.4 (also Pytonkee)| |Connection|Bluetooth|WiFi(TCP/IP)| |Protocol|Microbit More|Remoto Sensor Protocol| |M5Burner|o|o|
Scratchの現在のバージョンはScratch 3です。 M5StackはScratch3と一緒に使えるのでしょうか? はい、M5bitLessで利用可能です。
M5bitLessは、M5StackとScratch 3 + Microbit Moreで使うプログラムです。 これは、Microbit More拡張機能を使ってM5StackとScratchでやりとりします。 Microbit More拡張機能は非公式の拡張機能なので、Stretch3などのサーバーで利用可能です。
これらの違いは、以下の表のとおりです。 | |M5bitLess|M5Scratch| |
--|
|
|
|Scratchのバージョン|3.0|1.4 (also Pytonkee)| |接続方法|Bluetooth|WiFi(TCP/IP)| |プロトコル|Microbit More|Remoto Sensor Protocol| |M5Burnerで提供されているか|o|o|
Scratch and M5Stack interact using the Scratch remote sensor protocol (TCP/IP 42001) as shown in the figure above.
The remote sensor has two commands.
broadcast
: Send event. It can handle using [Control] -> [broadcast] related blocks.sensor-update
:Send variable name and its value. ScratchとM5Stackは、上の図のように、Scratch遠隔センサープロトコル(TCP/IP 42001)を使って情報交換します。
遠隔センサープロトコルには、二つのコマンドがあります。
broadcast
: イベントを送ります。[制御]カテゴリ -> [を受け取ったとき], [を送って待つ], [を送る]ブロックで利用できます。sensor-update
: 変数名とその値を送ります。
- M5StackからScratchへは、[調べる]カテゴリ -> [センサーの値]ブロックで値を利用できます。
- ScratchからM5Stackへは、[変数]カテゴリの変数値の変更を行うと情報が送られます。