pxt-microbit 7.0.19 → 7.0.21
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/editor.js +24 -4
- package/built/target-strings.json +1 -1
- package/built/target.js +1 -1
- package/built/target.json +1 -1
- package/built/targetlight.json +1 -1
- package/docs/extensions/extension-gallery.md +12 -8
- package/docs/projects/analog-pin-tester.md +1 -1
- package/docs/projects/banana-keyboard/code.md +25 -25
- package/docs/projects/banana-keyboard/make.md +1 -1
- package/docs/projects/crashy-bird.md +12 -12
- package/docs/projects/fireflies.md +3 -3
- package/docs/projects/guitar/accelerometer.md +5 -5
- package/docs/projects/guitar/displaybuttons.md +7 -7
- package/docs/projects/guitar/lightsensor.md +4 -4
- package/docs/projects/guitar/pinpress.md +12 -12
- package/docs/projects/hack-your-headphones/code.md +19 -19
- package/docs/projects/hot-or-cold/beacon.md +1 -1
- package/docs/projects/hot-or-cold/multi-beacons.md +2 -2
- package/docs/projects/hot-or-cold/seekers.md +2 -2
- package/docs/projects/hot-or-cold.md +3 -3
- package/docs/projects/inchworm/code.md +5 -5
- package/docs/projects/inchworm/connect.md +1 -1
- package/docs/projects/infection.md +175 -175
- package/docs/projects/karel.md +37 -37
- package/docs/projects/light-monster/code.md +1 -1
- package/docs/projects/light-monster/connect.md +2 -2
- package/docs/projects/magic-button-trick.md +13 -13
- package/docs/projects/micro-coin.md +3 -3
- package/docs/projects/milk-carton-robot/code.md +3 -3
- package/docs/projects/milk-carton-robot/connect.md +2 -2
- package/docs/projects/milky-monster/code.md +3 -3
- package/docs/projects/milky-monster/connect.md +2 -2
- package/docs/projects/mood-radio.md +4 -4
- package/docs/projects/plant-watering/code.md +1 -1
- package/docs/projects/railway-crossing.md +5 -5
- package/docs/projects/rc-car/code.md +2 -2
- package/docs/projects/rc-car/connect.md +6 -6
- package/docs/projects/reaction-time/code.md +15 -15
- package/docs/projects/salute.md +5 -5
- package/docs/projects/servo-calibrator.md +3 -3
- package/docs/projects/soil-moisture/code.md +3 -3
- package/docs/projects/soil-moisture/connect.md +2 -5
- package/docs/projects/spy/coin-flipper.md +4 -4
- package/docs/projects/spy/rock-paper-scissors.md +3 -3
- package/docs/projects/states-of-matter/code.md +15 -15
- package/docs/projects/tele-potato.md +6 -6
- package/docs/projects/telegraph/code.md +7 -7
- package/docs/projects/timing-gates.md +11 -11
- package/docs/projects/turtle-scanner.md +1 -1
- package/docs/projects/turtle-spiral.md +1 -1
- package/docs/projects/voting-machine.md +4 -4
- package/docs/projects/wallet/code.md +2 -2
- package/docs/projects/watch/code.md +11 -11
- package/docs/projects/watch/digital-watch.md +37 -37
- package/docs/projects/watch/timer.md +9 -9
- package/docs/teachertool.md +178 -0
- package/package.json +2 -2
- package/targetconfig.json +2 -0
|
@@ -35,7 +35,7 @@ We'll use button `A` to add `10` seconds to our time count. The time count of `s
|
|
|
35
35
|
|
|
36
36
|
```blocks
|
|
37
37
|
let seconds = 0;
|
|
38
|
-
input.onButtonPressed(Button.A, ()
|
|
38
|
+
input.onButtonPressed(Button.A, function () {
|
|
39
39
|
if (seconds < 50) {
|
|
40
40
|
seconds += 10;
|
|
41
41
|
basic.showNumber(seconds)
|
|
@@ -57,9 +57,9 @@ Now, we'll use the `B` button to add just `1` second the time count. The time co
|
|
|
57
57
|
|
|
58
58
|
```blocks
|
|
59
59
|
let seconds = 0;
|
|
60
|
-
input.onButtonPressed(Button.B, ()
|
|
60
|
+
input.onButtonPressed(Button.B, function () {
|
|
61
61
|
if (seconds < 60) {
|
|
62
|
-
seconds += 1
|
|
62
|
+
seconds += 1
|
|
63
63
|
basic.showNumber(seconds)
|
|
64
64
|
basic.clearScreen()
|
|
65
65
|
}
|
|
@@ -71,13 +71,13 @@ input.onButtonPressed(Button.B, () => {
|
|
|
71
71
|
Ok, now we'll get the timer going and show how many seconds are left. This will happen when the watch is shaken!
|
|
72
72
|
|
|
73
73
|
1. Get an ``||input:on shake||`` block and place it in the workspace.
|
|
74
|
-
2. Pull out a ``||loops:while||`` from **Loops** and put it in the ``||input:on shake||``. Replace the `true` condition with the ``||logic:0 < 0||``
|
|
74
|
+
2. Pull out a ``||loops:while||`` from **Loops** and put it in the ``||input:on shake||``. Replace the `true` condition with the ``||logic:0 < 0||`` condition from **Logic**. Make the `<` go to `>`. Change the `0` on the left to the `seconds` variable.
|
|
75
75
|
3. Take out another ``||basic:show number||`` and put it inside the ``||loops:while||``. Change the `0` to the `seconds` variable. Put a ``||basic:pause||`` under that and set the time to `1000` milliseconds. This means our timer will count down by **1000** milliseconds, which is actually one second, each time through the loop.
|
|
76
76
|
4. To change the number of seconds left, get a ``||variables:change by||`` and place it below the ``||basic:pause||``. Find the ``||math:0 - 0||`` block in **Math** and put it in the ``||variables:change by||``. Set the `0` on the right of the minus to be a `1`.
|
|
77
77
|
|
|
78
78
|
```blocks
|
|
79
79
|
let seconds = 0;
|
|
80
|
-
input.onGesture(Gesture.Shake, ()
|
|
80
|
+
input.onGesture(Gesture.Shake, function () {
|
|
81
81
|
while (seconds > 0) {
|
|
82
82
|
basic.showNumber(seconds);
|
|
83
83
|
basic.pause(1000);
|
|
@@ -91,11 +91,11 @@ Add a few ``||basic:show icon||`` blocks at the bottom of the ``||loops:while||`
|
|
|
91
91
|
|
|
92
92
|
```blocks
|
|
93
93
|
let seconds = 0;
|
|
94
|
-
input.onGesture(Gesture.Shake, ()
|
|
94
|
+
input.onGesture(Gesture.Shake, function () {
|
|
95
95
|
while (seconds > 0) {
|
|
96
|
-
basic.showNumber(seconds)
|
|
97
|
-
basic.pause(1000)
|
|
98
|
-
seconds -= 1
|
|
96
|
+
basic.showNumber(seconds)
|
|
97
|
+
basic.pause(1000)
|
|
98
|
+
seconds -= 1
|
|
99
99
|
}
|
|
100
100
|
basic.showIcon(IconNames.Diamond)
|
|
101
101
|
basic.showIcon(IconNames.SmallDiamond)
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Code Evaluation Tool
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
The [Teacher Tool]( https://microbit.makecode.com/beta--eval) is a mechanism for constructing a checklist of requirements for an assignment and running that list automatically against projects in quick succession. This allows teachers to build a checklist, then easily evaluate any number of projects based on that checklist. Projects are evaluated one at a time, but with auto-run enabled, you can update the loaded project by providing a new share link, at which point the rules will automatically be re-run on the new project.
|
|
6
|
+
|
|
7
|
+
## Teacher Tool Features
|
|
8
|
+
|
|
9
|
+
### Creating, Editing, and Running a Checklist
|
|
10
|
+
|
|
11
|
+
#### 1. Creating a new checklist
|
|
12
|
+
|
|
13
|
+
Create a new checklist using the **New Checklist** card. If there is already an "in progress" checklist, a warning will appear asking if it is okay to overwrite it.
|
|
14
|
+
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
#### 2. Naming a checklist
|
|
20
|
+
|
|
21
|
+
The checklist is given a name.
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
#### 3. Add Criteria
|
|
26
|
+
|
|
27
|
+
One or more **_criteria_** are added from the catalog using the **Add Criteria** button.
|
|
28
|
+
|
|
29
|
+

|
|
30
|
+
|
|
31
|
+
Some criteria (like `[block] used [count] times`) can be added multiple times, others (like `Read a GPIO pin` can only be added once).
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
#### 4. Fill in Parameters
|
|
36
|
+
|
|
37
|
+
Parameters for the criteria item are filled in for a criteria item.
|
|
38
|
+
|
|
39
|
+
### ~ tip
|
|
40
|
+
|
|
41
|
+
#### Parameter types
|
|
42
|
+
|
|
43
|
+
From a technical perspective, criteria parameters have these types:
|
|
44
|
+
|
|
45
|
+
- **Numeric** parameters have a small input and only allow number inputs.
|
|
46
|
+
- **String** parameters can have medium and long sized inputs.
|
|
47
|
+
- **Block** parameters should open a block-picker modal.
|
|
48
|
+
- **Empty** parameters appear in an error state until they have values.
|
|
49
|
+
|
|
50
|
+
### ~
|
|
51
|
+
|
|
52
|
+
Here a block is selected and used 3 times:
|
|
53
|
+
|
|
54
|
+

|
|
55
|
+
|
|
56
|
+
Parameter options are displayed and then selected.
|
|
57
|
+
|
|
58
|
+

|
|
59
|
+
|
|
60
|
+

|
|
61
|
+
|
|
62
|
+
#### 5. Remove Criteria
|
|
63
|
+
|
|
64
|
+
A criteria item is removed using the **trash** button.
|
|
65
|
+
|
|
66
|
+

|
|
67
|
+
|
|
68
|
+
#### 6. Load a project
|
|
69
|
+
|
|
70
|
+
A project into the project view by pasting in a share link or share ID.
|
|
71
|
+
|
|
72
|
+

|
|
73
|
+
|
|
74
|
+
The project will load in read-only mode with the project title appearing at the top of the project view.
|
|
75
|
+
|
|
76
|
+

|
|
77
|
+
|
|
78
|
+
#### 7. Run the checklist
|
|
79
|
+
|
|
80
|
+
With a project loaded, the checklist can run. The results are shown after clicking the **Run** button.
|
|
81
|
+
|
|
82
|
+

|
|
83
|
+
|
|
84
|
+
The results view lists each criteria with its outcome.
|
|
85
|
+
|
|
86
|
+

|
|
87
|
+
|
|
88
|
+
**Note**: the **Run** Button is disabled without loaded project.
|
|
89
|
+
|
|
90
|
+
### Editing Results
|
|
91
|
+
|
|
92
|
+
#### 1. Add feedback and notes
|
|
93
|
+
|
|
94
|
+
Feedback and notes are added using the **Add Notes** button. The feedback box should resize to fit its content as notes are added. The original feedback remains even if you re-run the rules using the **Run** button.
|
|
95
|
+
|
|
96
|
+

|
|
97
|
+
|
|
98
|
+

|
|
99
|
+
|
|
100
|
+

|
|
101
|
+
|
|
102
|
+
#### 2. Edit outcomes
|
|
103
|
+
|
|
104
|
+
An outcome is edited using the provided dropdown.
|
|
105
|
+
|
|
106
|
+

|
|
107
|
+
|
|
108
|
+
The new selected outcome.
|
|
109
|
+
|
|
110
|
+

|
|
111
|
+
|
|
112
|
+
### Result Clearing and Auto-Run
|
|
113
|
+
|
|
114
|
+
#### 1. Toggling Auto-run
|
|
115
|
+
|
|
116
|
+
Auto-run is toggled either **on** or **off** using the button in the menu.
|
|
117
|
+
|
|
118
|
+

|
|
119
|
+
|
|
120
|
+
#### 2. Auto-run disabled
|
|
121
|
+
|
|
122
|
+
If auto-run is **disabled**, a result's outcome (i.e. "Looks good", "Needs work", etc...) is set to "Not started" automatically if any of any of the following conditions are met:
|
|
123
|
+
|
|
124
|
+
- It is newly added (defaults to the "Not Started" state).
|
|
125
|
+
- A parameter in a rule is changed (only the affected rule enters the "Not Started" state).
|
|
126
|
+
- The loaded project changes (all rules are be set to "Not started").
|
|
127
|
+
|
|
128
|
+
#### 3. Auto-run enabled
|
|
129
|
+
|
|
130
|
+
If auto-run is **enabled**, any rules that enter the "Not started" state due to the conditions listed above are immediately and automatically re-run with their results updated.
|
|
131
|
+
|
|
132
|
+
### Loading/Importing/Exporting Checklists
|
|
133
|
+
|
|
134
|
+
#### 1. Pre-built checklists
|
|
135
|
+
|
|
136
|
+
There are pre-built checklists are available from on home page. If a selected checklist is already in-progress, an overwrite confirmation prompt is given.
|
|
137
|
+
|
|
138
|
+

|
|
139
|
+
|
|
140
|
+
#### 2. Export a checklist
|
|
141
|
+
|
|
142
|
+
A checklist is exported using the vertical "..." menu near the "auto-run" button.
|
|
143
|
+
|
|
144
|
+

|
|
145
|
+
|
|
146
|
+
This will download a json file for the checklist.
|
|
147
|
+
|
|
148
|
+

|
|
149
|
+
|
|
150
|
+
#### 3. Import a checklist
|
|
151
|
+
|
|
152
|
+
User can import a checklist from a file using the same "..." menu, or from the card on the welcome page.
|
|
153
|
+
|
|
154
|
+

|
|
155
|
+
|
|
156
|
+

|
|
157
|
+
|
|
158
|
+
Checklist file is selected using "Browse" or dropped directly into the popup. An overwrite confirmation prompted if there is currently an in-progress checklist.
|
|
159
|
+
|
|
160
|
+

|
|
161
|
+
|
|
162
|
+

|
|
163
|
+
|
|
164
|
+
### Other
|
|
165
|
+
|
|
166
|
+
If the page is refreshed (or if the browser closes/re-opens), the current checklist preserved.
|
|
167
|
+
|
|
168
|
+
Use the print button to create a version of the results with the outcomes and feedback visible (the other UI elements are hidden).
|
|
169
|
+
|
|
170
|
+

|
|
171
|
+
|
|
172
|
+
The checklist-view/project-view splitter can be resized. It can also be reset to 50/50 split with double-click.
|
|
173
|
+
|
|
174
|
+

|
|
175
|
+
|
|
176
|
+
Slide the splitter to widen the view of the criteria and results.
|
|
177
|
+
|
|
178
|
+

|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pxt-microbit",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.21",
|
|
4
4
|
"description": "micro:bit target for Microsoft MakeCode (PXT)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"JavaScript",
|
|
@@ -46,6 +46,6 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"pxt-common-packages": "12.0.3",
|
|
49
|
-
"pxt-core": "10.2.
|
|
49
|
+
"pxt-core": "10.2.11"
|
|
50
50
|
}
|
|
51
51
|
}
|
package/targetconfig.json
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"microsoft/pxt-apa102": {},
|
|
32
32
|
"microsoft/pxt-radio-firefly": {},
|
|
33
33
|
"microsoft/pxt-ml": {},
|
|
34
|
+
"microsoft/pxt-arcadeshield": { "tags": [ "Lights and Display" ] },
|
|
34
35
|
"kitronikltd/pxt-kitronik-servo-lite": {
|
|
35
36
|
"tags": [ "Robotics" ],
|
|
36
37
|
"preferred": true
|
|
@@ -280,6 +281,7 @@
|
|
|
280
281
|
"upgrades": [ "min:v0.13.1" ]
|
|
281
282
|
},
|
|
282
283
|
"elecfreaks/pxt-nezha": { "tags": [ "Robotics" ] },
|
|
284
|
+
"elecfreaks/pxt-nezha2": { "tags": [ "Robotics" ] },
|
|
283
285
|
"philipphenkel/pxt-powerfunctions": {},
|
|
284
286
|
"1010technologies/pxt-makerbit-ir-transmitter": {},
|
|
285
287
|
"dfrobot/pxt-dfrobot_huskylens": { "tags": [ "Science" ] },
|