pxt-microbit 5.1.5 → 5.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/built/target.js +1 -1
- package/built/target.json +1 -1
- package/built/targetlight.json +1 -1
- package/built/theme.json +1 -1
- package/built/web/react-common-authcode.css +1 -1
- package/built/web/react-common-multiplayer.css +1 -1
- package/built/web/react-common-skillmap.css +1 -1
- package/built/web/rtlreact-common-authcode.css +1 -1
- package/built/web/rtlreact-common-multiplayer.css +1 -1
- package/built/web/rtlreact-common-skillmap.css +1 -1
- package/built/web/rtlsemantic.css +2 -2
- package/built/web/semantic.css +2 -2
- package/docs/reference/basic/pause.md +10 -11
- package/package.json +2 -2
- package/pxtarget.json +3 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Pause
|
|
2
2
|
|
|
3
|
-
Pause the program for the number
|
|
3
|
+
Pause the program for a duration of the number milliseconds you say.
|
|
4
4
|
You can use this function to slow your program down.
|
|
5
5
|
|
|
6
6
|
```sig
|
|
@@ -9,24 +9,23 @@ basic.pause(400)
|
|
|
9
9
|
|
|
10
10
|
## Parameters
|
|
11
11
|
|
|
12
|
-
*
|
|
12
|
+
* **ms**: the number of milliseconds (duration) of your pause time. To convert from seconds: 100 milliseconds = 1/10 second and 1000 milliseconds = 1 second.
|
|
13
13
|
|
|
14
|
-
## Example
|
|
14
|
+
## Example
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
The program pauses 500 milliseconds after turning on each LED.
|
|
18
|
-
Without `pause`, the program would run so fast that you would not have time to see each LED turning on.
|
|
16
|
+
Randomly turn on and off the LED pixels on the screen.
|
|
19
17
|
|
|
20
18
|
```blocks
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
let duration = 500
|
|
20
|
+
basic.forever(function () {
|
|
21
|
+
led.toggle(randint(0, 4), randint(0, 4))
|
|
22
|
+
basic.pause(duration)
|
|
23
|
+
})
|
|
25
24
|
```
|
|
26
25
|
|
|
27
26
|
## Advanced
|
|
28
27
|
|
|
29
|
-
If
|
|
28
|
+
If **ms** is an invalid number (`NaN`, not a number), the pause will default to `20` ms.
|
|
30
29
|
|
|
31
30
|
## See also
|
|
32
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pxt-microbit",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.7",
|
|
4
4
|
"description": "micro:bit target for Microsoft MakeCode (PXT)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"JavaScript",
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"pxt-common-packages": "10.4.5",
|
|
48
|
-
"pxt-core": "8.6.
|
|
48
|
+
"pxt-core": "8.6.14"
|
|
49
49
|
}
|
|
50
50
|
}
|
package/pxtarget.json
CHANGED
|
@@ -609,7 +609,9 @@
|
|
|
609
609
|
"incompatibleHardwareImage": "/static/download/incompatible.png"
|
|
610
610
|
},
|
|
611
611
|
"winAppDeprImage": "/static/winapp.PNG",
|
|
612
|
-
"showWinAppDeprBanner": false
|
|
612
|
+
"showWinAppDeprBanner": false,
|
|
613
|
+
"editorTour": true,
|
|
614
|
+
"tutorialSimSidebarLayout": true
|
|
613
615
|
},
|
|
614
616
|
"queryVariants": {
|
|
615
617
|
"hidemenu": {
|