pxt-ev3/libs/ev3/startup.ts

11 lines
430 B
TypeScript
Raw Normal View History

// This is the last thing executed before user code
console.addListener(function(priority: ConsolePriority, msg: string) {
control.dmesg(msg.substr(0, msg.length - 1))
})
// pulse green, play startup sound, turn off light
brick.setStatusLight(StatusLight.GreenPulse);
2018-06-21 00:21:09 +02:00
// We pause for 100ms to give time to read sensor values, so they work in on_start block
pause(400)
// and we're ready
brick.setStatusLight(StatusLight.Off);