scratch-lego-bluetooth-extensions

Scratch 3.0 extensions, mostly for LEGO Bluetooth devices. This builds on bricklife’s excellent work. It adds a few more Xcratch extensions which support LEGO Devices, both for Legacy Bluetooth Classic (as for EV3 or Spike Prime Hub / Mindstorms Robot Inventor Hub with 2.x firmware), as for (newer) BLE bluetooth (as for Spike Prime Hub with new firmware, as it comes with LEGO Spike Prime App). Also there are non-LEGO-related Scratch extensions, which might came in handy, like for Gamepad Controllers, or for Maths operations.

Intended usage is to load these extensions (their .mjs files, which reside in the dist/ folder, which can be loaded per prefixing https://crispstrobe.github.io/scratch-lego-bluetooth-extensions/dist/ ) from the “Extension Loader” that the xcratch environment (https://xcratch.github.io/ or (https://crispstrobe.github.io/scratch-gui/ e.g.) provides (click on the bottom left corner icon there, click on Extension Loader, enter the url, like https://cdn.jsdelivr.net/gh/CrispStrobe/scratch-lego-bluetooth-extensions@master/dist/spikeprimebtc.mjs e.g.).

Note that for most of these to work, you need the Scratch Link app running, or a wrapping App, like Scrub on iOS devices. But these will not work in all web browsers, and especially not uner iOS connecting to non-Apple-approved devices, like EV3 over Bluetooth Classic, or Spime Prime Hub with legacy firmware. (You could only make these work per your own Xcode debug builds of Scrub, or other variants.)

(Technical note: Some of these extensions are multilingual, by leveraging a translations.json file, both for the gui as for the vm part of the extension. For these to work, the package.json was changed to leverage not the official xcratch-build but a slightly modified scripts/build.js. TODOs: Adjust to newer babel/rollup setup. Adapt to the newer Scratch/Xcratch framework, like scratch-editor and xcratch-create.)

Extension List

Bluetooth LE (BLE)

Bluetooth Classic (SPP)

(Original) Scratch 3.0 installed LEGO Bluetooth extensions

Xcratch

Xcratch is an extendable Scratch programming environment. You can load LEGO Bluetooth extensions into Xcratch from the following URLs:

also (not LEGO related, but might prove useful):