Sign in:

MOSS Scratch

A Scratch 2 extension for MOSS

MOSS Scratch is an extension for Scratch that enables programming support for the MOSS Brain. It adds Scratch blocks which can programmatically read inputs from sensors (like the knob, proximity or microphone) and send outputs to actuators (like the spin, pivot, or light). Use your MOSS to draw pictures in Scratch with knobs or proximity blocks, drive your MOSS car around with your keyboard, or build an autonomous exploring robot!

moss_scratch_screenshot

Requirements

Download

moss_scratch_128x128x32
Scratch 2 Offline Editor
Download

Quick Start Guide

  1. Pair your MOSS Brain to your computer using Bluetooth. Make sure your Brain is powered up by a MOSS Battery block.

    Mac OS X 7, 8 OS X Mountain Lion: Set up a Bluetooth device
    Mac OS X Mavericks OS X Mavericks: Set up a Bluetooth device
    Windows 7 Windows 7: Connect to Bluetooth devices
    Windows 8 Windows 8: How to Add a Bluetooth Gadget

  2. Open the MOSS Scratch helper app. Hang tight for up to a minute or two until it finds your MOSS Brain. If your MOSS Brain wasn’t found the first time try scanning again by clicking the Rescan button, making sure your Brain is powered on and near your computer.

    step1
  3. Click the MOSS Brain you want to connect to Scratch.

    step2
  4. Now you’re ready to program your MOSS Brain with Scratch. Click “Start Playing!” to open Scratch. Scratch blocks that are specific to MOSS will appear in the “More Blocks…” section under Moss. See the Blocks section below for more information.

    step3

Overview

Start Playing! Launch right into playing with a two-way remote control built with Scratch.
New Project Have a new idea and want a blank slate your own MOSS Scratch program? Create a New Project, preloaded with the blocks you need to design your own program for MOSS.
Import Project Open Scratch with a project you created in the past, or downloaded from a friend. Check out our website for cool Scratch projects to import for MOSS.

Blocks

number_of_faces A variable that represents the number of data faces on your MOSS Brain. The double Brain has eight faces.
set_face_state Sets a face, given the face number which is printed on each data face of the Brain block, to either an input or an output. Use input for sensors, and output for actions.
set_face_value Sets the value of an output face. The value can range from 0 to 100. This value has different meanings for different types of MOSS action blocks. For the light, 0 means off, 100 means fully on, and 50 means half on. But for the motor, 0 means full reverse, 100 means full forward, and 50 means stopped.
value_of_face Returns the value of a face. Both input and output faces can be read.
set_led_color Sets the RGB color of the LED. Values for red (r), green (g), and blue (b), should be between 0 and 100.

Example Programs

Need some example Scratch programs to get you started? Head over to the Examples folder, download the .sb2 files to your computer, and import them in MOSS Scratch.

  • Sketch – Draw with MOSS! Hook up some sensors, like a proximity or knob, to your MOSS Brain, to act as inputs to draw with the pen in Scratch.
  • Remote Drive – Control a driving MOSS robot with the arrow keys on your keyboard.
  • Sine Generator – Generate a sine wave signal for action blocks, like a light or motor.
  • Inverse – A simple example that takes an input face, inverts the value, and outputs it to a different face.

Find more Scratch programs for MOSS in the Examples folder.


Troubleshooting Tips

Having trouble pairing your MOSS Brain to your computer, or connecting your MOSS Brain in MOSS Scratch?
  • Verify that your MOSS Brain is powered on by a MOSS Battery block.
  • Make sure your MOSS Brain is not already connected to another Bluetooth device, such as an iPad or Android device. If so, unpair your Brain from the other device, then try pairing to your Mac or PC again.
  • Reset the power on your MOSS Brain, then try to pair again.
  • Remove the MOSS Brain from your computer’s Bluetooth devices, then add it again.
Has Scratch stopped responding to your MOSS Brain?
  • Make sure your MOSS Brain didn’t accidentally get disconnected during play. If it did, make sure it is powered back on, then reconnect to it in MOSS Scratch.

  • Click on the “More Blocks…” button in Scratch. Look for the circle to the right near the “Moss” section. The circle should be green if MOSS is properly connected.
    More Blocks...

    If the circle is red, it means that MOSS Scratch cannot be found. Make sure the MOSS Scratch helper app is running, and connected to a MOSS Brain.

    If the circle is yellow, it means the MOSS Scratch helper app is running, but there is a problem. Try disconnecting from your MOSS Brain in MOSS Scratch, then reconnecting. If that doesn’t work, try cycling power on your MOSS Brain, closing down MOSS Scratch, and then reopening and reconnecting. If the problem still isn’t resolved, hover your mouse over the circle to see a message describing the problem, then post the issue in the forum to get technical support.

  • Finally, make sure your Scratch code is doing what you expect. If you need help writing your program, or have questions, ask the community for help on the forum.

Is the Scratch 2 Offline editor crashing directly after opening?

If the Scratch 2 Offline Editor is crashing directly after opening, then install the Scratch 2 Offline Editor again. This issue is due to a bug introduced in Adobe Air version 14. (released April 2014). See the Scratch 2 home page for more information.

My Mac says “MOSS Scratch” cannot be opened because it is from an unidentified developer. Your security preferences allow installation of only apps from the Mac App Store and identified developers.

The first time you open MOSS Scratch, you may receive a dialog with the text above, and MOSS Scratch will not open. To open Scratch Flash, go to the “Applications” folder in Finder and find MOSS Scratch, then right click on the icon, and select Open. A dialog that says “MOSS Scratch” is an application downloaded from the Internet. Are you sure you want to open it?” Clicking Open will start MOSS Scratch, and next time it will open automatically. For more details, see OS X: About Gatekeeper.