Modifying Scratch On Raspberry Pi for GPIO
I’ve been have a discussion via DM on twitter with David Whaley (@whaleygeek) about producing a modification of Scratch that has native blocks for GPIO (particularly for robot motor controls)
Enchanting is an example of such a mod to control LEGO motors that runs on x86 based computers.
He says – wouldn’t it be great to have such a mod for the Pi to do similar things – and he’s right of course 🙂
It would just be a matter of a bit of effort to make such a mod for the Raspberry Pi but there are some considerable issues both political and technical that make this simple task quite challenging.
To make reading easier – lets call a proposed mod RoboPi
Developing from NuScratch
The current version of Scratch on the Pi (commonly called NuScratch) is a major re-write/speed-up of the standard Scratch 1.4 that is used on all other platforms.
(The original Scratch 1.4 is still available and still works on the Pi – albeit much more slowly)
Therefore it would be good to use NuScratch as a source to make a Scratch Pi mod with dedicated motor/leds etc blocks – lets call this proposed mod RoboPi just to give it a label.
But NuScratch is under constant development so if someone was to take the current snapshot and develop RoboPi from it – it would miss out on further speed ups that are promised.
NuScratch source code has not been released which makes the job even harder.
Developing from Whiskers
Another young developer is working on a Scratch 1.4 mod, called Whiskers, to make it look and behave like Scratch 2.
So this would make it a good candidate as well as basis of RoboPi but it too is under constant development and isn’t quite stable yet (simplified statement of its current development position)
But since the code is open source, it would be possible to go ahead and just keep importing and Whiskers development into RoboPi – painful but possible.
Developing from original Scratch 1.4
This has great advantage of stability (code is rock solid stable and open-source)
But it would lose out to NuScratch in terms of speed on the Pi and the target audience of young Scratchers are not known for patience when it comes to GUI response times.
Problems with Raspberry Pi Foundation
The very poor relationships between myself and the Foundation have to be taken into account with my next statements 🙂
Raspberry Pi have done some sort of deal with MIT to make major changes and behaviour to NuScratch and keep using the Scratch name and Scratch logo.
This deal is not available to ANYONE else, which means any other mods are not allowed to call themselves Scratch.
Although NuScratch was developed from the open-source Scratch 1.4 code base – NuScratch source code is not available (for undisclosed reasons)
Raspberry Pi will not talk to me and, given past experiences, would actively try to negate/sabotage any initiative with my name on it. So someone else would have to lead and drive this project.
Is there someone else with the time/experience/drive to do this?
And if so – which route to go down?
Alternatives to Scratch
Develop RoboPi from another Block Language
Using any other existing block languages (such as Google Blockly) suffer from not being Scratch! So this invloves extra learning curves for both pupils and teachers – fine for Gifted & Talented ones – but raises the entry bar for all others. The pedalogical effort that has gone into Scratch is not something to be thrown out without a very good reason.
Develop RoboPi independantly
Obviously the solution to all this is to invent our own new block language for physical computing see – XKCD927 and I leave reader to decided whether this is a good path
Make RobiPi look and feel like Scratch
Not as daft as it sounds 🙂
Joseph from Redfern Electronics did this with the Crumble (Best physical computing device for primary education IMHO). Crumble software looks and feels VERY similar to Scratch but without the graphics/sound elements of Scratch.
Because it implements a sub-set of Scratch syntax and abilities – just blocks needed for physical computing – the editing GUI response times could be made to go away and a nice lean piece of software could be made.
I would suggest that RoboPi should to copy exactly the standard Scratch block colours and syntax so that the learning curve is minimised.
It might even be possible that by simply cutting out the unneeded elements from Scratch 1.4, that it could be gain the necessary extra editing response speed of NuScratch.