Discuss Scratch

blob8108
Scratcher
1000+ posts

List of Hardware & Software

This forum has a lot of topics, so I've tried to make a handy index. I hope you find it helpful!
UPDATE: http://scratchx.org/ has been released since this guide was written. ScratchX is the official way of using unofficial extensions.

This guide is mostly obsolete.


HTTP extensions should be considered experimental; the ST has not promised that they'll support them in the future. Writing new JS extensions is preferred.

________________________________________________________

This post lists the different kinds of hardware you can connect to Scratch (or Snap!), and the software you need to install to make them work.

If I've missed anything or made a mistake, or you have any questions, post a reply!
Contents:
  • Types of Software
  • List of Hardware
  • List of Services
___

Types of Software

To connect hardware to Scratch, there are two kinds of software:

Extensions add extra blocks to the normal Scratch program that let you control hardware. Scratch interacts with the hardware through the extension program.

Mods are modified versions of the Scratch program, so they can have more drastic changes: such as compiling and downloading a Scratch program to a robot. But they may be incompatible with the normal Scratch program, and it may be difficult to switch between the mod and Scratch.

NB: Except for the officially-supported extensions (currently only the PicoBoard and Lego WeDo), neither projects including extensions nor projects made with mods may be shared on the Scratch website.

Extensions can be made in a few different ways:

Javascript Extensions [protocol]

Scratch 2.0's online editor supports extensions written in Javascript that can talk to USB devices. The two extensions made by the Scratch Team – PicoBoard and Lego WeDo – are Javascript extensions.

To use Javascript extensions, you first have to install the web browser plugin: scratch.mit.edu/scratchr2/…/download.html You only have to do this once, and then you can use all available Javascript extensions. (Notes: better with Firefox/Safari/Chrome. Reported not working on OS X < 10.7 Lion)

The PicoBoard and WeDo extensions can then be loaded by clicking “Add an Extension” under the “More Blocks” tab. Other experimental extensions can be loaded by shift-clicking the File menu and entering the URL of the Javascript file.

Scratch 2.0 extension support is currently in beta / experimental, so it may change in future and may not currently work properly.

HTTP Extensions [protocol]

Scratch 2.0's offline editor supports HTTP extensions. These require you to install a separate “helper app” program for each extension. The helper app lets Scratch talk to that particular piece of hardware.

Snap! has a very similar extension mechanism, so most HTTP extensions are designed to support both Scratch 2.0 and Snap!. Blockext is a work-in-progress Python library that does this, while also making it much easier to write extensions: blockext.org.

Scratch 2.0 extension support is currently in beta / experimental, so it may change in future and may not currently work properly.

Scratch 1.4 Sensors [protocol]

Scratch 1.4 has a much more limited extension mechanism, called “Remote Sensor Connections”. It doesn't allow adding extra blocks; extensions can only report sensor values. It also allows reading variable values and sharing broadcasts.

However, Scratch 1.4 does have built-in support for the PicoBoard and Lego WeDo without needing any additional software.

ScratchPy is a Python library that makes it much easier to connect to Scratch 1.4: pilliq/scratchpy. There are others listed on the Python wiki page.

___

List of Hardware

PicoBoard (aka ScratchBoard) [description]
Lego WeDo [description]
  • Built-in to Scratch 1.4
  • Modified version by abee for controlling two motors: (forum topic) [Scratch 1.4 Mod]
  • Built-in, Scratch 2.0 online editor: (forum post) [Javascript]
  • S2Bot by SCRAXE: picaxe.com/s2bot [HTTP]
Lego Mindstorms
Gamepad
Kinect
Leap Motion
Raspberry Pi GPIO
Arduino
Compatible alternative — Shrimp: shrimping.it

littleBits
Sphero
Hummingbird [website]
Parallax S2
Wii Controllers
MaKey MaKey [description]
  • It acts as a regular keyboard (or mouse). You don't need software.
    (forum topic)
Compatible alternative — ShrimpKey: fse.link/fseshrimpkey

___

List of Services
Minecraft Pi Edition [website]
Language Translation
Speech Synthesis

Last edited by blob8108 (Sept. 22, 2015 17:55:14)


tosh · slowly becoming a grown-up adult and very confused about it
procd
Scratcher
100+ posts

List of Hardware & Software

Superb! Mods please sticky this.
Thanks for the hard work Blob8108.

P.S. Do you know if your offline editor fixes will be added to the official release? How do we use the swf file as replacement for the offline editor?
blob8108
Scratcher
1000+ posts

List of Hardware & Software

procd wrote:

P.S. Do you know if your offline editor fixes will be added to the official release?
I believe they will be, but not for at least several more days.
How do we use the swf file as replacement for the offline editor?
You could try dragging the file into your web browser, or using Adobe's standalone Flash Player. With varying degrees of success.

tosh · slowly becoming a grown-up adult and very confused about it
sdmeijer
Scratcher
100+ posts

List of Hardware & Software

Can you add the Shrimp (http://shrimping.it) (Arduino Uno-derivative) and my ShrimpKey (http://fse.link/fseshrimpkey) (DIY MaKey MaKey) to the list?
blob8108
Scratcher
1000+ posts

List of Hardware & Software

sdmeijer wrote:

Can you add the Shrimp (http://shrimping.it) (Arduino Uno-derivative) and my ShrimpKey (http://fse.link/fseshrimpkey) (DIY MaKey MaKey) to the list?
Hmm. Are those just fully-compatible alternatives to the Arduino and MaKey MaKey, respectively? I could add them as links at the bottom of those sections.

tosh · slowly becoming a grown-up adult and very confused about it
SCRAXE
New to Scratch
72 posts

List of Hardware & Software

Looks great! One thing not mentioned anywhere at all is that the official web browser plugin needs OS X 10.7 (Lion) or later to run, even though it will still happily install without warning on earlier versions (such as older 1Gb Macbooks which are stuck on 10.6.8). On Windows anything from XP up seems to work. And that you will probably be better off using Chrome / FireFox / Safari when trying to use the js extensions.
blob8108
Scratcher
1000+ posts

List of Hardware & Software

SCRAXE wrote:

One thing not mentioned anywhere […]
Added.

tosh · slowly becoming a grown-up adult and very confused about it
sdmeijer
Scratcher
100+ posts

List of Hardware & Software

blob8108 wrote:

sdmeijer wrote:

Can you add the Shrimp (http://shrimping.it) (Arduino Uno-derivative) and my ShrimpKey (http://fse.link/fseshrimpkey) (DIY MaKey MaKey) to the list?
Hmm. Are those just fully-compatible alternatives to the Arduino and MaKey MaKey, respectively? I could add them as links at the bottom of those sections.

Yes, they are!
minnn
New to Scratch
4 posts

List of Hardware & Software

have anyone tried using S2Bot for Sphero before? my connection with the S2Bot show that it is connected however when i want to test it it doesnt seem to be moving anyone have any idea how to connect it?
SCRAXE
New to Scratch
72 posts

List of Hardware & Software

When S2Bot is connected click the S2Bot ‘test’ button. You will then see 4 buttons that enable you to test the backlight, the LEDs and to rotate the sphero on the spot (the test buttons deliberately don't roll the sphero because that just generally results in it rapidly disappearing off under a table!).

The open the template .sb2 file in Scratch to use all commands (including movement).
SCRAXE
New to Scratch
72 posts

List of Hardware & Software

Here's a sample Sphero project to move in a square.
http://www.picaxe.com/docs/sphero.png
Use a speed of 50-100 for nice slow movements
The red stop button above the Stage is your friend, as it will stop Sphero when it tries to escape!
blob8108
Scratcher
1000+ posts

List of Hardware & Software

SCRAXE: You should make a thread for S2Bot.

tosh · slowly becoming a grown-up adult and very confused about it
minnn
New to Scratch
4 posts

List of Hardware & Software

SCRAXE wrote:

When S2Bot is connected click the S2Bot ‘test’ button. You will then see 4 buttons that enable you to test the backlight, the LEDs and to rotate the sphero on the spot (the test buttons deliberately don't roll the sphero because that just generally results in it rapidly disappearing off under a table!).

The open the template .sb2 file in Scratch to use all commands (including movement).
when my S2Bot show connected my bluetooth setting still display sphero not connected. Could this be the reason why i am unable to connect to my sphero and not being able to get it moving?
procd
Scratcher
100+ posts

List of Hardware & Software

Another one to add please. Topic here http://scratch.mit.edu/discuss/topic/34754/ It's an http extension for controlling a raspberry pi's gpio pins remotely.
derpmeup
Scratcher
1000+ posts

List of Hardware & Software

Congrats on getting the first sticky in the connecting to the physical world forum!

hey bro that's a pretty good meme xD!
Torling
Scratcher
95 posts

List of Hardware & Software

The problem with Macintoshes® and some computers running Windows running newer versions of Java is annoying. When I tried to install Java on my Mac, it refused to install, but my computer continued to try to install it, I eventually had to restart (not because of that) and that took down the Java installer with it.
I later tried to install Java again with the same result, luckily I knew what to do that time. I have also had the same problem with Java on a PC.
(This is connected to the part about Java Script Extensions, see above)

Last edited by Torling (Aug. 9, 2014 01:02:49)


Take a look at the very first, the One and Only: MOTION BASED GAME CENTER on Scratch!
I'm the proud leader of Diamond Inc. We are receiving members into all of our teams.
Huixin
New to Scratch
3 posts

List of Hardware & Software

Hi can you add Scratchbot(www.scratchbot.cc), it's a modified version based on the source code of scratch 2.0, it's much easier to use than other Arduino-Scratch connections, and it can support many types of sensors and motors. -
mrabourn
New to Scratch
3 posts

List of Hardware & Software

Does anyone know when the OFFLINE version of Scratch 2 will support WeDo and the pico board?
SCRAXE
New to Scratch
72 posts

List of Hardware & Software

mrabourn wrote:

Does anyone know when the OFFLINE version of Scratch 2 will support WeDo and the pico board?
ST have been working recently on adding JS support into the offline version, so hopefully not too long to go now before native support of these parts.

However you can actually use both with Scratch offline already by using the S2Bot helper:
picaxe.com/S2Bot
SCRAXE
New to Scratch
72 posts

List of Hardware & Software

@blob8108 - you may wish to update this section…

blob8108 wrote:

The current offline editor (v404) has the following bugs:…

Powered by DjangoBB