Run a script when the distance detected by the LEGO WeDo distance sensor becomes greater (or less) than a specified value

When the distance goes under 20, the script will run.


You can select a greater or less than comparison from the dropdown menu.

The distance sensor detects the surrounding brightness to report distance, so you can actually use it to detect light and motion in addition to distance.

To use when distance, you need a distance sensor connected to your computer via a LEGO WeDo hub.