pxt-microbit 4.1.6 → 4.1.10
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/common-sim.d.ts +4 -0
- package/built/common-sim.js +42 -0
- package/built/hexcache/{3237486a484d0d476c16429f4d524f5d3e2b2fd99336859f0cbb588ceb17e16b.hex → 167b21509d45dcf8aa9ac0e8dee0ad14c23cfa41fd75bbf9d0bb839519ac56b1.hex} +0 -0
- package/built/hexcache/{0a7e07c684763d50c302169904fdbb9fc387e1f105f5c8a62f369eab7e443b53.hex → 5f77c6b19fd0775b3c9f06534d4d55b43bba44d755df21a7ea304a6b4bc8c33d.hex} +10762 -10738
- package/built/hexcache/{72b9e94993590d9bbc5283b9e11d7f3a19235783f6a54231bf9cc657c64d7bc1.hex → 77bf628097cfa081fbde884794a216b621827ef66ce3beeee76691a64a8f2f84.hex} +0 -0
- package/built/hexcache/f091c776e3c7f7fdaae7df4b89e0390e843a916f5a561903fa6188993a5bffe1.hex +20247 -0
- package/built/sim.js +2 -2
- package/built/target.js +70 -37
- package/built/target.json +70 -37
- package/built/targetlight.json +6 -6
- package/built/theme.json +1 -0
- package/built/web/blockly.css +1 -1
- package/built/web/react-common-skillmap.css +1 -0
- package/built/web/rtlblockly.css +1 -1
- package/built/web/rtlreact-common-skillmap.css +1 -0
- package/built/web/rtlsemantic.css +4 -4
- package/built/web/semantic.css +4 -4
- package/docs/device/usb/webusb.md +31 -9
- package/docs/device/usb/windows-chrome.md +14 -24
- package/docs/device/usb/windows-edge.md +11 -13
- package/docs/device/usb.md +10 -4
- package/docs/device.md +28 -12
- package/docs/docs.md +1 -1
- package/docs/extensions.md +66 -2
- package/docs/projects/micro-coin.md +12 -8
- package/docs/projects/v2-morse-chat.md +2 -2
- package/docs/projects/v2-pet-hamster.md +1 -1
- package/docs/reference/radio/received-packet.md +9 -1
- package/docs/reference/radio/received-signal-strength.md +16 -9
- package/package.json +3 -3
- package/pxtarget.json +2 -1
- package/targetconfig.json +19 -3
- package/built/hexcache/13247a2921d73de268c2d92a591f952d610020f3c1938dde251c0139d1823417.hex +0 -20222
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
# WebUSB
|
|
2
2
|
|
|
3
|
-
[WebUSB](https://wicg.github.io/webusb/) is
|
|
4
|
-
It allows for a **one-click download** without installing any additional app or software! It also allows to receive data from the @boardname@.
|
|
3
|
+
[WebUSB](https://wicg.github.io/webusb/) is a recent and developing web standard that allows you to access @boardname@ directly from a web page. It allows for a **one-click download** without installing any additional app or software! It also lets you receive data into the web page from the @boardname@.
|
|
5
4
|
|
|
6
5
|
## Support
|
|
7
6
|
|
|
8
|
-
* Chrome 79
|
|
9
|
-
* Microsoft Edge 79
|
|
7
|
+
* Chrome (version 79 and newer) browser for Android, Chrome OS, Linux, macOS and Windows 10.
|
|
8
|
+
* Microsoft Edge (version 79 and newer) browser for Android, Chrome OS, Linux, macOS and Windows 10.
|
|
10
9
|
|
|
11
10
|
## Prepare your @boardname@
|
|
12
11
|
|
|
@@ -18,13 +17,36 @@ Make sure that your @boardname@ is running version **0249** or above of the firm
|
|
|
18
17
|
|
|
19
18
|
Here are the steps on the supported browsers:
|
|
20
19
|
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
|
|
20
|
+
* Connect your @boardname@ to your computer with the Micro USB cable
|
|
21
|
+
* Open a project
|
|
22
|
+
* Click the triple dot icon on the **Download** button and then click **Connect device**.
|
|
23
|
+
|
|
24
|
+

|
|
25
|
+
|
|
26
|
+
* In the connection message window, click **Next**.
|
|
27
|
+
|
|
28
|
+

|
|
29
|
+
|
|
30
|
+
* Another message window will display telling you which device you should pair with. Click **Next** to go to the device list.
|
|
31
|
+
|
|
32
|
+

|
|
33
|
+
|
|
34
|
+
* Select **BBC micro:bit CMSIS-DAP** or **DAPLink CMSIS-DAP** from the list and click **Connect**.
|
|
35
|
+
|
|
36
|
+

|
|
25
37
|
|
|
26
38
|
If you don't see any devices in the list and @boardname@ has the right firmware (**0249** or above), you can create a [support ticket](https://support.microbit.org/support/tickets/new) to notify the Micro:bit Foundation of the problem. Skip the rest of these steps.
|
|
27
39
|
|
|
40
|
+

|
|
41
|
+
|
|
42
|
+
* When your @boardname@ is connected, you'll see the **Connected to micro:bit** message window. Click on **Done** and you're ready to go!
|
|
43
|
+
|
|
44
|
+

|
|
45
|
+
|
|
46
|
+
* If the connection to your @boardname@ was unsuccessful, you'll see the **Connect failed** message. You can press **Try Again** to attempt the connection again or cancel the window and [troubleshoot](/device/usb/webusb/troubleshoot) your connection.
|
|
47
|
+
|
|
48
|
+

|
|
49
|
+
|
|
28
50
|
## Unpair your @boardname@ #unpair
|
|
29
51
|
|
|
30
52
|
You will need to unpair your device from the editor to disable WebUSB.
|
|
@@ -33,7 +55,7 @@ You will need to unpair your device from the editor to disable WebUSB.
|
|
|
33
55
|
* Uncheck each **BBC micro:bit CMSIS-DAP** or **DAPLink CMSIS-DAP** device
|
|
34
56
|
* Reload the page
|
|
35
57
|
|
|
36
|
-

|
|
58
|
+

|
|
37
59
|
|
|
38
60
|
## One-click Download
|
|
39
61
|
|
|
@@ -1,32 +1,22 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
## ~ hint
|
|
4
|
-
|
|
5
|
-
Starting with Chrome 65 on Windows 10,
|
|
6
|
-
you can use **WebUSB** to download with one-click.
|
|
7
|
-
[Learn more about WebUSB...](/device/usb/webusb).
|
|
8
|
-
|
|
9
|
-
## ~
|
|
1
|
+
# Transferring from Chrome for Windows
|
|
10
2
|
|
|
11
3
|
While you're writing and testing your programs, you'll mostly be [running them
|
|
12
4
|
in the simulator](/device/simulator), but once you've finished your program you
|
|
13
5
|
can **compile** it and run it on your micro:bit.
|
|
14
6
|
|
|
15
|
-
|
|
7
|
+
## Transfer using a WebUSB connection
|
|
16
8
|
|
|
17
|
-
|
|
18
|
-
2. Click **Download** and download the `.hex` file
|
|
19
|
-
3. Copy the `.hex` file from your computer onto the micro:bit drive
|
|
9
|
+
With Chrome (version 79 and newer), you can transfer your program to the @boardname@ with a single click. If your browser supports WebUSB, you can use the **one-click download** feature to send your programs to the @boardname@. See the [WebUSB](/device/usb/webusb) page to learn how to pair your @boardname@ with a computer and transfer your programs with a single click.
|
|
20
10
|
|
|
21
|
-
##
|
|
11
|
+
## Downloading your program as file
|
|
22
12
|
|
|
23
|
-
|
|
13
|
+
The basic steps are:
|
|
24
14
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
15
|
+
1. Connect your @boardname@ to your computer with a USB cable (use an A-Male to Micro USB cable)
|
|
16
|
+
2. Click **Download** and download the `.hex` file
|
|
17
|
+
3. Copy the `.hex` file from your computer onto the micro:bit drive
|
|
28
18
|
|
|
29
|
-
|
|
19
|
+
### Step 1: Connect your micro:bit to your computer
|
|
30
20
|
|
|
31
21
|
First, connect the micro:bit:
|
|
32
22
|
|
|
@@ -40,7 +30,7 @@ it appears as a new drive under Devices.
|
|
|
40
30
|
|
|
41
31
|

|
|
42
32
|
|
|
43
|
-
|
|
33
|
+
### Step 2 (optional): Configure Chrome to ask where to save the file
|
|
44
34
|
|
|
45
35
|
You only need to do this once.
|
|
46
36
|
|
|
@@ -49,7 +39,7 @@ You only need to do this once.
|
|
|
49
39
|
3. Find the **Downloads** settings.
|
|
50
40
|
4. Enable the setting **Ask where to save each file before downloading**.
|
|
51
41
|
|
|
52
|
-
|
|
42
|
+
### Step 3: Download your program
|
|
53
43
|
|
|
54
44
|
1. Open your project on @homeurl@
|
|
55
45
|
2. Click **Download**
|
|
@@ -57,11 +47,11 @@ You only need to do this once.
|
|
|
57
47
|
so save it into the `MICROBIT` drive.
|
|
58
48
|
Otherwise, continue with one of the options in Step 4 below.
|
|
59
49
|
|
|
60
|
-
|
|
50
|
+
### Step 4: Transfer the file to your micro:bit
|
|
61
51
|
|
|
62
52
|
If the file was saved onto your computer, you will need to transfer it to the micro:bit.
|
|
63
53
|
|
|
64
|
-
|
|
54
|
+
#### Manual transfer
|
|
65
55
|
|
|
66
56
|
Your `.hex` file (created in Step 3 above) appears as a download at the bottom of the browser.
|
|
67
57
|
Click on the arrow next to the name of the file and then click **Show in folder**.
|
|
@@ -74,7 +64,7 @@ Alternatively, right-click on the hex file, choose **Send to**, and then **MICRO
|
|
|
74
64
|
|
|
75
65
|

|
|
76
66
|
|
|
77
|
-
|
|
67
|
+
### Step 5: After transferring the file
|
|
78
68
|
|
|
79
69
|
* The LED on the back of your micro:bit flashes during the transfer (which
|
|
80
70
|
should only take a few seconds).
|
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Transferring from Microsoft Edge on Windows
|
|
2
2
|
|
|
3
|
-
How to compile, transfer, and run a program on your micro:bit
|
|
3
|
+
How to compile, transfer, and run a program on your micro:bit with **Microsoft Edge**.
|
|
4
4
|
|
|
5
5
|
While you're writing and testing your programs, you'll mostly be [running them
|
|
6
6
|
in the simulator](/device/simulator), but once you've finished your program you
|
|
7
7
|
can **compile** it and run it on your micro:bit.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Transfer using a WebUSB connection
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
2. Click **Download** to download the `.hex` file
|
|
13
|
-
3. Click the **Save As** button in the bottom bar and save the `.hex` file into the MICROBIT drive
|
|
11
|
+
With Microsoft Edge (version 79 and newer), you can transfer your program to the @boardname@ with a single click. If your browser supports WebUSB, you can use the **one-click download** feature to send your programs to the @boardname@. See the [WebUSB](/device/usb/webusb) page to learn how to pair your @boardname@ with a computer and transfer your programs with a single click.
|
|
14
12
|
|
|
15
|
-
##
|
|
13
|
+
## Downloading your program as file
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
The basic steps are:
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
1. Connect your @boardname@ to your computer with a USB cable (use an A-Male to Micro USB cable)
|
|
18
|
+
2. Click **Download** to download the `.hex` file
|
|
19
|
+
3. Click the **Save As** button in the bottom bar and save the `.hex` file into the MICROBIT drive
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
### Step 1: Connect your micro:bit to your computer
|
|
24
22
|
|
|
25
23
|
First, connect the micro:bit:
|
|
26
24
|
|
|
@@ -34,7 +32,7 @@ it appears as a new drive under Devices.
|
|
|
34
32
|
|
|
35
33
|

|
|
36
34
|
|
|
37
|
-
|
|
35
|
+
### Step 2: Download your program
|
|
38
36
|
|
|
39
37
|
1. Open your project on @homeurl@
|
|
40
38
|
2. Click **Download**
|
package/docs/device/usb.md
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Transferring programs to your @boardname@
|
|
2
2
|
|
|
3
|
-
Most of the time you'll be writing and testing your programs in the [simulator](/device/simulator). Once you've finished your program though, you can **compile** it and run it on your @boardname@. Transferring your program to the @boardname@ is as simple as saving a file to a drive on your computer.
|
|
3
|
+
Most of the time you'll be writing and testing your programs in the [simulator](/device/simulator). Once you've finished your program though, you can **compile** it and run it on your @boardname@. Transferring your program to the @boardname@ is as simple as clicking the **Download** button, or by saving a file to a drive on your computer.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+

|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Transfer using a WebUSB connection
|
|
8
|
+
|
|
9
|
+
With some newer browsers, you can transfer your program to the @boardname@ with a single click. If your browser supports WebUSB, you can use the **one-click download** feature to send your programs to the @boardname@. See the [WebUSB](/device/usb/webusb) page to learn how to pair your @boardname@ with a computer and transfer your programs with a single click.
|
|
10
|
+
|
|
11
|
+
## Downloading your program as file
|
|
12
|
+
|
|
13
|
+
If your browser doesn't support WebUSB or you want to use your computer's file system to transfer your program instead, you can download it to the @boardname@ as a file. When you plug your @boardname@ into USB, a new drive is created with the **@drivename@** label. This is where you'll save your program.
|
|
8
14
|
|
|
9
15
|
The basic steps are:
|
|
10
16
|
|
package/docs/device.md
CHANGED
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
# Device
|
|
2
2
|
|
|
3
|
+
### ~ hint
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
#### Looking to buy a micro:bit?
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
See the [list of resellers](https://microbit.org/resellers).
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
### ~
|
|
9
10
|
|
|
10
11
|
All the bits and pieces that make up the BBC micro:bit
|
|
11
12
|
|
|
12
|
-

|
|
13
14
|
|
|
15
|
+
### ~ hint
|
|
16
|
+
|
|
17
|
+
#### The current version of micro:bit is v2
|
|
18
|
+
|
|
19
|
+
The version of @boardname@ is now currently at **v2**. See the what's new in MakeCode for programming the [@boardname@ v2](/device/v2).
|
|
20
|
+
|
|
21
|
+
### ~
|
|
14
22
|
|
|
15
23
|
## LED Screen and Status LED
|
|
16
24
|
|
|
@@ -27,17 +35,21 @@ https://www.youtube.com/watch?v=qqBmvHD5bCw
|
|
|
27
35
|
|
|
28
36
|
## Buttons
|
|
29
37
|
|
|
30
|
-
Buttons A and B are a form of input. When you press a button, it completes an electrical circuit.
|
|
38
|
+
Buttons **A** and **B** are a form of input. When you press a button, it completes an electrical circuit.
|
|
31
39
|
The micro:bit can detect either of its two buttons being pressed/released and be programmed
|
|
32
40
|
to act on these events.
|
|
33
41
|
|
|
34
|
-
Button R on the back of the micro:bit is a system button. It has different uses.
|
|
35
|
-
When you have downloaded and run your code onto your micro:bit, press Button R to restart and run your program from the beginning.
|
|
42
|
+
Button **R** on the back of the micro:bit is a system button. It has different uses.
|
|
43
|
+
When you have downloaded and run your code onto your micro:bit, press Button **R** to restart and run your program from the beginning.
|
|
36
44
|
|
|
37
45
|
Find out how buttons provide input to the @boardname@ in this video:
|
|
38
46
|
|
|
39
47
|
https://www.youtube.com/watch?v=t_Qujjd_38o
|
|
40
48
|
|
|
49
|
+
## Touch
|
|
50
|
+
|
|
51
|
+
Pins **0**, **1**, **2**, and the board **logo** can work as touch buttons when they are programmed for input.
|
|
52
|
+
|
|
41
53
|
## USB connection
|
|
42
54
|
|
|
43
55
|
When you plug in your micro:bit via [USB](/device/usb), it should appear as a ``MICROBIT`` drive.
|
|
@@ -47,9 +59,9 @@ the micro:bit will appear as a ``MAINTENANCE`` drive instead of ``MICROBIT``. Th
|
|
|
47
59
|
|
|
48
60
|
To continue programming your micro:bit YOU MUST unplug your USB and reconnect it. Check that the drive now shows as ``MICROBIT``.
|
|
49
61
|
|
|
50
|
-
|
|
62
|
+
### ~ hint
|
|
51
63
|
|
|
52
|
-
|
|
64
|
+
#### Open the version file
|
|
53
65
|
|
|
54
66
|
Use with caution!
|
|
55
67
|
If you click on the drive while it shows the ``MAINTENANCE`` label,
|
|
@@ -57,7 +69,7 @@ you can see which version of firmware you have running on your micro:bit.
|
|
|
57
69
|
Firmware on your micro:bit should be up-to-date already.
|
|
58
70
|
You can find the version of firmware in the 'version.txt' file on the micro:bit. See the @boardname@ **[firmware](https://microbit.org/guide/firmware/)** page for more about checking your board's firmware version.
|
|
59
71
|
|
|
60
|
-
|
|
72
|
+
### ~
|
|
61
73
|
|
|
62
74
|
## Compass
|
|
63
75
|
|
|
@@ -79,7 +91,11 @@ https://www.youtube.com/watch?v=byngcwjO51U
|
|
|
79
91
|
## Pins
|
|
80
92
|
|
|
81
93
|
The [pins](/device/pins) can be a form of electrical input or output.
|
|
82
|
-
There are labels for the input/output pins
|
|
94
|
+
There are labels for the input/output pins **0**, **1**, **2**, which you can attach external sensors to such as thermometers or moisture detectors.
|
|
95
|
+
|
|
96
|
+
## Microphone
|
|
97
|
+
|
|
98
|
+
Using the microphone, your programs can detect sounds that are present. You can check for loud or quiet sounds and find out what their sound level is.
|
|
83
99
|
|
|
84
100
|
## Light level
|
|
85
101
|
|
|
@@ -119,7 +135,7 @@ and [click here to read more about the error messages you might get](/device/err
|
|
|
119
135
|
When your micro:bit is connected to your computer with the micro USB, it doesn’t need another power source.
|
|
120
136
|
When your micro:bit isn’t connected to your computer, tablet or mobile, you will need 2 x AAA 1.5 V batteries to power it.
|
|
121
137
|
|
|
122
|
-
The pins labelled 3V and GND are the power supply pins.
|
|
138
|
+
The pins labelled **3V** and **GND** are the power supply pins.
|
|
123
139
|
You can attach an external device such as a motor to these and power it using the battery or USB.
|
|
124
140
|
|
|
125
141
|
## Serial Communication
|
package/docs/docs.md
CHANGED
package/docs/extensions.md
CHANGED
|
@@ -55,6 +55,10 @@ Check out [the accessories pages on microbit.org](https://microbit.org/buy/acces
|
|
|
55
55
|
"name": "Wearables",
|
|
56
56
|
"url": "/extensions#wearables",
|
|
57
57
|
"cardType": "link"
|
|
58
|
+
}, {
|
|
59
|
+
"name": "Utilities",
|
|
60
|
+
"url": "/extensions#utilities",
|
|
61
|
+
"cardType": "link"
|
|
58
62
|
}]
|
|
59
63
|
```
|
|
60
64
|
|
|
@@ -172,6 +176,10 @@ Check out [the accessories pages on microbit.org](https://microbit.org/buy/acces
|
|
|
172
176
|
|
|
173
177
|
```codecard
|
|
174
178
|
[{
|
|
179
|
+
"name": "SGBotic Ultimate SR04",
|
|
180
|
+
"url":"/pkg/SGBotic/pxt-SGBotic-Ultimate-SR04-RGB",
|
|
181
|
+
"cardType": "package"
|
|
182
|
+
}, {
|
|
175
183
|
"name": "TCS3200 Color sensor",
|
|
176
184
|
"url":"/pkg/joy-it/pxt-SEN-Color",
|
|
177
185
|
"cardType": "package"
|
|
@@ -302,6 +310,10 @@ Check out [the accessories pages on microbit.org](https://microbit.org/buy/acces
|
|
|
302
310
|
|
|
303
311
|
```codecard
|
|
304
312
|
[{
|
|
313
|
+
"name": "iClass IoT",
|
|
314
|
+
"url":"/pkg/KelieLeung/pxt-iClassIoT",
|
|
315
|
+
"cardType": "package"
|
|
316
|
+
}, {
|
|
305
317
|
"name": "Kittenbot Wifi",
|
|
306
318
|
"url":"/pkg/KittenBot/pxt-kittenwifi",
|
|
307
319
|
"cardType": "package"
|
|
@@ -344,6 +356,10 @@ Check out [the accessories pages on microbit.org](https://microbit.org/buy/acces
|
|
|
344
356
|
|
|
345
357
|
```codecard
|
|
346
358
|
[{
|
|
359
|
+
"name": "HacKids hack:bit",
|
|
360
|
+
"url": "/pkg/HackidsEdu/pxt-hackbit",
|
|
361
|
+
"cardType": "package"
|
|
362
|
+
}, {
|
|
347
363
|
"name": "KittenBot Sugar",
|
|
348
364
|
"url": "/pkg/KittenBot/pxt-sugar",
|
|
349
365
|
"cardType": "package"
|
|
@@ -376,8 +392,12 @@ Check out [the accessories pages on microbit.org](https://microbit.org/buy/acces
|
|
|
376
392
|
"url":"/pkg/elecfreaks/pxt-PlanetX",
|
|
377
393
|
"cardType": "package"
|
|
378
394
|
}, {
|
|
379
|
-
"name": "Inksmith Climate Action Kit",
|
|
380
|
-
"url":"/pkg/
|
|
395
|
+
"name": "Inksmith Climate Action Kit: Land",
|
|
396
|
+
"url":"/pkg/climate-action-kits/pxt-climate-action-kit-land",
|
|
397
|
+
"cardType": "package"
|
|
398
|
+
}, {
|
|
399
|
+
"name": "Inksmith Climate Action Kit: Energy",
|
|
400
|
+
"url":"/pkg/climate-action-kits/pxt-climate-action-kit-land",
|
|
381
401
|
"cardType": "package"
|
|
382
402
|
}, {
|
|
383
403
|
"name": "Grove inventor kit",
|
|
@@ -453,6 +473,18 @@ Check out [the accessories pages on microbit.org](https://microbit.org/buy/acces
|
|
|
453
473
|
|
|
454
474
|
```codecard
|
|
455
475
|
[{
|
|
476
|
+
"name": "Kitronik :CREATE Simple Servo Control Board",
|
|
477
|
+
"url":"/pkg/KitronikLtd/pxt-kitronik-simple-servo",
|
|
478
|
+
"cardType": "package"
|
|
479
|
+
}, {
|
|
480
|
+
"name": "Kittenbot miniLFR",
|
|
481
|
+
"url":"/pkg/KittenBot/pxt-minilfr",
|
|
482
|
+
"cardType": "package"
|
|
483
|
+
}, {
|
|
484
|
+
"name": "Cytron ZOOM:BIT",
|
|
485
|
+
"url":"/pkg/CytronTechnologies/pxt-zoombit",
|
|
486
|
+
"cardType": "package"
|
|
487
|
+
}, {
|
|
456
488
|
"name": "Kid Spark Spark:bit",
|
|
457
489
|
"url":"/pkg/KidSpark/pxt-sparkbit",
|
|
458
490
|
"cardType": "package"
|
|
@@ -687,6 +719,10 @@ Check out [the accessories pages on microbit.org](https://microbit.org/buy/acces
|
|
|
687
719
|
|
|
688
720
|
```codecard
|
|
689
721
|
[{
|
|
722
|
+
"name": "PT-BOT KidsBIT",
|
|
723
|
+
"url":"/pkg/iBuilds/pxt-PTKidsBIT-IoT",
|
|
724
|
+
"cardType": "package"
|
|
725
|
+
}, {
|
|
690
726
|
"name": "Kitronik Air Quality & Environmental Board",
|
|
691
727
|
"url":"/pkg/KitronikLtd/pxt-kitronik-air-quality",
|
|
692
728
|
"cardType": "package"
|
|
@@ -808,6 +844,34 @@ Check out [the accessories pages on microbit.org](https://microbit.org/buy/acces
|
|
|
808
844
|
## Utilities
|
|
809
845
|
```codecard
|
|
810
846
|
[{
|
|
847
|
+
"name": "Soroban abacus",
|
|
848
|
+
"url":"/pkg/aorczyk/soroban",
|
|
849
|
+
"cardType": "package"
|
|
850
|
+
}, {
|
|
851
|
+
"name": "Lego PF recorder",
|
|
852
|
+
"url":"/pkg/aorczyk/pf-recorder",
|
|
853
|
+
"cardType": "package"
|
|
854
|
+
}, {
|
|
855
|
+
"name": "Lego PF transmitter",
|
|
856
|
+
"url":"/pkg/aorczyk/lego-pf-transmitter",
|
|
857
|
+
"cardType": "package"
|
|
858
|
+
}, {
|
|
859
|
+
"name": "Lego PF receiver",
|
|
860
|
+
"url":"/pkg/aorczyk/lego-pf-receiver",
|
|
861
|
+
"cardType": "package"
|
|
862
|
+
}, {
|
|
863
|
+
"name": "Kodely dot",
|
|
864
|
+
"url":"/pkg/Kodely-io/dot",
|
|
865
|
+
"cardType": "package"
|
|
866
|
+
}, {
|
|
867
|
+
"name": "Wait until...",
|
|
868
|
+
"url":"/pkg/TeacherPinky/Wait-Until-Blocks",
|
|
869
|
+
"cardType": "package"
|
|
870
|
+
}, {
|
|
871
|
+
"name": "micro:bit power saving",
|
|
872
|
+
"url":"/pkg/microbit-foundation/pxt-microbit-v2-power",
|
|
873
|
+
"cardType": "package"
|
|
874
|
+
}, {
|
|
811
875
|
"name": "DS3231 Real Time Clock",
|
|
812
876
|
"url":"/pkg/AlexandreFrolov/DS3231",
|
|
813
877
|
"cardType": "package"
|
|
@@ -6,27 +6,31 @@ Have you heard about BitCoin and all those new Crypto currencies? Well micro:bit
|
|
|
6
6
|
|
|
7
7
|
## ~
|
|
8
8
|
|
|
9
|
+

|
|
10
|
+
|
|
9
11
|
## How does a @boardname@ make coins?
|
|
10
12
|
|
|
11
13
|
|
|
12
|
-
Each @boardname@ contains a **blockchain**, a sequence of **blocks
|
|
13
|
-
the @boardname@ and, if they are in luck, their coin added to the chain as a new block!
|
|
14
|
+
Each @boardname@ contains a **blockchain**, a sequence of **blocks** (in this case, chunks of information not blocks of a program), that is public and can't be modified. Each block represents a **coin**. The process of making coins is called _mining_. To mine new coins, the user shakes
|
|
15
|
+
the @boardname@ and, if they are in luck, their coin is added to the chain as a new block!
|
|
14
16
|
Once the block is added, it is broadcasted to the other @boardname@ (the block chain is public and can't be modified so it's ok to share it). Other @boardname@s receive the block, validate the transaction and update their block chain as needed.
|
|
15
17
|
|
|
16
|
-
Pressing ``A`` shows the number of block you added to the chain, that's your score.
|
|
17
|
-
Pressing ``B`` shows you the length of the chain.
|
|
18
|
-
|
|
19
|
-
Happy mining!
|
|
20
|
-
|
|
21
18
|
## Coins, blocks, chains
|
|
22
19
|
|
|
23
20
|
A _blockchain_ is a list of _blocks_ that record transactions of a crypto-currency like BitCoin. A block might contain information like the time it was created (mined) and who mined it. The most important part of the block is it's _hash_. This is a special number made from the information in the last block of the block list combined with the hash number of previous block in the list. The new block contains information for the current transaction and this new hash number. The new block is added to the list of previous blocks. This list is then transmitted to the crypto currency network. It's really hard (like impossible) to tamper or forge a hash which allows the blockchain to be transmitted publicly.
|
|
24
21
|
|
|
22
|
+
## Start mining
|
|
23
|
+
|
|
24
|
+
Pressing ``A`` shows the number of blocks you added to the chain, that's your score.
|
|
25
|
+
Pressing ``B`` shows you the length of the chain.
|
|
26
|
+
|
|
27
|
+
Happy mining!
|
|
28
|
+
|
|
25
29
|
### ~ hint
|
|
26
30
|
|
|
27
31
|
#### Secure your coins
|
|
28
32
|
|
|
29
|
-
Build yourself a [@boardname@ wallet](/projects/wallet) to hold your coins!
|
|
33
|
+
Keep your coins safe. Build yourself a [@boardname@ wallet](/projects/wallet) to hold your coins!
|
|
30
34
|
|
|
31
35
|
### ~
|
|
32
36
|
|
|
@@ -256,10 +256,10 @@ Remember to turn your sound on!
|
|
|
256
256
|
|
|
257
257
|
---
|
|
258
258
|
|
|
259
|
-
► Touch the gold logo at the top of your @boardname@
|
|
259
|
+
► Touch the gold **micro:bit logo** at the top of your @boardname@ on the simulator. You'll notice that a second @boardname@ appears.
|
|
260
260
|
💡 If your screen is too small, you might not be able to see it.
|
|
261
261
|
|
|
262
|
-
► Touch the
|
|
262
|
+
► Touch the logo again to send messages to Sky 🐖
|
|
263
263
|
**Press** to send a dot.
|
|
264
264
|
**Long press** (count to 3!) to send a dash.
|
|
265
265
|
|
|
@@ -146,7 +146,7 @@ Check out the simulator and make sure your speakers are on 🔊
|
|
|
146
146
|
|
|
147
147
|
Play with Cyrus to see how they react 🐹
|
|
148
148
|
**Click on the SHAKE button** to shake Cyrus.
|
|
149
|
-
**Touch the gold logo at the top**
|
|
149
|
+
**Touch the gold logo at the top** to tickle Cyrus.
|
|
150
150
|
|
|
151
151
|
If you have a new @boardname@ (the one with the **shiny gold** logo at the top), download this code and try it out!
|
|
152
152
|
|
|
@@ -18,10 +18,18 @@ In addition to a [number](types/number), [string](/types/string), or name-value
|
|
|
18
18
|
## Returns
|
|
19
19
|
|
|
20
20
|
* a [number](/types/number) that is the property selected in the **type** parameter:
|
|
21
|
-
>* ``signal strength``: the value ranges from `-128` to `-
|
|
21
|
+
>* ``signal strength``: the value ranges from `-128` up to `-28` (`-128` means a weak signal and `-28` means a strong one.)
|
|
22
22
|
>* ``serial number``: the value is the serial number of the board sending the packet.
|
|
23
23
|
>* ``time``: the value is the system time, in microseconds, of the sender at the time when the packet was sent.
|
|
24
24
|
|
|
25
|
+
### ~ hint
|
|
26
|
+
|
|
27
|
+
#### Signal strength and board version
|
|
28
|
+
|
|
29
|
+
Measurement of the received signal strength is dependent on what version of @boardname@ you have. The @boardname@ boards prior to v2 can typically measure a signal strength up to `-42` dBm. Now, v2 boards will measure a signal strength up to `-28` dBm (typical).
|
|
30
|
+
|
|
31
|
+
### ~
|
|
32
|
+
|
|
25
33
|
## Example
|
|
26
34
|
|
|
27
35
|
This program uses the signal strength from received packets to graph the
|
|
@@ -6,29 +6,35 @@ Find how strong the radio signal is.
|
|
|
6
6
|
radio.receivedSignalStrength();
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### ~ hint
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
#### Deprecated
|
|
12
12
|
|
|
13
13
|
This API has been deprecated! Use [received packet](/reference/radio/received-packet) instead.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
### ~
|
|
16
16
|
|
|
17
|
-
Find how strong the ``radio`` signal is, from `-128` to `-
|
|
18
|
-
(`-128` means a weak signal and `-
|
|
17
|
+
Find how strong the ``radio`` signal is, from `-128` to `-28`.
|
|
18
|
+
(`-128` means a weak signal and `-28` means a strong one.)
|
|
19
19
|
|
|
20
20
|
The @boardname@ finds the signal strength by checking how strong it was
|
|
21
21
|
the last time it ran the
|
|
22
22
|
[on received number](/reference/radio/on-received-number) function. That means
|
|
23
23
|
it needs to run **receive number** first.
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
25
|
## Returns
|
|
28
26
|
|
|
29
|
-
* a [number](/types/number) between `-128` and `-
|
|
27
|
+
* a [number](/types/number) between `-128` and `-28` that means
|
|
30
28
|
how strong the signal is.
|
|
31
29
|
|
|
30
|
+
### ~ hint
|
|
31
|
+
|
|
32
|
+
#### Signal strength and board version
|
|
33
|
+
|
|
34
|
+
Measurement of the received signal strength is dependent on what version of @boardname@ you have. The @boardname@ boards prior to v2 can typically measure a signal strength up to `-42` dBm. Now, v2 boards will measure a signal strength up to `-28` dBm (typical).
|
|
35
|
+
|
|
36
|
+
### ~
|
|
37
|
+
|
|
32
38
|
## Simulator
|
|
33
39
|
|
|
34
40
|
This function only works on the @boardname@, not in browsers.
|
|
@@ -49,7 +55,8 @@ basic.forever(() => {
|
|
|
49
55
|
|
|
50
56
|
## See also
|
|
51
57
|
|
|
52
|
-
[on received number](/reference/radio/on-received-number), [send number](/reference/radio/send-number),
|
|
58
|
+
[on received number](/reference/radio/on-received-number), [send number](/reference/radio/send-number),
|
|
59
|
+
[on data received](/reference/radio/on-data-received), [received packet](/reference/received-packet)
|
|
53
60
|
|
|
54
61
|
```package
|
|
55
62
|
radio
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pxt-microbit",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.10",
|
|
4
4
|
"description": "micro:bit target for Microsoft MakeCode (PXT)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"JavaScript",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"typescript": "4.2.3"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"pxt-common-packages": "9.
|
|
48
|
-
"pxt-core": "7.
|
|
47
|
+
"pxt-common-packages": "9.4.3",
|
|
48
|
+
"pxt-core": "7.4.12"
|
|
49
49
|
}
|
|
50
50
|
}
|
package/pxtarget.json
CHANGED
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"codalTarget": {
|
|
165
165
|
"name": "codal-microbit-v2",
|
|
166
166
|
"url": "https://github.com/lancaster-university/codal-microbit-v2",
|
|
167
|
-
"branch": "v0.2.
|
|
167
|
+
"branch": "v0.2.34-RC1",
|
|
168
168
|
"type": "git"
|
|
169
169
|
},
|
|
170
170
|
"codalBinary": "MICROBIT",
|
|
@@ -522,6 +522,7 @@
|
|
|
522
522
|
"ar",
|
|
523
523
|
"bg",
|
|
524
524
|
"cs",
|
|
525
|
+
"cy",
|
|
525
526
|
"da",
|
|
526
527
|
"de",
|
|
527
528
|
"el",
|