Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
99947a9e21 | |||
a69239abed | |||
fd06fae050 | |||
7fbb056edf | |||
06758863fb | |||
ad8af16a5a | |||
70dd6bcac5 | |||
b103423a53 | |||
a82a44e587 | |||
e6f612283f | |||
fcd60876ab | |||
5daa9a0bb6 | |||
4fb3926073 |
@ -68,6 +68,8 @@ let count = 0
|
||||
The second statement informs the scheduler that on each and every event of the A button being pressed, a subprogram (called the event handler) should be queued for execution. The event handler is demarcated by the do/end keywords; it increments the global variable `count` by one.
|
||||
|
||||
```blocks
|
||||
let count = 0
|
||||
// ...
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
count++;
|
||||
})
|
||||
@ -76,6 +78,8 @@ input.onButtonPressed(Button.A, () => {
|
||||
The third statement queues a `forever` loop for later execution by the scheduler; the body of this loop (between the do/end keywords) displays the current value of global variable `count` on the LED screen. The third statement
|
||||
|
||||
```blocks
|
||||
let count = 0
|
||||
// ...
|
||||
basic.forever(() => {
|
||||
basic.showNumber(count, 150)
|
||||
})
|
||||
|
@ -37,4 +37,4 @@ microbit-bluetooth
|
||||
|
||||
### See Also
|
||||
|
||||
[basic](/reference/basic), [input](/reference/input), [music](/reference/music), [led](/reference/led), [Math (blocks)](/blocks/math), [String](/reference/string), [game](/reference/game), [images](/reference/images), [pins](/reference/pins), [serial](/reference/serial), [control](/reference/control), [radio](/reference/radio), [devices](/reference/devices), [bluetooth](/reference/bluetooth)
|
||||
[basic](/reference/basic), [input](/reference/input), [music](/reference/music), [led](/reference/led), [Math (blocks)](/blocks/math), [String](/reference/types/string), [game](/reference/game), [images](/reference/images), [pins](/reference/pins), [serial](/reference/serial), [control](/reference/control), [radio](/reference/radio), [devices](/reference/devices), [bluetooth](/reference/bluetooth)
|
||||
|
@ -13,4 +13,4 @@ false;
|
||||
|
||||
### See Also
|
||||
|
||||
[boolean (blocks)](/blocks/boolean.md)
|
||||
[boolean (blocks)](/blocks/logic/boolean.md)
|
||||
|
@ -1,9 +0,0 @@
|
||||
# You completed the survey!
|
||||
|
||||
```sim
|
||||
basic.forever(() => { basic.showString("THANK YOU") })
|
||||
```
|
||||
|
||||
Thank you for participating in this survey.
|
||||
|
||||
Please [contact us](mailto:microbitpilots@microsoft.com) with any information you think we might find useful.
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pxt-microbit",
|
||||
"version": "0.3.19",
|
||||
"version": "0.3.24",
|
||||
"description": "BBC micro:bit target for PXT",
|
||||
"keywords": [
|
||||
"JavaScript",
|
||||
@ -29,6 +29,6 @@
|
||||
"typescript": "^1.8.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"pxt-core": "0.3.22"
|
||||
"pxt-core": "0.3.27"
|
||||
}
|
||||
}
|
||||
|
@ -118,11 +118,7 @@
|
||||
"path": "/javascript"
|
||||
},
|
||||
{
|
||||
"name": "Streaming Data",
|
||||
"path": "/streaming"
|
||||
},
|
||||
{
|
||||
"name": "The Device",
|
||||
"name": "Hardware",
|
||||
"path": "/device"
|
||||
}
|
||||
],
|
||||
|
Reference in New Issue
Block a user