show number
Shows a number; numbers above 9 scroll. Basic › show number.
basic.showNumber(0)
micro:bit: talk and play · Find each block in the MakeCode toolbox (the category is at the end of each line).
Shows a number; numbers above 9 scroll. Basic › show number.
basic.showNumber(0)
Pictures inside forever repeat, in order. Each pause holds the picture before it.
basic.forever(function () {
basic.showIcon(IconNames.Heart)
basic.pause(500)
basic.showIcon(IconNames.SmallHeart)
basic.pause(500)
})
A variable can hold true or false, to remember what is happening now. Logic.
waiting = true
Runs the blocks inside again and again. Blocks in on start run only once.
basic.forever(function () {
blocks
})
Milliseconds since the micro:bit switched on. Take one from a later one to time something. Input › more.
input.runningTime()
Store running time at the start; later, running time − start is how long it took (ms).
start = input.runningTime()
basic.showNumber(input.runningTime() - start)