Run some code when display is present or absent.
controller.onShieldEvent(ControllerShieldEvent.Absent, function () {
})
controller.onShieldEvent(ControllerShieldEvent.Absent, function () {
basic.showNumber(0)
})
controller.onShieldEvent(ControllerShieldEvent.Present, function () {
basic.showNumber(1)
screen().fill(Math.random()*15)
})
display-shield=github:microbit-apps/display-shield