Quick Start to S3GPIO for experienced ScratchGPIO users

Select My Blocks category to view/select S3GPIO blocks

Broadcast commands

has been replaced by

There is a multiple command block so instead of having to do

you can simply say

Note all pins are set as outputs so if you want a pin to be an input use


Scratch 3 doesn’t signal any changes to variables that can be intercepted automatically

So you have to explicty send updates for things like motors

Instead of

What I’d recommend is still having a variable called Motor11 and using it like this

Sensor Inputs

Scratch 3 does’t have sensor variables like Scratch 1.4, so you approach like this:
Assuming you like to read status of Pin 7 – make sure you’ve configured it as an input

so then you can read its value

This will set a variable called sensor to the current value of Pin 7
So to use normally, you would do something like

or create a variable called Pin7 and do this

Note: If you simply wish to directly read a sensor value, without having to place it into the sensor variable, then you can do so by directly using the translate reporter block like this

This image has an empty alt attribute; its file name is image-1.png

timer used as pseudo-randomiser to prevent Scratch caching requests