pxt-ev3/docs/reference/control/wait-micros.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

311 B

@extends

Example #example

Use the a wait and the timer to generate a crazy number.

let crazy = 0
for (let i = 0; i < 100; i++) {
    control.waitMicros(100)
    crazy = control.millis()
    crazy += control.deviceSerialNumber()
    if (crazy != 0) {
        crazy = crazy / 1000000
    }
}