Skip to main content
100%

desc

✓ Published0🌍 Public
YYannael
Last edited Nov 16, 2021
Created on Nov 16, 2021

This visualization demonstrates a custom Scratch 3 extension that enables hardware communication through a peripheral connection. The code shows how the extension establishes a session, handles incoming serial data through message parsing, and sends commands using a line-buffered text decoder. It uses Scratch’s ArgumentType, BlockType, and formatMessage APIs to define a single command block labeled “block name.” The implementation relies on the runtime’s ioDevices.comm interface for device scanning and writes formatted strings (e.g., `M0 \n`) to trigger external actions.

AI-generated description

Similar vizzes