Scratch for .Net Micro Framework

Time for a Thursday Tease… I will be releasing this Wednesday of next week.

The image below is a screen-shot of the Scratch Gateway/Deployment Helper. This program works to identify your board, download all dependent .pe files, and deploy the Scratch for .Net firmware. It also acts as a gateway between the desktop Scratch 2.0 editor environment and your hardware.

In this screen shot, you see two entries because I am using a pre-release BrainPad with two USB ports. I just (minutes ago) received a production BrainPad unit and will be working over the next couple days to support single-interface boards via CDC.

Next week Wednesday, we will have support for BrainPad, Cerbuino Net and Cerbuino Bee (although support for Gadgeteer configuration on the Cerb boards won’t be ready next week). Follow-on releases will support more boards and full Gadgeteer configuration for use within Scratch.

(Note that use of Scratch for .Net does not require installation of Visual Studio or any NETMF SDK, though you do need to install the GHI USB drivers, which are currently only available in the GHI SDK)


Very nice!

@ mcalsyn - Amazing!! :clap:

Exactly what I was dreaming about and even better. Time to start writing a course for this 8)

@ mcalsyn - Wow, that is impressive. Now I can get my son going down the “right” path with scratch!

Thank you.

It is in fact very easy to install the GHI drivers without the SDK on each individual machine.

  1. locate the GHI drivers on a machine where you have the SDK installed (somewhere in “Programs(x86)” usually
  2. Copy the following files to any folder on your target computer
  • GHI_Bootloader_Interface.inf
  • GHI_NETMF_Interface.inf
  1. Get the dpinst.exe (included in MS driver SDK).
    You have to be aware that there are two different dpinst.exe for x86 and x64
  2. copy the dpinst.exe into the same folder as driver files.
  3. Run the dpinst.exe from windows explorer (no need to “Run as Administrator”)
    Now all .inf files in the same folder as dpinst.exe will be installed.

@ Reinhard Ostermeier - I understand the mechanics of it (though you stated in more detail than I had), I just don’t want to take on maintaining a distribution of their software, nor do I have permission to broadly redistribute their bits. I’ve mentioned the issue to Gus and Gary and we’ll get something worked out. They’re pretty booked up, but at some point I think they’ll roll up a drivers-only install. It certainly makes sense as I would imagine other folks want to tether boards without the full SDK so this must be an issue for more than just this project. If the whole Scratch for .Net thing catches on, I am sure it will rise in priority.

1 Like

I can’t wait to try this out with my kids!

I have just pushed out a fairly limited version of of this to the web site, specifically for BrainPad. If you a) have a white BrainPad board and b) want to help out by testing and reporting your experiences, please drop me a DM with your email address (or email me at martin@ and I will send detailed instructions for the current version.

The core gateway is fairly stable, but I am still working on the various bits of the firmware and the pc-side driver, so those pieces are limited and a bit rugged, but the hard bits are done, and they will improve daily. Once you install the gateway, new firmware, drivers, and Scratch templates will update on your machine automatically.

Support for Cerb boards will come next week, followed by Gadgeteer support in the week or two following.

[Edit: In order to use this currently, you need to wire up a Gadgeteer USB serial adapter to the expansion port, or use a MikroClick USB serial adapter plugged into the expansion port. A future firmware image from GHI will support dual-use on the primary USB port]

1 Like

Ok that is pretty cool, I can imagine how much cooler classes would have been with this, compared to when we were learning on Apple II’s and BASIC when I was a kid.

@ Squeebee - I didn’t even have an Apple II, mine was a TI99/4A, TI-99/4A - Wikipedia

If programming gets any more abstract, we’ll be coding with a Kinect and interpretive dance.


@ mcalsyn - I like the sound of that!

I was thinking more along the lines of HoloLens and 3D Scratch programs. Speaking of… Is it possible to run multiple threads with this or is everything single threaded and synchronous?

Actually, each stack of blocks runs in parallel with every other stack. Your program doesn’t have to be all in one stack. You can communicate between stacks with variables or broadcast messages.

In the template (.s2e file) that I am working on now, I have added “when” blocks (a standard Scratch block type), so you can say things like “When the temp goes above 75”. The result is that you don’t have a straight-line program, but rather lots of event-driven blocks that execute when their ‘when’ clause is satisfied. I have created enough blocks to give you the option of traditional poll-test-act straight-line code or “When”-block event driven code.

My son and I have been playing with scratch on his new brainpad. It’s great!

The bulb doesn’t want to show the color “Maroon” but other than that, things are working like I would expect them to. Awesome job!

Question: Is any of this open source? I would love to be able to contribute.

It’s all open-source - even the web site. It’s all here : [url][/url]

Feel free to fork and submit pull requests!

1 Like

@ mcalsyn - Awesome. I’ll take a look!

BTW, do you know where I might find a .step file for the brainpad? (I want to ponoko a little enclosure with holes for the appropriate sensors and leds, and a holder for a servo)

Also, I see what you mean about the “Say” command, and constant updates.

Is the updated driver to include CDC out? :slight_smile:

So my son Macallum is using the Brainpad to enhance his Scratch “Pokemon randomizer” that pops up random pokemon characters. He is using the temperature sensor to influence if the Pokemon that comes up is an “ice type” or a “fire type” (depending on if there is something cold or hot near the sensor…) or a “dark type” based on the light reaching the light sensor… :slight_smile:

I wish there were two or even 3 servos connectors - for robot-arms

And an infrared sensor would have been awesome too (to be able to control scratch programs using a cheap ir remote)

Will it be possible to just use the microUSB port soon (and not the clickboard?) and be able to use any clickboard modules in scratch? (for say, an IR sensor?)

Eventually I may be able to steer him into C#, but all his friends at school do scratch, so this scratch-ability has been awesome with this brainpad :slight_smile: