Scratch Coding + Scratch-Link WiInterface Game Controller

2. ScratchLink Setup

ScratchLink is a family of hardware that allows Scratch2 offline to directly interface with robotics and microcontrollers and various sensors and hardware i.e. Arduino and EV3 Lego etc.  ScratchLink currently only works with Windows OS but when Scratch3 rolls out in Aug 2018 it will be browser based and will work with all operating systems including IOS. ScratchLink will work with browser based Scratch3 so Ipads, Macs, Linux and Windows systems will all use the same browser plugins.  ScratchLink has an Arduino compatible microcontroller that connects to your computer with the USB cable and sometimes you may need to manually update the USB driver if Windows does not auto detect.  You also need to run the ScratchLink Helper App while interfacing between Scratch2 Offline and ScratchLink which also authenticates the ScratchLink as genuine.

ScratchLink USB Setup:

Check USB Port: When you plug in ScratchLink with the USB cable windows should auto detect the serial USB chip.  ScratchLink could have either the CH340 or Silicon Labs USB chip.  To check this in Windows goto your "Control Panel" then "Device Manager" the "Com Ports- You should see one of the COM ports showing either "USB-SERIAL CH340(COM#)"  or "Silicon Labs CP210x USB to UART Bridge(COM#).  If you see this then note the COM port number- if there are lots of COM ports showing and you don't know then watch the list and remove ScratchLink from the USB port and not the entry that disappears- this is ScratchLink.

Install USB driver if needed:  If you got "Serial Device?" or similar in the first step then Windows does not have the USB driver.  So we need to "update" the driver.  Download and unzip the CH340 USB Driver then "right mouse click" the entry in COM ports (Device Manager) with the "Serial?" or "Unknown Serial Device" - upon "right click mouse" select "update driver" then navigate the folder of the unzipped CH340 USB Driver.  ScratchLink should now appear as "USB-Serial CH340(COM#), if not then it could need the Silicon labs driver, in which case download and unzip the Silicon Labs USB Driver and run the executable install file for either 32 or 64 bit machine.

Start ScratchLink Helper App:  Download, unzip and copy the ScratchLink Helper App to your prefered folder and make a shortcut to the desktop if desired.  Start ScratchLink Helper App and "allow" it to get past the windows firewall if you get warnings.  Plugin ScratchLink hardware such as WiInterface and it should populate the COM port dialogue box at the top of helper app.  Press "connect hardware" and then "test LEDs" whereupon the LEDs on the WiInterface should do a quick multicoloured demonstration.  The "Hardware" box should show "USB connected" and be green.  If no COM port displays at the top then you need to install the USB driver as above or you didn't plug in the USB cable or maybe try another COM port or rebooting.  When you start Scratch2 Offline the "Scratch" dialogue will show green and "connected" in the helper app.  You must have the helper app going to use ScratchLink.

Install Scratch2 Offline:  Install Scratch 2 Offline Editor on local computers or use a network MSI for Scratch2.  You will need Adobe Air and make sure that your Adobe Flash is up to date before installing the latest Scratch2.

Import your ScratchLink blocks into Scratch2 Offline by holding down "Shift" then click "File" and "Import experimental HTTP extension" and navigate the ScratchLink Blocks that you which to import.  Note that imported blocks can't stay inside Scratch itself but if you simply save an empty project file after importing the blocks and start Scratch using this empty project then the imported blocks will be available.  This is because imported blocks are stored with the project itself i.e. "Scratch2 project file" not inside the Scratch2 program itself.  

Download and unzip desired blocks below.  The imported ScratchLink blocks will show under the "More Blocks" tab in Scratch2 and if you have a ScratchLink plugged in and the helper app going then the dot in "More Blocks" will be green not red, indicating a live serial connection from Scratch2 to ScratchLink.  You can can now start interfacing with ScratchLink directly from Scratch with Scratch coding.

WiInterface Scratch Blocks (Nunchuk)

WiInterface Scratch Blocks (Classic Controller)

WiInterface Scratch Blocks (Nunchuck & Classic Controller )

Lego EV3 Scratch Blocks for ScratchLink

Lego NXT Scratch Blocks for ScratchLink

Sphero Scratch Blocks for ScratchLink