pxt-microbit 7.1.24 → 7.1.29
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/block-tests.js +1 -1
- package/built/common-sim.d.ts +16 -2
- package/built/common-sim.js +320 -4
- package/built/hexcache/{f254b35661aec9c97b86444b02fe17ed0fa65ad03b8ab65dd2ef6c66e74259fe.hex → 26bf3d28c9e047cf23ab30fdc58a2b08ffdff09a1d937217a0b9f0c6865e26f8.hex} +79 -79
- package/built/hexcache/{c5a9e0a8ad381a258b95357cf7aa140734c79ef987eb172003e8571d37bb6fbf.hex → 3ad12e3ab4375ab9cdc8878550a39c51482d2739970dc1ad4a9267c62badb7bd.hex} +82 -82
- package/built/hexcache/{f9d55de9d2511f3a9625351415d9c95513d63a475e4a4c9f23db905d22e80af0.hex → 4e84d0c0d59051e8b1bf3f71205b179a9ae1b51928292f2aea36016ecc49d896.hex} +79 -79
- package/built/hexcache/{55639532a88cab7365a995dd19138a4085b2435262f5783f2cc2204a1e210a6c.hex → 846508e18afd4c8d586be2b6e3ebd204e658a9531deed5cd3f0dbfaaeeeb8285.hex} +82 -82
- package/built/target.js +1 -1
- package/built/target.json +1 -1
- package/built/targetlight.js +1 -1
- package/built/targetlight.json +1 -1
- package/built/theme.json +1 -1
- package/built/web/blockly.css +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/rtlblockly.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/courses.md +2 -2
- package/docs/extensions/extension-gallery.md +4 -0
- package/docs/microcode.md +4 -9
- package/docs/projects/SUMMARY.md +3 -4
- package/docs/projects/duct-tape-watch.md +0 -4
- package/docs/projects/heads-guess.md +11 -11
- package/docs/projects/rock-paper-scissors.md +1 -1
- package/docs/projects/spy/heads-guess.md +1 -1
- package/docs/projects/spy/micro-chat.md +2 -2
- package/docs/projects/spy/rock-paper-scissors.md +2 -2
- package/package.json +17 -3
- package/pxtarget.json +1 -0
- package/targetconfig.json +75 -1
package/docs/courses.md
CHANGED
|
@@ -116,8 +116,8 @@ Tutorials, lessons, and mini-courses about programming and computing.
|
|
|
116
116
|
"imageUrl":"/static/courses/logic-lab.png"
|
|
117
117
|
}, {
|
|
118
118
|
"name": "CodeJoy Remote Robotics",
|
|
119
|
-
"description": "Interactive remote robotics and
|
|
120
|
-
"url": "https://www.
|
|
119
|
+
"description": "Interactive remote robotics and coding classes for students and educators",
|
|
120
|
+
"url": "https://www.codejoy.org",
|
|
121
121
|
"imageUrl": "/static/courses/codejoy.png"
|
|
122
122
|
}]
|
|
123
123
|
```
|
|
@@ -1075,6 +1075,10 @@ Many extensions are available to work with interface kits, add-on hardware, or o
|
|
|
1075
1075
|
"name": "micro:bit power saving",
|
|
1076
1076
|
"url":"/pkg/microbit-foundation/pxt-microbit-v2-power",
|
|
1077
1077
|
"cardType": "package"
|
|
1078
|
+
}, {
|
|
1079
|
+
"name": "Sound Level in decibels (dB)",
|
|
1080
|
+
"url":"/pkg/microbit-foundation/pxt-sound-level-db",
|
|
1081
|
+
"cardType": "package"
|
|
1078
1082
|
}, {
|
|
1079
1083
|
"name": "DS3231 Real Time Clock",
|
|
1080
1084
|
"url":"/pkg/AlexandreFrolov/DS3231",
|
package/docs/microcode.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MicroCode
|
|
2
2
|
|
|
3
|
-
[MicroCode](https://
|
|
3
|
+
[MicroCode](https://microbit-apps.github.io/microcode-classic/docs/manual) is an experimental tile-based language and editor for young coders and coders with disabilities on the BBC micro:bit V2 (V1 not supported), inspired by Kodu Game Lab.
|
|
4
4
|
|
|
5
5
|
## Getting started
|
|
6
6
|
|
|
@@ -8,19 +8,14 @@
|
|
|
8
8
|
[{
|
|
9
9
|
"name": "Getting Started",
|
|
10
10
|
"description": "MicroCode is an experimental tile-based language and editor for young coders and coders with disabilities on the BBC micro:bit V2 (V1 not supported), inspired by Kodu Game Lab.",
|
|
11
|
-
"url":"https://
|
|
11
|
+
"url":"https://microbit-apps.github.io/microcode-classic/docs/manual",
|
|
12
12
|
"imageUrl": "/static/microcode/home.png"
|
|
13
13
|
},
|
|
14
|
-
|
|
15
|
-
"name": "User Guide",
|
|
16
|
-
"description": "Learn how to use MicroCode editor and language.",
|
|
17
|
-
"url": "https://microsoft.github.io/microcode/docs/manual",
|
|
18
|
-
"imageUrl": "/static/microcode/userguide.png"
|
|
19
|
-
},
|
|
14
|
+
|
|
20
15
|
{
|
|
21
16
|
"name": "Samples",
|
|
22
17
|
"description": "Annotated MicroCode programs with screen animations, sounds, radio messages and more.",
|
|
23
|
-
"url": "https://
|
|
18
|
+
"url": "https://microbit-apps.github.io/microcode-classic/docs/samples",
|
|
24
19
|
"imageUrl": "/static/microcode/samples.png"
|
|
25
20
|
}
|
|
26
21
|
]
|
package/docs/projects/SUMMARY.md
CHANGED
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
* [Networking with the micro:bit](https://www.digitaltechnologieshub.edu.au/search/networking-with-the-micro-bit/)
|
|
141
141
|
* [SparkFun Videos](https://youtu.be/kaNtg1HGXbY?list=PLBcrWxTa5CS0mWJrytvii8aG5KUqMXvSk)
|
|
142
142
|
* [Logic Lab](/courses/logic-lab)
|
|
143
|
-
* [CodeJoy Remote Robotics](https://www.
|
|
143
|
+
* [CodeJoy Remote Robotics](https://www.codejoy.org)
|
|
144
144
|
* [Blocks to JavaScript](/courses/blocks-to-javascript)
|
|
145
145
|
* [SparkFun Inventor's Kit](https://learn.sparkfun.com/tutorials/sparkfun-inventors-kit-for-microbit-experiment-guide/introduction-to-the-sparkfun-inventors-kit-for-microbit)
|
|
146
146
|
* [Kitronik Inventor Kit](https://www.kitronik.co.uk/blog/inventors-kit-experiment-1-help)
|
|
@@ -156,9 +156,8 @@
|
|
|
156
156
|
* [Sound LED](https://microsoft.github.io/jacdac-docs/clients/makecode/projects/sound-led/)
|
|
157
157
|
* [Magnetic Sound Bender](https://microsoft.github.io/jacdac-docs/clients/makecode/projects/magnetic-sound-bender/)
|
|
158
158
|
* [MicroCode for the new micro:bit (V2)](/microcode)
|
|
159
|
-
* [Getting Started](https://
|
|
160
|
-
* [
|
|
161
|
-
* [Samples](https://microsoft.github.io/microcode/docs/samples)
|
|
159
|
+
* [Getting Started](https://microbit-apps.github.io/microcode-classic/docs/manual)
|
|
160
|
+
* [Samples](https://microbit-apps.github.io/microcode-classic/docs/samples)
|
|
162
161
|
* [Behind the MakeCode Hardware](/behind-the-makecode-hardware)
|
|
163
162
|
* [LEDs](https://youtu.be/qqBmvHD5bCw)
|
|
164
163
|
* [Buttons](https://youtu.be/t_Qujjd_38o)
|
|
@@ -15,11 +15,11 @@ game.startCountdown(30000)
|
|
|
15
15
|
|
|
16
16
|
## {Step 2}
|
|
17
17
|
|
|
18
|
-
Create a
|
|
18
|
+
Create a new array of words to guess and name it ``||arrays:wordList||``. You will find **Arrays** under **Advanced**.
|
|
19
19
|
|
|
20
20
|
```blocks
|
|
21
|
-
let
|
|
22
|
-
|
|
21
|
+
let wordList: string[] = []
|
|
22
|
+
wordList = ["PUPPY", "CLOCK", "NIGHT"]
|
|
23
23
|
game.startCountdown(30000)
|
|
24
24
|
```
|
|
25
25
|
|
|
@@ -35,29 +35,29 @@ input.onGesture(Gesture.LogoUp, function () {
|
|
|
35
35
|
|
|
36
36
|
## {Step 4}
|
|
37
37
|
|
|
38
|
-
The items in ``||arrays:
|
|
38
|
+
The items in ``||arrays:wordList||`` are numbered ``0`` to ``length - 1``.
|
|
39
39
|
Add code to pick a ``||math:random||`` ``||variables:index||``.
|
|
40
40
|
|
|
41
41
|
```blocks
|
|
42
|
-
let
|
|
42
|
+
let wordList: string[] = []
|
|
43
43
|
let index = 0
|
|
44
44
|
input.onGesture(Gesture.LogoUp, function () {
|
|
45
45
|
// @highlight
|
|
46
|
-
index = randint(0,
|
|
46
|
+
index = randint(0, wordList.length - 1)
|
|
47
47
|
})
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
## {Step 5}
|
|
51
51
|
|
|
52
|
-
Add code to ``||basic:show||`` the value of the item stored at ``||variables:index||`` in ``||arrays:
|
|
52
|
+
Add code to ``||basic:show||`` the value of the item stored at ``||variables:index||`` in ``||arrays:wordList||``.
|
|
53
53
|
|
|
54
54
|
```blocks
|
|
55
|
-
let
|
|
55
|
+
let wordList: string[] = []
|
|
56
56
|
let index = 0
|
|
57
57
|
input.onGesture(Gesture.LogoUp, function () {
|
|
58
|
-
index = randint(0,
|
|
58
|
+
index = randint(0, wordList.length - 1)
|
|
59
59
|
// @highlight
|
|
60
|
-
basic.showString(
|
|
60
|
+
basic.showString(wordList[index])
|
|
61
61
|
})
|
|
62
62
|
```
|
|
63
63
|
|
|
@@ -84,7 +84,7 @@ input.onGesture(Gesture.ScreenDown, function () {
|
|
|
84
84
|
|
|
85
85
|
## {Step 8}
|
|
86
86
|
|
|
87
|
-
Add
|
|
87
|
+
Add another event to run code when the @boardname@ ``||input:screen||`` is pointing ``||input:up||``.
|
|
88
88
|
This is the gesture for a pass.
|
|
89
89
|
|
|
90
90
|
```blocks
|
|
@@ -172,7 +172,7 @@ input.onGesture(Gesture.Shake, function() {
|
|
|
172
172
|
|
|
173
173
|
## {Step 12}
|
|
174
174
|
|
|
175
|
-
Now let's deal with the last condition - if our hand variable isn't holding a 1 (Rock) or a 2 (Paper), then it must be 3 (
|
|
175
|
+
Now let's deal with the last condition - if our hand variable isn't holding a 1 (Rock) or a 2 (Paper), then it must be 3 (✂️ Scissors)! From the ``||basic:Basic||`` category, drag another ``||basic:show icon||`` block out and drop it into the last opening under the ``||logic:else||``. In the ``||basic:show icon||`` block, click on the Heart icon and select the Scissors icon.
|
|
176
176
|
|
|
177
177
|
```blocks
|
|
178
178
|
let hand = 0;
|
|
@@ -89,7 +89,7 @@ input.onGesture(Gesture.ScreenDown, function () {
|
|
|
89
89
|
|
|
90
90
|
## {Step 8}
|
|
91
91
|
|
|
92
|
-
Add
|
|
92
|
+
Add another event to run code when a gesture has the @boardname@ ``||input:screen||`` is
|
|
93
93
|
pointing ``||input:up||``. This is the gesture for a pass.
|
|
94
94
|
|
|
95
95
|
```spy
|
|
@@ -47,7 +47,7 @@ radio.setGroup(1)
|
|
|
47
47
|
input.onButtonPressed(Button.A, function() {
|
|
48
48
|
radio.sendString("Micro Chat!")
|
|
49
49
|
})
|
|
50
|
-
radio.onReceivedString(function
|
|
50
|
+
radio.onReceivedString(function(receivedString: string) {
|
|
51
51
|
})
|
|
52
52
|
```
|
|
53
53
|
|
|
@@ -60,7 +60,7 @@ radio.setGroup(1)
|
|
|
60
60
|
input.onButtonPressed(Button.A, function() {
|
|
61
61
|
radio.sendString("Micro Chat!")
|
|
62
62
|
})
|
|
63
|
-
radio.onReceivedString(function
|
|
63
|
+
radio.onReceivedString(function(receivedString: string) {
|
|
64
64
|
// @highlight
|
|
65
65
|
basic.showString(receivedString)
|
|
66
66
|
})
|
|
@@ -61,7 +61,7 @@ input.onGesture(Gesture.Shake, function() {
|
|
|
61
61
|
|
|
62
62
|
## {Step 5}
|
|
63
63
|
|
|
64
|
-
Finally let's deal with the last condition - if our hand variable isn't holding a 1 (Rock) or a 2 (Paper), then it must be 3 (Scissors)! Add an ``||logic:else||`` clause and use the ``||basic:show icon||`` function to show
|
|
64
|
+
Finally let's deal with the last condition - if our hand variable isn't holding a 1 (Rock) or a 2 (Paper), then it must be 3 (Scissors)! Add an ``||logic:else||`` clause and use the ``||basic:show icon||`` function to show ✂️ Scissors.
|
|
65
65
|
|
|
66
66
|
```spy
|
|
67
67
|
let hand = 0;
|
|
@@ -83,4 +83,4 @@ Let's test your code! Press the white **SHAKE** button on the micro:bit on-scree
|
|
|
83
83
|
|
|
84
84
|
## {Step 7}
|
|
85
85
|
|
|
86
|
-
If you have a @boardname@ device, connect it to your computer and click the ``|Download|`` button. Follow the instructions to transfer your code onto the @boardname@. Once your code has been downloaded, attach your micro:bit to a battery pack and challenge another micro:bit or a human to a game of 💎 Rock, 📃 Paper,
|
|
86
|
+
If you have a @boardname@ device, connect it to your computer and click the ``|Download|`` button. Follow the instructions to transfer your code onto the @boardname@. Once your code has been downloaded, attach your micro:bit to a battery pack and challenge another micro:bit or a human to a game of 💎 Rock, 📃 Paper, ✂️ Scissors!
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pxt-microbit",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.29",
|
|
4
4
|
"description": "micro:bit target for Microsoft MakeCode (PXT)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"JavaScript",
|
|
@@ -45,7 +45,21 @@
|
|
|
45
45
|
"typescript": "4.8.3"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"pxt-common-packages": "12.3.
|
|
49
|
-
"pxt-core": "11.4.
|
|
48
|
+
"pxt-common-packages": "12.3.29",
|
|
49
|
+
"pxt-core": "11.4.16"
|
|
50
|
+
},
|
|
51
|
+
"overrides": {
|
|
52
|
+
"@blockly/field-colour": {
|
|
53
|
+
"blockly": "^12.0.0-beta.4"
|
|
54
|
+
},
|
|
55
|
+
"@blockly/plugin-workspace-search": {
|
|
56
|
+
"blockly": "^12.0.0-beta.4"
|
|
57
|
+
},
|
|
58
|
+
"@blockly/keyboard-navigation": {
|
|
59
|
+
"blockly": "^12.0.0-beta.4"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"scripts": {
|
|
63
|
+
"postinstall": "node ./scripts/patchBlocklyFieldColour.js"
|
|
50
64
|
}
|
|
51
65
|
}
|
package/pxtarget.json
CHANGED
package/targetconfig.json
CHANGED
|
@@ -404,6 +404,7 @@
|
|
|
404
404
|
"stemhub/pxt-stemhubcity": { "tags": [ "Science" ] },
|
|
405
405
|
"kittenbot/pxt-powerbrick": { "tags": [ "Science" ] },
|
|
406
406
|
"microbit-foundation/pxt-microbit-v2-power": { "tags": [ "Software" ] },
|
|
407
|
+
"microbit-foundation/pxt-sound-level-db": { "tags": [ "Software" ] },
|
|
407
408
|
"kittenbot/pxt-joyfrog": { "tags": [ "Gaming" ] },
|
|
408
409
|
"kittenbot/pxt-sugar": { "tags": [ "Science" ] },
|
|
409
410
|
"kittenbot/pxt-koi": { "tags": [ "Science" ] },
|
|
@@ -493,7 +494,80 @@
|
|
|
493
494
|
"sha": "0825d56f78528c57af100a96abdfe2162f59945a",
|
|
494
495
|
"devUrl": "http://localhost:3000"
|
|
495
496
|
}
|
|
496
|
-
}
|
|
497
|
+
},
|
|
498
|
+
"jacdac/pxt-jacdac": {
|
|
499
|
+
"simx": {
|
|
500
|
+
"sha": "1992ffbd37a7e28604e65cc16efa78a827543199",
|
|
501
|
+
"devUrl": "https://jacdac.github.io/pxt-jacdac/"
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
"jacdac/pxt-jacdac/accelerometer": {},
|
|
505
|
+
"jacdac/pxt-jacdac/acidity": {},
|
|
506
|
+
"jacdac/pxt-jacdac/air-pressure": {},
|
|
507
|
+
"jacdac/pxt-jacdac/air-quality-index": {},
|
|
508
|
+
"jacdac/pxt-jacdac/arcade-gamepad": {},
|
|
509
|
+
"jacdac/pxt-jacdac/azure-iot-hub-health": {},
|
|
510
|
+
"jacdac/pxt-jacdac/button": {},
|
|
511
|
+
"jacdac/pxt-jacdac/buzzer": {},
|
|
512
|
+
"jacdac/pxt-jacdac/character-screen": {},
|
|
513
|
+
"jacdac/pxt-jacdac/codal-message-bus": {},
|
|
514
|
+
"jacdac/pxt-jacdac/color": {},
|
|
515
|
+
"jacdac/pxt-jacdac/compass": {},
|
|
516
|
+
"jacdac/pxt-jacdac/dc-current-measurement": {},
|
|
517
|
+
"jacdac/pxt-jacdac/dc-voltage-measurement": {},
|
|
518
|
+
"jacdac/pxt-jacdac/distance": {},
|
|
519
|
+
"jacdac/pxt-jacdac/dmx": {},
|
|
520
|
+
"jacdac/pxt-jacdac/dot-matrix": {},
|
|
521
|
+
"jacdac/pxt-jacdac/dual-motors": {},
|
|
522
|
+
"jacdac/pxt-jacdac/e-co2": {},
|
|
523
|
+
"jacdac/pxt-jacdac/flex": {},
|
|
524
|
+
"jacdac/pxt-jacdac/gamepad": {},
|
|
525
|
+
"jacdac/pxt-jacdac/gyroscope": {},
|
|
526
|
+
"jacdac/pxt-jacdac/heart-rate": {},
|
|
527
|
+
"jacdac/pxt-jacdac/hid-joystick": {},
|
|
528
|
+
"jacdac/pxt-jacdac/hid-keyboard": {},
|
|
529
|
+
"jacdac/pxt-jacdac/hid-mouse": {},
|
|
530
|
+
"jacdac/pxt-jacdac/humidity": {},
|
|
531
|
+
"jacdac/pxt-jacdac/illuminance": {},
|
|
532
|
+
"jacdac/pxt-jacdac/led": {},
|
|
533
|
+
"jacdac/pxt-jacdac/led-single": {},
|
|
534
|
+
"jacdac/pxt-jacdac/led-strip": {},
|
|
535
|
+
"jacdac/pxt-jacdac/light-bulb": {},
|
|
536
|
+
"jacdac/pxt-jacdac/light-level": {},
|
|
537
|
+
"jacdac/pxt-jacdac/magnetic-field-level": {},
|
|
538
|
+
"jacdac/pxt-jacdac/magnetometer": {},
|
|
539
|
+
"jacdac/pxt-jacdac/model-runner": {},
|
|
540
|
+
"jacdac/pxt-jacdac/motion": {},
|
|
541
|
+
"jacdac/pxt-jacdac/motor": {},
|
|
542
|
+
"jacdac/pxt-jacdac/multitouch": {},
|
|
543
|
+
"jacdac/pxt-jacdac/potentiometer": {},
|
|
544
|
+
"jacdac/pxt-jacdac/power": {},
|
|
545
|
+
"jacdac/pxt-jacdac/pulse-oximeter": {},
|
|
546
|
+
"jacdac/pxt-jacdac/rain-gauge": {},
|
|
547
|
+
"jacdac/pxt-jacdac/real-time-clock": {},
|
|
548
|
+
"jacdac/pxt-jacdac/reflected-light": {},
|
|
549
|
+
"jacdac/pxt-jacdac/relay": {},
|
|
550
|
+
"jacdac/pxt-jacdac/rng": {},
|
|
551
|
+
"jacdac/pxt-jacdac/rotary-encoder": {},
|
|
552
|
+
"jacdac/pxt-jacdac/sensor-aggregator": {},
|
|
553
|
+
"jacdac/pxt-jacdac/servo": {},
|
|
554
|
+
"jacdac/pxt-jacdac/seven-segment-display": {},
|
|
555
|
+
"jacdac/pxt-jacdac/soil-moisture": {},
|
|
556
|
+
"jacdac/pxt-jacdac/solenoid": {},
|
|
557
|
+
"jacdac/pxt-jacdac/sound-level": {},
|
|
558
|
+
"jacdac/pxt-jacdac/speech-synthesis": {},
|
|
559
|
+
"jacdac/pxt-jacdac/switch": {},
|
|
560
|
+
"jacdac/pxt-jacdac/tcp": {},
|
|
561
|
+
"jacdac/pxt-jacdac/temperature": {},
|
|
562
|
+
"jacdac/pxt-jacdac/traffic-light": {},
|
|
563
|
+
"jacdac/pxt-jacdac/tvoc": {},
|
|
564
|
+
"jacdac/pxt-jacdac/uv-index": {},
|
|
565
|
+
"jacdac/pxt-jacdac/vibration-motor": {},
|
|
566
|
+
"jacdac/pxt-jacdac/water-level": {},
|
|
567
|
+
"jacdac/pxt-jacdac/weight-scale": {},
|
|
568
|
+
"jacdac/pxt-jacdac/wifi": {},
|
|
569
|
+
"jacdac/pxt-jacdac/wind-direction": {},
|
|
570
|
+
"jacdac/pxt-jacdac/wind-speed": {}
|
|
497
571
|
},
|
|
498
572
|
"approvedEditorExtensionUrls": [
|
|
499
573
|
"https://microsoft.github.io/ml4f/",
|