pxt-ev3/docs/reference/control/assert.md
Galen Nickel eb45a76928 Example overrides for 'control' api docs (#352)
* Add 'playSound' api docs

* Example overrides for 'control' api docs
2018-02-27 15:12:23 -08:00

210 B

@extends

Example #example

Stop the program if the gyro dectects an angle greater than 45 degrees.

forever(function () {
    control.assert(sensors.gyro2.angle() > 45, 15)
    pause(300)
})