Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


This is a Serial Communication extension for Scratch - it allows you to pass serial messages between the scratch interface and any serial device.

To run the extension, go to:

Download this repo, then go to File>>Load Project in Scratch and open the file called SerialDemo.sb2. Many blocks will initially load up red and undefined, that's ok.

Click "Load Experimental Extension", and paste in the following link:

Serial communication happens through a node.js server that must be running concurrently with scratch. To use the node server, first install nodejs:


this will also install the node package manager (npm), use npm into install the following dependencies from the terminal:

npm install -g serialport

npm install -g

Navigate to the parent directory of this repo in the terminal and run:

node nodeServer.js

to start the node server.

If you want to know more about how node.js,, and serialport allows your browser to communicate with serial devices, check out a simple demo of standalone node server with web client I wrote here.

I used documentation from the Lifelong Kindergarten Group to set up the Scratch interface for this extension. I'm working on a version of this extension that uses Scratch's serial browser plugin, but am still trying to get that up and running. The latest version of that code is in the branch "serialplugin".

I've included a sample Arduino sketch in this repo that listens for incoming serial messages and repeats them to test this Scratch extension.


Door sound effects from
Bike Horn sound effect from
Swoosh sound effect from

You can’t perform that action at this time.