In this tutorial, we will learn how to use MakeCode and the @boardname@ to make a pedometer -- a device that counts how many steps you take.
On your screen, you see two blue blocks. They say ||Basic:on start|| and ||Basic:forever||.
please show up....
input.onButtonPressed(Button.AB, function () {
if (input.buttonIsPressed(Button.A)) {
basic.showNumber(0)
}
})
step+=1
input.onButtonPressed(Button.A, function () {
step = moveSMART.newStep(step)
})