Send and receive OSC (Open Sound Control) messages with Scratch. You can interface Scratch with external sensors and OSC sending applications/apps. You can also use Scratch to send OSC data to control audio software, VJ software or creative applications.
If you want to use sensor data in your application you probably want to map the values to a different range. Below a visualisation of the formula that you can use for that.