pxt-microbit 6.1.2 → 6.1.4
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/hexcache/{a205d05d10c4848e8a9454ddb6b085235213690f446c18ac8eb610d69c8c0d98.hex → 02e118276d7ad61fd1e7913a87f10d8ffee34a65b883e7b8efce291712f45092.hex} +10499 -10480
- package/built/hexcache/{1a29827806d7ca2a8e55b95c99194503f7fdfaa45a3ebfcc25cda8e5c1e51824.hex → 56661ceac4d8678e416df6f0cb117457b277232c45f0a578a9298d26f8eaba35.hex} +9914 -9895
- package/built/hexcache/62b44871df9fdf64381631c44888c831f0e73d4a7a6221dc1b91aea7bd9aa76a.hex +14523 -0
- package/built/hexcache/f4b5733caac6970862b68d159aad886755259b131a794060ce8075730c534b64.hex +13996 -0
- package/built/sim-strings.json +1 -1
- package/built/sim.d.ts +10 -0
- package/built/sim.js +133 -23
- package/built/target.js +1 -1
- package/built/target.json +1 -1
- package/built/targetlight.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 +3 -3
- package/built/web/semantic.css +3 -3
- package/docs/extensions.md +16 -0
- package/docs/projects/7-seconds.md +8 -8
- package/docs/projects/carnival/button-points.md +118 -0
- package/docs/projects/carnival/circuit-win.md +107 -0
- package/docs/projects/carnival/shake-lose.md +97 -0
- package/docs/projects/coin-flipper.md +8 -8
- package/docs/projects/compass.md +12 -17
- package/docs/projects/dice.md +15 -8
- package/docs/projects/flashing-heart.md +4 -4
- package/docs/projects/heads-guess.md +10 -10
- package/docs/projects/hot-potato.md +8 -8
- package/docs/projects/love-meter.md +12 -6
- package/docs/projects/magic-button-trick.md +2 -4
- package/docs/projects/multi-dice.md +7 -7
- package/docs/projects/name-tag.md +5 -5
- package/docs/projects/rock-paper-scissors-v2.md +13 -13
- package/docs/projects/rock-paper-scissors.md +12 -12
- package/docs/projects/smiley-buttons.md +7 -7
- package/docs/projects/v2-blow-away.md +17 -13
- package/docs/projects/v2-cat-napping.md +18 -14
- package/docs/projects/v2-clap-lights.md +19 -10
- package/docs/projects/v2-countdown.md +16 -8
- package/docs/projects/v2-morse-chat.md +13 -13
- package/docs/projects/v2-pet-hamster.md +26 -13
- package/docs/reference/input/compass-heading.md +9 -5
- package/docs/reference/input/magnetic-force.md +16 -8
- package/docs/static/orglogowide.png +0 -0
- package/docs/translate.md +4 -4
- package/package.json +3 -3
- package/pxtarget.json +12 -18
- package/sim/public/simulator.html +45 -0
- package/targetconfig.json +6 -2
- package/built/hexcache/215f0a9c22dcecda497365fd42b85e341eda40aa40d2d69d427265c77cc5f004.hex +0 -14333
- package/built/hexcache/704323c8559a596aec81e104e6d4bb8ae10bafd9dec77489fbb082158b23a4e4.hex +0 -14853
- package/sim/public/parts/.gitignore +0 -5
|
@@ -23,12 +23,14 @@ This program finds the compass heading and stores it in the
|
|
|
23
23
|
let degrees = input.compassHeading()
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
### ~hint
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
#### Compass simulation
|
|
29
|
+
|
|
30
|
+
When you run a program that in the simulator, click and drag
|
|
29
31
|
the compass needle on the screen to change the compass heading.
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
### ~
|
|
32
34
|
|
|
33
35
|
## Example: compass
|
|
34
36
|
|
|
@@ -65,7 +67,9 @@ will ask you to draw a fill pattern on the screen by tilting the @boardname@.
|
|
|
65
67
|
If you are calibrating or using the compass near metal, it might
|
|
66
68
|
confuse the @boardname@.
|
|
67
69
|
|
|
68
|
-
|
|
70
|
+
### ~ hint
|
|
71
|
+
|
|
72
|
+
#### Make a calibration tool
|
|
69
73
|
|
|
70
74
|
Keep the calibration handy by running it when the user pressed **A+B**.
|
|
71
75
|
|
|
@@ -75,7 +79,7 @@ input.onButtonPressed(Button.AB, () => {
|
|
|
75
79
|
})
|
|
76
80
|
```
|
|
77
81
|
|
|
78
|
-
|
|
82
|
+
### ~
|
|
79
83
|
|
|
80
84
|
## See also
|
|
81
85
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# magnetic Force
|
|
2
2
|
|
|
3
3
|
Find the amount of magnetic force (the strength of a magnet) in one of the three directions.
|
|
4
4
|
|
|
@@ -6,14 +6,21 @@ Find the amount of magnetic force (the strength of a magnet) in one of the three
|
|
|
6
6
|
input.magneticForce(Dimension.X);
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
The @boardname@ measures magnetic force in **microteslas**.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
### ~hint
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
that uses the compass.
|
|
13
|
+
#### Compass calibration
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
The magnetometer doesn't automatically calibrate to the Earth's magnetic field when reading magnetic force. This is so you can detect localized magnetic attractions in your tests and experiments. If you want to calibrate for magnetic polar alignment before measuring magnetic force, you need to first calibrate using:
|
|
16
|
+
|
|
17
|
+
```block
|
|
18
|
+
input.calibrateCompass()
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
When you run this block you will be asked to [calibrate](https://support.microbit.org/support/solutions/articles/19000008874-calibrating-the-micro-bit-compass) for the compass.
|
|
22
|
+
|
|
23
|
+
### ~
|
|
17
24
|
|
|
18
25
|
## Parameters
|
|
19
26
|
|
|
@@ -24,7 +31,7 @@ that uses the compass.
|
|
|
24
31
|
|
|
25
32
|
## Returns
|
|
26
33
|
|
|
27
|
-
* a [number](/types/number) of microteslas that
|
|
34
|
+
* a [number](/types/number) of microteslas that is the strength of the magnetic force.
|
|
28
35
|
|
|
29
36
|
## Example
|
|
30
37
|
|
|
@@ -39,4 +46,5 @@ basic.forever(function() {
|
|
|
39
46
|
|
|
40
47
|
## See also
|
|
41
48
|
|
|
42
|
-
[compass heading](/reference/input/compass-heading)
|
|
49
|
+
[compass heading](/reference/input/compass-heading),
|
|
50
|
+
[calibrate compass](/reference/input/calibrate-compass)
|
|
Binary file
|
package/docs/translate.md
CHANGED
|
@@ -26,7 +26,7 @@ There a a few files that are specific to the MakeCode editor itself. These conta
|
|
|
26
26
|
|
|
27
27
|
| File | Description |
|
|
28
28
|
| - | - |
|
|
29
|
-
| [strings.json](https://crowdin.com/translate/kindscript/32/en-en) | Common strings that shared by all MakeCode editors
|
|
29
|
+
| [strings.json](https://crowdin.com/translate/kindscript/32/en-en) | Common strings that shared by all MakeCode editors. **Note**: This file is located at the MakeCode project's root folder rather than under **microbit** |
|
|
30
30
|
| [target-strings.json](https://crowdin.com/translate/kindscript/1922/en-en) | Strings custom to the @boardname@ editor interface |
|
|
31
31
|
| [sim-strings.json](https://crowdin.com/translate/makecode/1923/en-en) | Strings for the @boardname@ simulator |
|
|
32
32
|
<br/>
|
|
@@ -41,8 +41,8 @@ The strings for the programming code blocks all have names in the form of '_name
|
|
|
41
41
|
|
|
42
42
|
| File | Description |
|
|
43
43
|
| - | - |
|
|
44
|
-
| [core-jsdoc-strings.json](https://crowdin.com/translate/kindscript/66/en-en) | Description text for code elements of the [basic](/reference/basic) and core [blocks](/blocks)
|
|
45
|
-
| [core-strings.json](https://crowdin.com/translate/kindscript/65/en-en) | Display text for the [basic](/reference/basic) and core [blocks](/reference/blocks)
|
|
44
|
+
| [core-jsdoc-strings.json](https://crowdin.com/translate/kindscript/66/en-en) | Description text for code elements of the [basic](/reference/basic) and core [blocks](/blocks). **Note**: this file contains strings for the fundamental set of coding blocks and should be prioritized over the other strings files for blocks |
|
|
45
|
+
| [core-strings.json](https://crowdin.com/translate/kindscript/65/en-en) | Display text for the [basic](/reference/basic) and core [blocks](/reference/blocks). **Note**: this file contains strings for the fundamental set of coding blocks and should be prioritized over the other strings files for blocks |
|
|
46
46
|
| [radio-jsdoc-strings.json](https://crowdin.com/translate/kindscript/64/en-en) | Description text for code elements of the [radio](/reference/radio) blocks |
|
|
47
47
|
| [radio-strings.json](https://crowdin.com/translate/kindscript/63/en-en) | Display text for the [radio](/reference/radio) blocks |
|
|
48
48
|
| [radio-broadcast-jsdoc-strings.json](https://crowdin.com/translate/kindscript/5032/en-en) | Description text for code elements of the radio broadcast blocks |
|
|
@@ -78,7 +78,7 @@ Document pages contain the text for any markdown page available on the MakeCode
|
|
|
78
78
|
| File | Description |
|
|
79
79
|
| - | - |
|
|
80
80
|
| [docs](https://crowdin.com/translate/kindscript/en#/microbit/docs) | Documentation pages for projects, courses, lessons, and code block reference |
|
|
81
|
-
| [libs](https://crowdin.com/translate/kindscript/en#/microbit/libs) | Documentation pages for code block reference and other information related to
|
|
81
|
+
| [libs](https://crowdin.com/translate/kindscript/en#/microbit/libs) | Documentation pages for code block reference and other information related to built-in extensions like _servo_ and _datalogger_ |
|
|
82
82
|
<br/>
|
|
83
83
|
|
|
84
84
|
Here's an example of a translated document page for a course lesson:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pxt-microbit",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.4",
|
|
4
4
|
"description": "micro:bit target for Microsoft MakeCode (PXT)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"JavaScript",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"typescript": "4.2.3"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"pxt-common-packages": "
|
|
49
|
-
"pxt-core": "
|
|
48
|
+
"pxt-common-packages": "11.1.1",
|
|
49
|
+
"pxt-core": "9.1.6"
|
|
50
50
|
}
|
|
51
51
|
}
|
package/pxtarget.json
CHANGED
|
@@ -54,6 +54,14 @@
|
|
|
54
54
|
"identity": true,
|
|
55
55
|
"redirect": true,
|
|
56
56
|
"order": 2
|
|
57
|
+
},
|
|
58
|
+
"clever": {
|
|
59
|
+
"id": "clever",
|
|
60
|
+
"name": "Clever",
|
|
61
|
+
"icon": "/static/providers/clever-logo.png",
|
|
62
|
+
"identity": true,
|
|
63
|
+
"redirect": true,
|
|
64
|
+
"order": 3
|
|
57
65
|
}
|
|
58
66
|
}
|
|
59
67
|
},
|
|
@@ -166,7 +174,7 @@
|
|
|
166
174
|
"githubCorePackage": "lancaster-university/microbit",
|
|
167
175
|
"gittag": "v2.2.0-rc6",
|
|
168
176
|
"serviceId": "microbit",
|
|
169
|
-
"dockerImage": "pext/yotta:
|
|
177
|
+
"dockerImage": "pext/yotta:gcc5"
|
|
170
178
|
},
|
|
171
179
|
"multiVariants": [
|
|
172
180
|
"mbdal",
|
|
@@ -189,14 +197,14 @@
|
|
|
189
197
|
"codalTarget": {
|
|
190
198
|
"name": "codal-microbit-v2",
|
|
191
199
|
"url": "https://github.com/lancaster-university/codal-microbit-v2",
|
|
192
|
-
"branch": "v0.2.
|
|
200
|
+
"branch": "v0.2.57",
|
|
193
201
|
"type": "git"
|
|
194
202
|
},
|
|
195
203
|
"codalBinary": "MICROBIT",
|
|
196
204
|
"githubCorePackage": "lancaster-university/microbit-v2-samples",
|
|
197
|
-
"gittag": "v0.2.
|
|
205
|
+
"gittag": "v0.2.13",
|
|
198
206
|
"serviceId": "mbcodal2",
|
|
199
|
-
"dockerImage": "pext/yotta:
|
|
207
|
+
"dockerImage": "pext/yotta:latest",
|
|
200
208
|
"yottaConfigCompatibility": true
|
|
201
209
|
}
|
|
202
210
|
}
|
|
@@ -596,20 +604,6 @@
|
|
|
596
604
|
"disableBlobObjectDownload": true
|
|
597
605
|
}
|
|
598
606
|
},
|
|
599
|
-
"clever=1": {
|
|
600
|
-
"cloud": {
|
|
601
|
-
"cloudProviders": {
|
|
602
|
-
"clever": {
|
|
603
|
-
"id": "clever",
|
|
604
|
-
"name": "Clever",
|
|
605
|
-
"icon": "/static/providers/clever-logo.png",
|
|
606
|
-
"identity": true,
|
|
607
|
-
"redirect": true,
|
|
608
|
-
"order": 3
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
},
|
|
613
607
|
"skillsMap=1": {
|
|
614
608
|
"appTheme": {
|
|
615
609
|
"hideReplaceMyCode": false
|
|
@@ -18,6 +18,51 @@ body {
|
|
|
18
18
|
overflow: hidden;
|
|
19
19
|
margin: 0;
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
#safari-mute-button-outer {
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 10px;
|
|
25
|
+
right: 10px;
|
|
26
|
+
}
|
|
27
|
+
.safari-mute-button {
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
position: relative;
|
|
30
|
+
display: inline-block;
|
|
31
|
+
min-height: 1rem;
|
|
32
|
+
outline: none;
|
|
33
|
+
border: none;
|
|
34
|
+
vertical-align: middle;
|
|
35
|
+
margin: 0;
|
|
36
|
+
padding: 0.75rem;
|
|
37
|
+
text-transform: none;
|
|
38
|
+
text-shadow: none;
|
|
39
|
+
font-weight: 400;
|
|
40
|
+
line-height: 1em;
|
|
41
|
+
font-style: normal;
|
|
42
|
+
font-size: 16px;
|
|
43
|
+
text-align: center;
|
|
44
|
+
text-decoration: none;
|
|
45
|
+
border-radius: 0.2em;
|
|
46
|
+
user-select: none;
|
|
47
|
+
transition: opacity .1s ease,background-color .1s ease,box-shadow .1s ease,color .1s ease,background .1s ease;
|
|
48
|
+
-webkit-tap-highlight-color: transparent;
|
|
49
|
+
background-color: #e41b21;
|
|
50
|
+
}
|
|
51
|
+
.safari-mute-button:hover {
|
|
52
|
+
filter: grayscale(.15) brightness(.85) contrast(1.3);
|
|
53
|
+
}
|
|
54
|
+
.safari-mute-button svg {
|
|
55
|
+
width: 24px;
|
|
56
|
+
height: 24px;
|
|
57
|
+
}
|
|
58
|
+
.safari-mute-button path {
|
|
59
|
+
fill: white;
|
|
60
|
+
}
|
|
61
|
+
@media screen and (max-height: 160px) {
|
|
62
|
+
.safari-mute-button {
|
|
63
|
+
display: none;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
21
66
|
</style>
|
|
22
67
|
<script src="/cdn/pxtsim.js"></script>
|
|
23
68
|
<script src="/sim/sim.js"></script>
|
package/targetconfig.json
CHANGED
|
@@ -775,6 +775,7 @@
|
|
|
775
775
|
"dfrobot/pxt-dfrobot_iot_cloud_kit": { "tags": [ "Networking" ] },
|
|
776
776
|
"plenprojectcompany/pxt-plenbit_full": { "tags": [ "Robotics" ] },
|
|
777
777
|
"bsiever/microbit-pxt-clicks": { "tags": [ "Software" ] },
|
|
778
|
+
"bsiever/pxt-morse": { "tags": [ "Software" ] },
|
|
778
779
|
"joy-it/pxt-ads1115": { "tags": [ "Science" ] },
|
|
779
780
|
"bsiever/microbit-pxt-rotate": { "tags": [ "Software" ] },
|
|
780
781
|
"sparkfun/pxt-gator-uv": { "tags": [ "Science" ] },
|
|
@@ -783,7 +784,10 @@
|
|
|
783
784
|
"makeandlearn/pxt-didacbot": { "tags": [ "Robotics" ] },
|
|
784
785
|
"cytrontechnologies/pxt-rekabit-rbt-project-kit": { "tags": [ "Science" ] },
|
|
785
786
|
"cytrontechnologies/pxt-motionbit": { "tags": [ "Robotics" ] },
|
|
786
|
-
"joy-it/pxt-rb-joypi-advanced": { "tags": [ "Science" ] }
|
|
787
|
+
"joy-it/pxt-rb-joypi-advanced": { "tags": [ "Science" ] },
|
|
788
|
+
"bsiever/pxt-sen55": { "tags": [ "Science" ] },
|
|
789
|
+
"climate-action-kits/pxt-fwd-edu": {},
|
|
790
|
+
"elecfreaks/pxt-cutebot-pro": { "tags": [ "Robotics" ], "preferred": true }
|
|
787
791
|
},
|
|
788
792
|
"upgrades": {
|
|
789
793
|
"tinkertanker/pxt-iot-environment-kit": "min:v4.2.1",
|
|
@@ -866,6 +870,6 @@
|
|
|
866
870
|
}
|
|
867
871
|
},
|
|
868
872
|
"electronManifest": {
|
|
869
|
-
"latest": "
|
|
873
|
+
"latest": "v6.0.15"
|
|
870
874
|
}
|
|
871
875
|
}
|