Raspberry Pi have worked with MIT to produce a Scratch2 compatible program that runs standalone on a Pi2/3/4 (but not older models or PiZero series).
It comes with basic gpio pin control but I’ve modified this, with help from David Ferguson (@fergusondavid6 ) and Nicole Parrot (@Cleo_QC) so that it can take advantage of all the features of ScratchGPIO.
Grateful thanks to Sarah Lacase (@slmediation) and Darren Townsend (@forrishilier) for testing out the code and finding the bugs 🙂
It now comes ready to use, with a desktop icon, when you install ScratchGPIO from here
Double-click the new Scratch2GPIO 8plus icon and wait till it all loads up.
Click on More Blocks – Add an Extension – select Pi GPIO and click OK.
You should now have a new set of blocks to use that uses (as far as possible) the same syntax as the original ScratchGPIO running on Scratch 1.4
Main differences are
- The black broadcast blocks should be used to send commands and not the orange control ones
- You have to send variable changes off to ScratchGPIO yourself as Scratch2 isn’t as clever as its older sibling 🙂 So instead of old method of just changing a variable value e.g:
set MotorA to 50
you now would still create a variable called MotorA but to get ScratchGPIO to use its value you’d have to do this
set MotorA to 50 (using red data block)
set MotorA to MotorA (using black block where first MotorA would be plain text and second MotorA would be the red variable block)(I really need to get some images into this explanation 🙂
Ideas and suggestions (and bug reports) VERY welcomed 🙂
Contact me via twitter @cymplecy or email email@example.com