jtLab Scratch 3 Helper app
- work on Electron
- run in task tray
- communicate with Scratch 3 through WebSocket
branches:
- Latest release branch:
dev191017 - Current development branch:
dev_3.0 - Current upstream version: 3.18.1 (2020/12/06)
for build the latest release branch, please checkout jtScratch-desktop branch on scratch-gui and scratch-vm
- run
npm install --global windows-build-toolsfrom Administrator PowerShell - open
Git SDK 64-bit mkdir jtScratchon NTFS filesystem >5GBcd jtScratchgit clone https://github.com/jtLabHIU/scratch-vm.gitcd scratch-vmnpm installnpm linkcd ..git clone https://github.com/jtLabHIU/scratch-gui.gitcd scratch-guinpm installnpm link scratch-vmBUILD_MODE=dist STATIC_PATH=static npm run buildnpm linkcd ..git clone https://github.com/jtLabHIU/scratch-desktop.gitcd scratch-desktopnpm installnpm link scratch-guinpm run distEven if you get a FATAL ERROR, it's okay as long asnpm startworks.cd ..git clone https://github.com/jtLabHIU/s3h.gitcd s3hgit checkout dev191017or latest release branchnpm installIf you get build errors, install the latest LTS version of Node.js.- add
chcp 437 &into beforenetshof line 69 & 163 ons3h/node_modules/wifi-control/lib/win32.js - modify 'name' and 'ssid' for your Tello ID in
async function startCommServons3h/src/startup.js npm run dist- run
jtS3H-win32-x64\jtS3H.exe
git clone https://github.com/jtLabHIU/s3h.gitcd s3hnpm install- modify
/node_modules/wifi-control/lib/win32.js(see below) npm start(invoke Scratch that compiled static) ornpm run devserv(use Scratch that running on webpack-dev-server)
see also readme_scratch.md
- add
chcp 437 &into beforenetshof line 69 & 163
- add proxy entry into line 24 of
webpack.config.jsonscratch-gui
proxy: {
'jtS3H': {
target: 'http://localhost:5963'
}
}
-
Tello vs Tello Edu
- sdk?
- unknown command: sdk? / 20
- sdk?
-
chcp
- 932 - Japanese Shift-JIS
- 437 - English
- 65001 - UTF-8
-
arp -a
Interface: 192.168.10.2 --- 0x6
Internet Address Physical Address Type
192.168.10.1 60-60-1f-d2-d5-55 dynamic
192.168.10.255 ff-ff-ff-ff-ff-ff static
インターフェイス: 10.70.78.153 --- 0x5
インターネット アドレス 物理アドレス 種類
10.70.78.254 50-3d-e5-a0-0d-ff 動的
10.70.78.255 ff-ff-ff-ff-ff-ff 静的
- ping -n 1 -w 4 192.168.10.1~254
Pinging 192.168.10.1 with 32 bytes of data:
Request timed out.
Ping statistics for 192.168.10.1:
Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),
Pinging 192.168.10.1 with 32 bytes of data:
Reply from 192.168.10.1: bytes=32 time=1ms TTL=255
Ping statistics for 192.168.10.1:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms
192.168.10.1 に ping を送信しています 32 バイトのデータ:
192.168.10.1 からの応答: バイト数 =32 時間 =1ms TTL=255
192.168.10.1 の ping 統計:
パケット数: 送信 = 1、受信 = 1、損失 = 0 (0% の損失)、
ラウンド トリップの概算時間 (ミリ秒):
最小 = 1ms、最大 = 1ms、平均 = 1ms
192.168.10.1 に ping を送信しています 32 バイトのデータ:
要求がタイムアウトしました。
192.168.10.1 の ping 統計:
パケット数: 送信 = 1、受信 = 0、損失 = 1 (100% の損失)、
-
ap command send: ap ETROBO etrobocon_hkd Response: OK,drone will reboot in 3s Received 26 bytes from 192.168.10.1:8889
-
multi tello
- connect WiFi direct with the target Tello
- send
ap SSID PASSWORDcommand to tello- restart automatically as STA mode
- ping to tello and mome IP and MAC pair
- we can connect automatically that lookup with ARP command
- sockCommand must listening different UDP port
- all tello response to localhost:8889UDP only
- these can recognize by IP address that tellos send
-
todo limit 1 hop scratch 1/2 helper compatible
-
devSock
- Tello can't reconnect to another UDP port, such make it by 0
-
AP list auto-update on Windows
- use WlanScan.exe
- problem: it can't exit normaly
- use WlanScan.exe
-
jtMesh
- Mesh is based upon remote sensor connections through port 42001
scratch-vm/src/engine/variables.js- packet: <size: 4 bytes><msg: size bytes>
- Most message types contain human-readable strings made up of the following elements:
- Unquoted single-word strings (cat, mouse-x)
- Quoted strings ("a four word string", "embedded ""quotation marks"" are doubled")
- Numbers (1, -1, 3.14, -1.2, .1, -.2)
- Booleans (true or false)
- Words and strings are encoded in UTF-8.
sensor-update "note" 60 "seconds" 0.1broadcast "play note"- Scratch 2.0 Extension Protcol
-
Scratch3 /broadcast
- broadcast(args, util) and broadcastAndWait(args, util) are defined in
scratch-vm/src/blocks/scratch3_event.jsargs:object- BROADCAST_OPTION
- id: uid
- name: message
- BROADCAST_OPTION
util:BlockUtility (engine/block-utility.js)- sequencer:Sequencer
- thread:Thread
- proto
- target: this.thread.target: Target (engine/target.js)
- startHats('event_whenbroadcastreceived', {BROADCAST_OPTION: broadcastOption});
- calls sequencer.runtime.startHats (engine/runtime.js)
- broadcast(args, util) and broadcastAndWait(args, util) are defined in
-
Scratch3 /sensorupdate
- variable blocks are defined in
scratch-vm/src/blocks/scratch3_data.js
- variable blocks are defined in
- download cmake-3.16.0-rc4-win64-x64.zip or latest one from CMake website
- deflate into
$Pzenbu\cmake - open an administrative Powershell when you want to use
node-gypon Windows Set-Item Env:Pzenbu "path\to\$Pzenbu"Set-Item Env:PATH "$Env:Pzenbu\node.js;$Env:Pzenbu\cmake\bin;$Env:PATH"cd path\to\your\workspacenpm install -g windows-build-tools- try
npm config get pythonto check
- try
- download cmake-3.16.0-rc4-Darwin-x86_64.dmg or latest one from CMake website
- execute this file to mount as installer
- select
agreebutton - drag-and-drop
CMakeicon into$Pzenbu - open the
Terminal Pzenbu="path/to/$Pzenbu"PATH="$Pzenbu/CMake.app/Contents/bin:$PATH"
npm install -g node-gyp- add entry into
package.json
,
"opencv4nodejs": {
"autoBuildOpencvVersion": "4.1.1"
}
-
npm install --save opencv4nodejs -
git clone https://github.com/justadudewhohacks/opencv4nodejs.git -
ToDo: electorn-rebuild
cd ..git clone https://github.com/justadudewhohacks/opencv-electron.gitcd opencv-electron/plain-jsnpm install
.\ffmpeg -i udp://0.0.0.0:11111 -f sdl "tello"