代码: 全选
input.onPinPressed(TouchPin.P1, function () {
counter += 1
})
input.onPinPressed(TouchPin.P2, function () {
counter += 2
})
input.onPinPressed(TouchPin.P0, function () {
counter = 0
})
let counter = 0
counter = 0
basic.forever(function () {
basic.showNumber(counter)
})