Scratch is an interpreted dynamic visual programming language. Being dynamic, it lets code be changed even as programs are running. It has the goal of teaching programming concepts to kids and teens and letting them create games, videos, and music. It can be downloaded for free and is being used at home and in a wide variety of in-school and after-school settings around the world.
Connections between Scratch and other programs are made using the Scratch networking protocol. With this feature turned on, Scratch automatically sends all broadcasts and values of global variables out to any program connected to it. That program can also send broadcasts and global variables into Scratch. The Scratch Sensor is an Android app that uses the Scratch networking protocol to turn the Android Smartphone into a DAQ module and sends its accelerometer and compass sensor information and broadcast two states (jump and walk) to Scratch.
This source code is for Scratch 1.4 only.