Remote Sensor Connections
| The subject of this article or section has changed dramatically and requires updating. Please keep in mind that some of the information or images may not be accurate or relevant to the current version of Scratch, the Scratch website, or the article subject. |
Remote sensor connections is a feature allowing other programs to connect to Scratch. This allows Scratch to be extended to connect to devices, access the internet, or perform other functions not possible inside Scratch. For example, JoyTail allows one to use a joystick with Scratch.
This requires Scratch 1.3.1 or higher.
- Right-click on the () Sensor Value block, found in the sensing category.
- Select the "Enable remote sensor connections" option.
Now Scratch is ready to send and receive data over the network.
How it works
Remote Sensor connections turn Scratch into a local server at port 42001. Whenever either:
- A broadcast is sent
- A global variable is changed
It sends out a message to all connected programs with the relevant information.
|This page has links to outside of the Scratch website or Wikipedia. Remember to stay safe when using the internet as we can't guarantee the safety of other sites.|
The following software use this feature to connect to Scratch:
- JoyTail — joysticks
The following programming languages can connect to Scratch:
- Flash Actionscript
- Objective-C (Mac or iPhone application)
- Processing (Java)
- A Scratch Modification
You can also implement the Remote Sensors Protocol yourself in any language that supports sockets.