Scratch: Difference between revisions

From OLPC
Jump to navigation Jump to search
 
(74 intermediate revisions by 25 users not shown)
Line 1: Line 1:
{{OLPC}}
The [http://scratch.mit.edu/ Scratch] folks are porting it to OLPC.
{{Translations}}

The [http://scratch.mit.edu/ Scratch] folks are porting it to Sugar.


== What is Scratch ==
== What is Scratch ==


Scratch is a highly engaging language that allows young students to create simple programs and games. Students use a drag and drop interface of "code blocks" to create sound, movement and actions to objects called "sprites."
Scratch is a highly engaging programming system that allows young students to create animated stories, games, interactive art, and simulations. Students use a drag and drop interface of "code blocks" to create sound, movement and actions to objects called "sprites."


A teacher writes: My 6th grade students enjoyed using Scratch. The Scratch website is well designed with both video and written tutorials. My students were especially pleased to be able to upload their completed projects directly to the Scratch Page. This gave the children a much larger audience than they would have gotten simply uploading to our classroom wiki page.
A teacher writes: My 6th grade students enjoyed using Scratch. The Scratch website is well designed with both video and written tutorials. My students were especially pleased to be able to upload their completed projects directly to the Scratch Page. This gave the children a much larger audience than they would have gotten simply uploading to our classroom wiki page.


Scratch works fairly well in an XO environment. A collection of sample projects is included, and students find it fun to open them and edit them as they wish.
The Scratch team is currently working on an XO version of Scratch. The initial version has little integration with the XO and some of the features do not yet work on the XO, including the "note" and "drum" blocks and support for the Scratch Sensor Board. Better integration with the XO will be added incrementally.

Scratch works fairly well in an XO environment. Several sample projects are included, and students find it fun to open them and edit them as they wish. The main gotcha is that this download doesn't contain a Media folder (which is included in the Windows installation). The Media folder contains additional Costumes, Backgrounds and Sounds which students can drop into their projects. When you open up Import Costume (or similar features) the browse button doesn't go anywhere. One workaround is to copy the Media directory from a Windows install onto a SD card and then point to the SD card when searching for extra Costumes/Backgrounds/Sounds. Unfortunately, these settings are not saved for each session, so you need to locate the Media Directory every time you start the program. The default install on XO is 6 MB, and the extra media files are about 15 additional MB.


How to get started: For young children, the best way to get them interested in scratch is to show them a video tutorial and have them open up complete projects and see how they work.
How to get started: For young children, the best way to get them interested in scratch is to show them a video tutorial and have them open up complete projects and see how they work.


Make sure to check out the Scratch video tutorials (http://info.scratch.mit.edu/Support/Videos) for insight about how to use it. MIT's site also has downloadable PDFs with tutorials, Scratch cards, and a reference guide. http://info.scratch.mit.edu/Support
Suggestion: it would be nice if Scratch could give an optional Media package and allow Scratch to keep locations for Media directories.


The current version (v13) has much better Journal support, although it still lacks a Sugar UI. All features work, although the "note" and "drum" blocks do not support MIDI instruments and drums.
Make sure to check out the Scratch video tutorials (http://scratch.mit.edu/pages/videos) for insight about how to use it. MIT's site also has downloadable PDFs with sample projects and reference guides. http://scratch.mit.edu/pages/educators


If you have feedback about the XO version of Scratch, please write to scratch-xo at media.mit.edu.
If you have feedback about the XO version of Scratch, please write to scratch-xo at media.mit.edu.
Line 21: Line 22:
==Download==
==Download==


Current release:
* [http://web.media.mit.edu/~jmaloney/scratch-xo/Scratch-2.xo Scratch-2.xo]


* [[File:Scratch-25.xo]] : single_instane = yes
==Media and Sample Project Download==


Previous releases:
(Note: In response to the suggestion above...)


* [[File:Scratch-23.xo]] : ARM camera plugin recompiled to solve SL #3604.
To save download time and space in the XO file system, the XO version of Scratch includes only a subset of the sample projects and media library (images and sounds) that come with the full version of Scratch. If you would like the full versions of the sample project and media library folders, you can download and install the following ZIP files:
* [[File:Scratch-22.xo]] : Add ARM binaries with hardfp support.
* [[File:Scratch-21.xo]] : Restore translation files missing in v20.
* [[File:Scratch-20.xo]] : Add ARM binaries

* [http://wiki.laptop.org/images/0/08/Scratch-19.xo Scratch-19.xo]
* [http://dev.laptop.org/~erikos/bundles/0.84/Scratch-17.xo Scratch-18.xo]
* [http://dev.laptop.org/~erikos/bundles/0.84/Scratch-17.xo Scratch-17.xo]
* [http://web.media.mit.edu/~jmaloney/scratch-xo/Scratch-16.xo Scratch-16.xo]
* [http://web.media.mit.edu/~jmaloney/scratch-xo/Scratch-15.xo Scratch-15.xo]
* [http://web.media.mit.edu/~jmaloney/scratch-xo/Scratch-14.xo Scratch-14.xo]
* [http://web.media.mit.edu/~jmaloney/scratch-xo/Scratch-13.xo Scratch-13.xo]
* [http://web.media.mit.edu/~jmaloney/scratch-xo/Scratch-12.xo Scratch-12.xo]

Note: On XO-1.5 computers, Scratch-13 could freeze up soon after playing any sound unless power management was disabled. A workaround was added to v14 and the problem was fixed in v15. It was never a problem on XO-1 computers.

==Media and Sample Project Download (v12 and earlier)==

Starting with v13, Scratch for the XO includes the complete set of sample projects and media from the MIT Scratch 1.4 release (minus the .mp3 sound files, which cannot be read on the XO).

The following information may still be of interest to those using Scratch v12.

Scratch v12 included only a subset of the sample projects and media library (images and sounds) that came with the full version of Scratch. If you would like the full versions of the sample project and media library folders, you can download and install the following ZIP files:


* [http://web.media.mit.edu/~jmaloney/scratch-xo/Media.zip Media.zip (13.6 MB)]
* [http://web.media.mit.edu/~jmaloney/scratch-xo/Media.zip Media.zip (13.6 MB)]
* [http://web.media.mit.edu/~jmaloney/scratch-xo/Projects.zip Projects.zip (9 MB)]
* [http://web.media.mit.edu/~jmaloney/scratch-xo/Projects.zip Projects.zip (9 MB)]


You will need to install these folders manually using the Terminal tool. First locate the Scratch activity folder. In that folder, delete the Media and Projects folders that came with XO version of Scratch. Then, unzip the above ZIP files to replace them. (These versions include everything that came with the XO version of Scratch plus much more.)
You will need to install these folders manually using the [[Terminal Activity]]. First locate the Scratch activity folder. In that folder, delete the Media and Projects folders that came with XO version of Scratch. Then, unzip the above ZIP files to replace them. (These versions include everything that came with the XO version of Scratch plus much more.)

Note: In some some settings (e.g. rural Cambodia), many of the images in the Media folder seem out of place, irrelevant, or meaningless. It is perfectly reasonable to edit or augment the Media and Sample projects folder. For example, it might be appropriate to create your own image library with digital photos of people, animals, buildings, and vehicles from the local environment. It may be possible to make this a participatory activity, with students helping to collect or draw images.

==FAQ==

'''Q''': How do I get Java onto the XO?

See http://wiki.laptop.org/go/Java.

'''Q''': How can I use resistive sensors with Scratch?

One way is to use the Scratch Sensor Board (see below).

Starting with v13, you can connect a resistive sensor to the microphone port on an XO-1 computer. (See http://wiki.laptop.org/go/Making_XO_sensors/How_to_connect_sensors for how to make a cable.) To enable resistive sensor input, hold shift while clicking the "Edit" menu, then select "Enable Resistive Sensors". The Scratch "loudness" block will report a number between 0 and 100 based on the resistance. To return to normal "loudness" operation, select "Disable Resistive Sensors" and unplug your sensor.

Note: Resistive sensors do not yet work in Scratch on the XO-1.5, although I have been told that the hardware can support resistive sensors.

'''Q''': How do I import pictures taken on the xo (or transfered by usb) to the scratch media files for use as backgrounds, etc?

Starting with Scratch v13, you can import images from the Journal by clicking on the "Journal" button in the Scratch import dialog.

Scratch v13 includes a camera feature that allows you to import an image from the camera as a sprite costume or stage background. Just click on the "Costumes" or "Backgrounds" tab, then click the "Camera" button.

You can also use the XO clipboard to move a photo from the camera into Scratch. In the photo app, drag the photo thumbnail to black edge on the left side of the screen. It should stick there. Then go to Scratch and drag the picture on the Scratch screen. It will be added to whichever sprite (or stack) is currently show in the middle scripts/costumes/sounds pane.

To import photos from the USB drive, insert the USB drive. (On some XO's, you must insert the USB drive *before* starting Scratch.) Then, in Scratch, click on the "costumes" or "background" tab, then click the "import" button. In Scratch v13, click the "USB" button.

In earlier versions of Scratch, click on the "computer" shortcut. You should see the "media" folder. Double-click on that, and you should see your USB drive. Double-click on that, and you should be able to find and import your photos.

==Scratch Sensor Board==
You can connect real-world sensors to your Scratch Projects via a Sensor board: http://scratch.wik.is/Support/Sensor_Boards.

NOTE: With Scratch v11 and later, the sensor board works out of the box. I'm leaving these instructions here in case someone has an older version and can't upgrade for some reason.

To use a Scratch Sensor Board on the XO with versions of Scratch older than v11, you must add a file to the folder:

/etc/udev/rules.d

This file should contain the single line:

KERNEL=="ttyUSB*", MODE="0666"

Adding this file allows Scratch to read and write data to the sensor board. You will need to make yourself root using the "su" command in order to add a file to that folder.


==See also==
==See also==
* [[Etoys]] - a similar environment, also written in [[Squeak]] [[Smalltalk]]
* [[Etoys]] - a similar environment (written in [[Squeak]] [[Smalltalk]])
* [[Turtle Art]] - a turtle graphics activity with Scratch-like snap-together program elements
* [[Turtle Art]] - a turtle graphics activity with Scratch-like snap-together program elements
* http://scratch.mit.edu/
* http://scratch.mit.edu/
* [http://scratch.mit.edu/forums/viewtopic.php?id=252 FAQ » What are your plans for a Linux version of Scratch?]
* http://info.scratch.mit.edu/Scratch_on_Linux
* http://info.scratch.mit.edu/Scratch_1.4_Release_Notes
{{Activity page
|icon=Image:Activity-scratch.svg
|genre=Games
|activity group=Activities/G1G1
|short description=TODO! An easy-to-learn, multimedia programming language in which you snap together colorful command blocks
|contact person=John Maloney
|activity source=http://dev.laptop.org/git?p=activities/scratch
|related project=Etoys, Turtle Art
|bundle URL=http://web.media.mit.edu/~jmaloney/scratch-xo/Scratch-13.xo
|activity version=13
}}

Latest revision as of 21:01, 24 June 2014

  This page is monitored by the OLPC team.
  english | русский HowTo [ID# 296176]  +/-  


The Scratch folks are porting it to Sugar.

What is Scratch

Scratch is a highly engaging programming system that allows young students to create animated stories, games, interactive art, and simulations. Students use a drag and drop interface of "code blocks" to create sound, movement and actions to objects called "sprites."

A teacher writes: My 6th grade students enjoyed using Scratch. The Scratch website is well designed with both video and written tutorials. My students were especially pleased to be able to upload their completed projects directly to the Scratch Page. This gave the children a much larger audience than they would have gotten simply uploading to our classroom wiki page.

Scratch works fairly well in an XO environment. A collection of sample projects is included, and students find it fun to open them and edit them as they wish.

How to get started: For young children, the best way to get them interested in scratch is to show them a video tutorial and have them open up complete projects and see how they work.

Make sure to check out the Scratch video tutorials (http://info.scratch.mit.edu/Support/Videos) for insight about how to use it. MIT's site also has downloadable PDFs with tutorials, Scratch cards, and a reference guide. http://info.scratch.mit.edu/Support

The current version (v13) has much better Journal support, although it still lacks a Sugar UI. All features work, although the "note" and "drum" blocks do not support MIDI instruments and drums.

If you have feedback about the XO version of Scratch, please write to scratch-xo at media.mit.edu.

Download

Current release:

Previous releases:

Note: On XO-1.5 computers, Scratch-13 could freeze up soon after playing any sound unless power management was disabled. A workaround was added to v14 and the problem was fixed in v15. It was never a problem on XO-1 computers.

Media and Sample Project Download (v12 and earlier)

Starting with v13, Scratch for the XO includes the complete set of sample projects and media from the MIT Scratch 1.4 release (minus the .mp3 sound files, which cannot be read on the XO).

The following information may still be of interest to those using Scratch v12.

Scratch v12 included only a subset of the sample projects and media library (images and sounds) that came with the full version of Scratch. If you would like the full versions of the sample project and media library folders, you can download and install the following ZIP files:

You will need to install these folders manually using the Terminal Activity. First locate the Scratch activity folder. In that folder, delete the Media and Projects folders that came with XO version of Scratch. Then, unzip the above ZIP files to replace them. (These versions include everything that came with the XO version of Scratch plus much more.)

Note: In some some settings (e.g. rural Cambodia), many of the images in the Media folder seem out of place, irrelevant, or meaningless. It is perfectly reasonable to edit or augment the Media and Sample projects folder. For example, it might be appropriate to create your own image library with digital photos of people, animals, buildings, and vehicles from the local environment. It may be possible to make this a participatory activity, with students helping to collect or draw images.

FAQ

Q: How do I get Java onto the XO?

See http://wiki.laptop.org/go/Java.

Q: How can I use resistive sensors with Scratch?

One way is to use the Scratch Sensor Board (see below).

Starting with v13, you can connect a resistive sensor to the microphone port on an XO-1 computer. (See http://wiki.laptop.org/go/Making_XO_sensors/How_to_connect_sensors for how to make a cable.) To enable resistive sensor input, hold shift while clicking the "Edit" menu, then select "Enable Resistive Sensors". The Scratch "loudness" block will report a number between 0 and 100 based on the resistance. To return to normal "loudness" operation, select "Disable Resistive Sensors" and unplug your sensor.

Note: Resistive sensors do not yet work in Scratch on the XO-1.5, although I have been told that the hardware can support resistive sensors.

Q: How do I import pictures taken on the xo (or transfered by usb) to the scratch media files for use as backgrounds, etc?

Starting with Scratch v13, you can import images from the Journal by clicking on the "Journal" button in the Scratch import dialog.

Scratch v13 includes a camera feature that allows you to import an image from the camera as a sprite costume or stage background. Just click on the "Costumes" or "Backgrounds" tab, then click the "Camera" button.

You can also use the XO clipboard to move a photo from the camera into Scratch. In the photo app, drag the photo thumbnail to black edge on the left side of the screen. It should stick there. Then go to Scratch and drag the picture on the Scratch screen. It will be added to whichever sprite (or stack) is currently show in the middle scripts/costumes/sounds pane.

To import photos from the USB drive, insert the USB drive. (On some XO's, you must insert the USB drive *before* starting Scratch.) Then, in Scratch, click on the "costumes" or "background" tab, then click the "import" button. In Scratch v13, click the "USB" button.

In earlier versions of Scratch, click on the "computer" shortcut. You should see the "media" folder. Double-click on that, and you should see your USB drive. Double-click on that, and you should be able to find and import your photos.

Scratch Sensor Board

You can connect real-world sensors to your Scratch Projects via a Sensor board: http://scratch.wik.is/Support/Sensor_Boards.

NOTE: With Scratch v11 and later, the sensor board works out of the box. I'm leaving these instructions here in case someone has an older version and can't upgrade for some reason.

To use a Scratch Sensor Board on the XO with versions of Scratch older than v11, you must add a file to the folder:

/etc/udev/rules.d

This file should contain the single line:

KERNEL=="ttyUSB*", MODE="0666"

Adding this file allows Scratch to read and write data to the sensor board. You will need to make yourself root using the "su" command in order to add a file to that folder.

See also

Activity Summary

Icon: Sugar icon::Image:Activity-scratch.svg
Genre: Activity genre::Games
Activity group: ,|x|Activity group::x}}
Short description: Short description::TODO! An easy-to-learn, multimedia programming language in which you snap together colorful command blocks
Description:
Maintainers: ,|x|Contact person::x}}
Repository URL: Source code::http://dev.laptop.org/git?p=activities/scratch
Available languages: ,|x|Available languages::x}}
Available languages (codes): ,|x|Language code::x}}
Pootle URL:
Related projects: Related projects,|x|Related projects::x}}
Contributors: ,|x|Team member::x}}
URL from which to download the latest .xo bundle Activity bundle::http://web.media.mit.edu/~jmaloney/scratch-xo/Scratch-13.xo
Last tested version number: Activity version::13
The releases with which this version of the activity has been tested. ,|x|Software release::x}}
Development status:
Ready for testing (development has progressed to the point where testers should try it out): ,|x|Ready for testing::x}}
smoke tested :
test plan available :
test plan executed :
developer response to testing :