Initial files for MakeCode project

This commit is contained in:
H. Saw 2022-10-29 20:33:29 +08:00
parent ba252b0a14
commit 3d08876c33
11 changed files with 149 additions and 0 deletions

25
main.ts Normal file
View file

@ -0,0 +1,25 @@
/**
CounterTracker
simple counter tracker for the Micro:Bit
*/
input.onButtonPressed(Button.A, function () {
count += 1;
basic.showNumber(count)
})
input.onButtonPressed(Button.AB, function() {
count = 0;
basic.showNumber(count)
})
function startup(): boolean {
music.ringTone(Note.C)
count = 0;
basic.showNumber(count)
return true
}
let count = 0;
startup()