Creating a module for scratch 1.4
Everybody knows that scratch 1.4 has a custom module for WeDo projects with custom blocks for starting a motor, detection the tilt sensor, etc, but… How about creating your custom module???
For anyone who have wondered how a module in scratch is created, probably the first step is going into google and type something about custom blocks for scratch. Then you'll find a lot of information of the real-actual blocks of Scratch 2.0 (the web version), more on custom blocks (made in scratch) for this platform but nothing for creating a block with new funcionalities.
For all those who have wondered how to do this, I put here my notes about the issue.
My first discover is a WeDoModule.c (in C) that exposes to the virtual machine of scratch (squeak) the information about WeDo:
Other point of information is the own source code of scratch:
There is a github repository: https://github.com/LLK/Scratch_1.4
and you can download it:
Investigating the download
After downloading the source code and unpacking it, you'll find a strange “image” file that (supposedly) contains the source code. Trying to open it with the command
squeak ScratchSourceCode.1.4.image doesn't work (apparently after a long wait).
In github, you'll find the same big “image” file and some C files for some plugins (camera pluging, WeDo plugin). It seems that the core of the issue is in this *.image file, and the MIT doesn't help with this much.