Homework 5

Due date and weights

This is a 60-point assignment due by Friday 18 March, 2011. You should submit your program (Python suggested) to Homework 5 of the course moodle.


Download this exciting Scratch program. If you are working from home, you'll also need to download Scratch 1.4.

The Problem

Write a program that opens a connection to the scratch program and makes it do something semi-interesting. You can use the Python program presented in class to get started.

In order to modify the pitch variable, you'll need to do something like the following code sequence.

    sendScratchCommand('sensor-update "pitch" ' + str(newpitch))
    sendScratchCommand('broadcast "update-pitch"')

Also, you'll want to put some pauses into your code. Do this by calling the time.sleep method.


This isn't rocket science. Do it over Spring Break.