Add restrictions on values. See how to do it in https://github.com/Microsoft/pxt-microbit/blob/master/libs/core/led.ts
Add restrictions on values. See how to do it in https://github.com/Microsoft/pxt-microbit/blob/master/libs/core/led.ts