Skip to content

Using with Scratch 3

An online version of Scratch 3 which includes extension blocks for Home I/O is available at the following address at the University of Reims Champagne-Ardenne:

  1. Start by clicking on Add Extension.

  2. Next, select from the list the Extension required: Home I/O (FR) when running Home I/O in French and Home I/O (EN) for the English language.

Each Extension includes 36 blocks for interacting with Home I/O sensors and actuators.

The communication between Scratch 3 and Home I/O is made through a web server included in Home I/O. Scratch 3 requests from Home I/O the latest values of sensors each 200ms. This means that, sensors values should not be changed during periods lower than 0.2 seconds. For example, when pressing a button on the remote control, the button should be pressed long enough in order to be detected by Home I/O. On the other hand, each time an actuator block is executed, Scratch 3 sends the corresponding command to Home I/O. Note that, actuators in Home I/O are latch memories. This means that when a lamp is turned on, it will remain on until an order to turn it off is received. The web client in Scratch3 takes this into account, and only send new data to Home I/O when required.

The following example illustrates these concepts. The goal is to run a Scratch 3 program that turns the living room light on when button 1 of the remote control is pressed and turns it off when button 2 is pressed. These following two examples show a possible solution:

Running Home I/O and Scratch 3 on different machines

It's not mandatory to run Home I/O on the same machine as the one running Scratch 3. In order to do this, please follow the tutorial presented below.

It is therefore possible to have many users interacting with a single instance of Home I/O, each user programming each own Scratch 3. Additionally, Scratch 3 can be run on different types of machines such as PC, tablets, smartphones, etc.

Home I/O and Scratch 3 Desktop (Offline)

A version of Scratch 3 Desktop for Home I/O (includes all the required extensions) is available for download. This version - Window 10 only - allows to use Scratch 3 together with Home I/O without an Internet connection.

Download Scratch Desktop Setup 3.12.0