Compare commits
453 Commits
Author | SHA1 | Date | |
---|---|---|---|
ce24e9d923 | |||
7ee5b4112b | |||
d903901de2 | |||
c1025b8658 | |||
cdb9682a8b | |||
9d589971f5 | |||
c6807d67d8 | |||
05ff9282ac | |||
2825d09eae | |||
15d4a594ae | |||
a0b426bdf0 | |||
580f1bf24e | |||
29cc6eaded | |||
6671d1864c | |||
42d21dea28 | |||
c4e427c090 | |||
d01ca8d565 | |||
9c3236de80 | |||
51e64bd82d | |||
572b4a74e4 | |||
9774c9306a | |||
1e2066726a | |||
0b144539f3 | |||
3a8bbfbd91 | |||
0b457d6a50 | |||
b6b18b7ceb | |||
6de8e604f7 | |||
4f960f5585 | |||
5e62d5c30d | |||
e701d83dc5 | |||
f666d3375e | |||
4aa2d129e9 | |||
09f4001c7a | |||
eae2f0436d | |||
287c9da3bd | |||
056ec1bc96 | |||
16439bfca3 | |||
7117ba771e | |||
633522c800 | |||
3f94033c7d | |||
1bc00f476c | |||
0269ffa5ae | |||
981910fb0a | |||
baa9a262fb | |||
fe1de4a423 | |||
8537061e79 | |||
c64225982e | |||
f6b7467324 | |||
36755400fd | |||
29eef560b0 | |||
90e191c4ca | |||
efd310f0b4 | |||
0a5c2e4df9 | |||
1d6eaf0370 | |||
b4b789422e | |||
cf982d7c52 | |||
2dafe5d253 | |||
63422bf696 | |||
56dc8571b7 | |||
d9190369b7 | |||
4cf7ec2da1 | |||
4b8e9f5715 | |||
ea4bc7f4e8 | |||
7aa136d01c | |||
4eeae7e239 | |||
11b6ba0862 | |||
349a385f97 | |||
48afb52ef1 | |||
e5dc046fcc | |||
7f7aa1c60b | |||
584aaf8c6d | |||
029b5cda2b | |||
ed2f6d05ad | |||
26e20d75a4 | |||
31f5db32d1 | |||
107fe2aefa | |||
171f578b0b | |||
90756557f2 | |||
1e89d142ec | |||
002f08ca37 | |||
054501ace0 | |||
0e99bf0d9e | |||
69bf34f773 | |||
980fbc9c1e | |||
dab48cf42d | |||
652abe0892 | |||
781472e7ce | |||
1e4197b4fa | |||
6ba50b6c17 | |||
ab5b6baf46 | |||
8ec20b87d7 | |||
dc3f6cf885 | |||
3a6e132c7f | |||
3533e57cc3 | |||
c03fac2162 | |||
2138725a44 | |||
e10bb1ce1d | |||
3bb03dcc1d | |||
a45bf54cff | |||
75e53ddd61 | |||
0590e74cc0 | |||
76edc1290c | |||
3b66827d8a | |||
83bd1ed3e1 | |||
41c7e88928 | |||
19f757e159 | |||
fb222fd732 | |||
07b07a5a3f | |||
f46c23fb92 | |||
937bcc61ad | |||
7d61e5fe7c | |||
773dae8fc8 | |||
511f399d90 | |||
633ce491af | |||
8193c4790f | |||
21e64d01e3 | |||
641d8fcb9b | |||
84736554b9 | |||
e2c7579dd4 | |||
2e9ad0ad92 | |||
68cbb963fc | |||
1c1e960252 | |||
077ecaab87 | |||
3111960ecf | |||
2f203d68d1 | |||
aeb3b6f864 | |||
e0cf776591 | |||
da38ca2234 | |||
682ae92a08 | |||
ed8aaf8bda | |||
f5f36d9cca | |||
19775e307a | |||
89406330cf | |||
9bc1e38345 | |||
85d5073fbb | |||
d76d92e041 | |||
6799721c9b | |||
c191cdf7ec | |||
16cf45aa7c | |||
94e72784b9 | |||
4963bf776a | |||
237c5c019b | |||
cf37baa337 | |||
67eb1d3b19 | |||
6a13b9737e | |||
1ec7e67fb0 | |||
c3253e24fc | |||
326cd7d0c3 | |||
804cc8c091 | |||
64ff568597 | |||
4196ba6632 | |||
26626d2a2a | |||
b70a2fc096 | |||
9791a02c7e | |||
89ceeefc32 | |||
91235d2377 | |||
a805d7b8a8 | |||
89fdbcdc4f | |||
7303a1235f | |||
38ee5efdd4 | |||
474d5bb762 | |||
f045942297 | |||
92d1d2ffc3 | |||
82c9af836f | |||
da90401fe6 | |||
315a12dd8b | |||
7936517a03 | |||
ee60396e35 | |||
72ec2d617e | |||
4d9ae63831 | |||
3eab21cff1 | |||
5a37385d14 | |||
9fa412ff6f | |||
307d25ce7d | |||
ec48474231 | |||
3f7fbb70ba | |||
524bcee5ed | |||
20189a709b | |||
111b321722 | |||
b8fe8f9294 | |||
83cfd5738f | |||
83b8ba1102 | |||
2169cb044c | |||
7b478c4c38 | |||
a68e1a611d | |||
b3b2944b46 | |||
76adc3c00a | |||
c809ee4fdf | |||
8e67e69602 | |||
c6e38bd7a9 | |||
c60a4cb359 | |||
0b508e37b1 | |||
e1a3aca9f8 | |||
bbe93ae9a2 | |||
6fd18b4f4c | |||
b511537348 | |||
749ba6b984 | |||
298382c19f | |||
ef849b645b | |||
78e8c9f176 | |||
57aadd0b27 | |||
e60c163b08 | |||
95e4c609a4 | |||
e571bec213 | |||
1ad90eda81 | |||
0c604498d3 | |||
a8ec408f96 | |||
40fe1b4616 | |||
30fd978064 | |||
0c26d74c05 | |||
0e4d555eb2 | |||
34c608ba75 | |||
007cf55d7f | |||
d3b10aa89e | |||
5dc99388b3 | |||
cbe25da154 | |||
e52da19925 | |||
d558f70118 | |||
8fca50e907 | |||
8c4abe979b | |||
f2e1bc0168 | |||
5c818980ed | |||
172aa6a4d7 | |||
d4fa9dab1b | |||
955b67b6b8 | |||
abf7d48bfd | |||
96d5dc2064 | |||
e0735188fa | |||
c5b9d0876a | |||
4716d06fe6 | |||
a2aaed2923 | |||
38aa6439a2 | |||
a4ba24d6ef | |||
d6d64f3edb | |||
f078d59bb5 | |||
dffbe5dcb4 | |||
d0821710f6 | |||
2291f8b899 | |||
2bc5db517e | |||
f191d9033d | |||
739be09ac9 | |||
7d912110f4 | |||
5877adc595 | |||
0380f4f0d0 | |||
ae882a0107 | |||
367e80cb77 | |||
c3865afe8c | |||
6b9b636ae6 | |||
9a20841c6e | |||
9e95f1a442 | |||
c6ce36065e | |||
13a4b03e9a | |||
4b21d51769 | |||
e7aed1d162 | |||
27f28032fb | |||
2dc9cffa99 | |||
376512f704 | |||
3813fba899 | |||
60e71e3e35 | |||
b003d89061 | |||
84816f4f39 | |||
2b095dfe21 | |||
2e3cdee2a2 | |||
ec404e5887 | |||
ba69563bf4 | |||
a5eb93d3e1 | |||
224cb446e4 | |||
62b3d7504f | |||
cc6594921f | |||
bf1269b82e | |||
c937cba17e | |||
79c89b832a | |||
0765159633 | |||
b14a025b14 | |||
3ccc8b7db3 | |||
7c8bae3cf0 | |||
000f784011 | |||
d85446d34d | |||
74f8cc7b2e | |||
cf778686c3 | |||
99bee9e796 | |||
cb61c1a712 | |||
fdf3d1b66c | |||
25ddbf9ffd | |||
578f971d26 | |||
06641d4e5c | |||
a705c4882b | |||
b36ffaf29c | |||
bff088fced | |||
784565b24e | |||
b59e4effff | |||
2db2741b08 | |||
66a46e4046 | |||
2f11d603e7 | |||
8089fe262e | |||
7d7d13f3ab | |||
bd1536132d | |||
fcefe1ed36 | |||
748581d76d | |||
f21f9e6e88 | |||
3f1817037e | |||
4bcba9b9e5 | |||
b3b836d77c | |||
a2cb2c2ed0 | |||
44e2ffc874 | |||
64b68c7439 | |||
198b24c6a4 | |||
a90a43d719 | |||
f9d138cb42 | |||
f2c87db3ed | |||
13089f92a8 | |||
0b1b312e76 | |||
958ff2ef40 | |||
eaf982903f | |||
8c15af11db | |||
35e414764f | |||
333659c320 | |||
8c161583eb | |||
b20e185bf2 | |||
299b595581 | |||
65433216e6 | |||
cbfbcd080a | |||
9c389e290e | |||
4dd26f854c | |||
66444b886c | |||
9ea2081e89 | |||
808e5fa17b | |||
20d967a230 | |||
c1e5419e45 | |||
0c01fdb30b | |||
75c2ccdea9 | |||
2dff5c1140 | |||
0ab28076f3 | |||
27f5411404 | |||
f53eab0539 | |||
8030f27fb7 | |||
33c4b2b9b7 | |||
2463faf8d6 | |||
445fe12629 | |||
ddd6e90c6d | |||
fd14ba6ff1 | |||
28a8f21d40 | |||
3f626105cd | |||
d9ff9c4800 | |||
31998fec05 | |||
342aa3ca32 | |||
9b599b6242 | |||
e5e63c548f | |||
f3eb9a988f | |||
e7e2ff7752 | |||
f10ac93268 | |||
47f46553e0 | |||
3158e95cde | |||
854029fe33 | |||
1b379bddd0 | |||
9495da9a53 | |||
128b3f2f51 | |||
a331a017b8 | |||
5cce86ec7e | |||
65e01dc0df | |||
7aeb216462 | |||
543659b0e8 | |||
a2b5ff68af | |||
b968d3b1de | |||
4dbebe3e15 | |||
3b95fede48 | |||
971faed80a | |||
02a58caf7a | |||
912e2e6159 | |||
e834ae0656 | |||
175923fcb9 | |||
42ebdde3df | |||
20c63359af | |||
841f3dc7d6 | |||
f7377f6a21 | |||
1104ab5b33 | |||
e2fe660012 | |||
7d4b800637 | |||
746728759d | |||
3d3b9e2718 | |||
0459cd693d | |||
9c43714126 | |||
9bf7459628 | |||
b52432e103 | |||
3ac0a060dd | |||
85ebbb28e3 | |||
f69db3faf7 | |||
4fc514e643 | |||
7c2512e56b | |||
d9eebf4a9f | |||
8af383ec56 | |||
573d7aff40 | |||
f73274803c | |||
63556ef14a | |||
9607183587 | |||
4cca961e52 | |||
c2a1668d55 | |||
7102eddc0b | |||
b34884fe00 | |||
e768a4dc97 | |||
8b1b1bb869 | |||
57deb1749f | |||
fb82b94f69 | |||
d321170da9 | |||
dff4f3adb3 | |||
5d8a1b69f6 | |||
0b0c2c9466 | |||
9319f10430 | |||
c4787e1028 | |||
cb280af783 | |||
4201cb3070 | |||
ec7bade8f4 | |||
d738d8bbf5 | |||
a8b1e0bc04 | |||
114b7958bc | |||
f45ae5950c | |||
4cdfaf06c0 | |||
d48404eb37 | |||
f4ac599ec2 | |||
a783cdda92 | |||
5900c8c9f5 | |||
3911c6522d | |||
00cdb6f9f5 | |||
df14445320 | |||
553b692a9a | |||
7f2fd0dd09 | |||
ae6917c7b3 | |||
5c1d9a342b | |||
d41724d239 | |||
d6a006d18f | |||
cace68acf4 | |||
68ef7c2fc2 | |||
4c502f0825 | |||
a2f1cef9ae | |||
e857a94e04 | |||
42a93a1682 | |||
e983c76e2f | |||
ced4565d5c | |||
2475058b94 | |||
c6ee0db81c | |||
1b96e6332a | |||
1ceec1d3b4 | |||
2e9ddb48df | |||
2296220ad7 | |||
22864bd26a | |||
574a9e01d5 | |||
00278036a4 | |||
4b583e221b | |||
c88645d0cd | |||
14e8eabd25 | |||
5fab789763 | |||
33eca3c507 | |||
9ccfcf19d9 |
7
.gitignore
vendored
@ -16,6 +16,7 @@ clients/win10/*.opendb
|
||||
clients/**/bin/**
|
||||
clients/**/obj/**
|
||||
clients/electron/projects
|
||||
hexcache
|
||||
|
||||
*.user
|
||||
*.sw?
|
||||
@ -24,3 +25,9 @@ clients/electron/projects
|
||||
*.db
|
||||
*.suo
|
||||
*.log
|
||||
|
||||
.DS_Store
|
||||
.idea
|
||||
*.iml
|
||||
.vscode/.BROWSE.VC.DB-shm
|
||||
.vscode/.BROWSE.VC.DB-wal
|
||||
|
@ -3,17 +3,11 @@ node_js:
|
||||
- "5.7.0"
|
||||
script:
|
||||
- "node node_modules/pxt-core/built/pxt.js travis"
|
||||
- "(cd libs/lang-test0; node ../../node_modules/pxt-core/built/pxt.js run)"
|
||||
- "(cd libs/lang-test1; node ../../node_modules/pxt-core/built/pxt.js run)"
|
||||
- "(cd libs/lang-test0; node ../../node_modules/pxt-core/built/pxt.js test)"
|
||||
- "(cd libs/lang-test1; node ../../node_modules/pxt-core/built/pxt.js test)"
|
||||
- "node node_modules/pxt-core/built/pxt.js testdir tests"
|
||||
- "node node_modules/pxt-core/built/pxt.js uploaddoc"
|
||||
- "(cd libs/hello; node ../../node_modules/pxt-core/built/pxt.js testconv https://az851932.vo.msecnd.net/files/td-converter-tests-v1.json)"
|
||||
sudo: false
|
||||
notifications:
|
||||
email:
|
||||
- touchdevelop-build@microsoft.com
|
||||
- kindscript@microsoft.com
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
|
20
README.md
@ -1,11 +1,11 @@
|
||||
# micro:bit target for PXT
|
||||
# Calliope target for PXT
|
||||
|
||||
This target allow to program a [BBC micro:bit](https://www.microbit.co.uk/) using
|
||||
This target allow to program a [Calliope](http://calliope.cc/) using
|
||||
PXT ([Microsoft Programming Experience Toolkit](https://github.com/Microsoft/pxt)).
|
||||
|
||||
* [Try it live](https://pxt.microbit.org)
|
||||
[](https://travis-ci.org/Microsoft/pxt-calliope)
|
||||
|
||||
[](https://travis-ci.org/Microsoft/pxt-microbit)
|
||||

|
||||
|
||||
## Local server
|
||||
|
||||
@ -15,11 +15,11 @@ The local server allows to run the editor and the documentation from your comput
|
||||
|
||||
The following commands are a 1-time setup after synching the repo on your machine.
|
||||
|
||||
* if not yet installed, install [Node.js 4.4.5 or higher](https://nodejs.org/en/download/)
|
||||
* See requirements for [pxt](https://github.com/Microsoft/pxt)
|
||||
* [clone this repo](https://help.github.com/articles/cloning-a-repository/) to your computer and go in the project folder
|
||||
```
|
||||
git clone https://github.com/microsoft/pxt-microbit
|
||||
cd pxt-microbit
|
||||
git clone https://github.com/microsoft/pxt-calliope
|
||||
cd pxt-calliope
|
||||
```
|
||||
* install the PXT command line (add ``sudo`` for Mac/Linux shells).
|
||||
```
|
||||
@ -32,14 +32,15 @@ npm install
|
||||
|
||||
### Running
|
||||
|
||||
Run this command to open a local web server (add ``sudo`` for Mac/Linux shells)
|
||||
Run this command to open a local web server (add ``sudo`` for Mac/Linux shells).
|
||||
```
|
||||
pxt serve
|
||||
```
|
||||
If the local server opens in the wrong browser, make sure to copy the URL containing the local token.
|
||||
Otherwise, the editor will not be able to load the projects.
|
||||
|
||||
If you need modify the `.cpp` files, turn on yotta compilation with the ``-yt`` flag (add ``sudo`` for Mac/Linux shells):
|
||||
If you need modify the `.cpp` files, turn on yotta compilation with the ``-yt`` flag (add ``sudo`` for Mac/Linux shells). On Windows, you must be running
|
||||
from the ``Run Yotta`` command prompt.
|
||||
```
|
||||
pxt serve -yt
|
||||
```
|
||||
@ -61,7 +62,6 @@ The build automatically runs the following:
|
||||
* `pxt run` in `libs/lang-test*` - this will run the test in command line runner;
|
||||
there is a number of asserts in both of these
|
||||
* `pxt testdir` in `tests` - this makes sure all the files compile and generates .hex files
|
||||
* run the TD->TS converter on a number of test scripts from `microbit.co.uk` and make sure the results compile
|
||||
|
||||
To test something on the device:
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
///<reference path='typings/browser.d.ts'/>
|
||||
var connections = [];
|
||||
// A list of "ports", i.e. connected clients (such as web pages). Multiple web
|
||||
// pages can connect to our service: they all receive the same data.
|
||||
@ -41,7 +40,7 @@ function findNewDevices() {
|
||||
function main() {
|
||||
// Register new clients in the [ports] global variable.
|
||||
chrome.runtime.onConnectExternal.addListener(function (port) {
|
||||
if (/^(micro:bit|touchdevelop|yelm|pxt|codemicrobit|codethemicrobit)$/.test(port.name)) {
|
||||
if (/^(micro:bit|touchdevelop|yelm|pxt|codemicrobit|codethemicrobit|pxt.microbit.org)$/.test(port.name)) {
|
||||
ports.push(port);
|
||||
port.onDisconnect.addListener(function () {
|
||||
ports = ports.filter(function (x) { return x != port; });
|
||||
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.6 KiB |
@ -6,13 +6,13 @@
|
||||
},
|
||||
|
||||
"manifest_version": 2,
|
||||
"name": "code the micro:bit",
|
||||
"version": "0.6.0",
|
||||
"name": "pxt.microbit.org",
|
||||
"version": "0.7.0",
|
||||
"author": "Microsoft Corporation",
|
||||
"short_name": "code the micro:bit",
|
||||
"short_name": "pxt.microbit.org",
|
||||
|
||||
"description": "Extension for https://codethemicrobit.com.",
|
||||
"homepage_url": "https://codethemicrobit.com",
|
||||
"description": "Extension for https://pxt.microbit.org.",
|
||||
"homepage_url": "https://pxt.microbit.org",
|
||||
"offline_enabled": "true",
|
||||
"icons": {
|
||||
"48": "logo48.png",
|
||||
@ -25,6 +25,6 @@
|
||||
],
|
||||
|
||||
"externally_connectable": {
|
||||
"matches": [ "*://localhost/*", "https://codethemicrobit.com/*", "https://*.codethemicrobit.com/*" ]
|
||||
"matches": [ "*://localhost/*", "https://pxt.microbit.org/*", "https://*.microbit.org/*" ]
|
||||
}
|
||||
}
|
||||
|
@ -124,7 +124,7 @@
|
||||
}
|
||||
|
||||
- (void)launchEditor:(id)sender {
|
||||
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"https://codethemicrobit.com/"]];
|
||||
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"https://pxt.microbit.org/"]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -1,48 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25123.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "m.pxt.io", "app\m.pxt.io.jsproj", "{39122940-AB16-4CD4-A0CE-79A3EB863ECF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM = Release|ARM
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|x64.Build.0 = Debug|x64
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|x64.Deploy.0 = Debug|x64
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|x86.Build.0 = Debug|x86
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|x86.Deploy.0 = Debug|x86
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|ARM.Build.0 = Release|ARM
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|x64.ActiveCfg = Release|x64
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|x64.Build.0 = Release|x64
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|x64.Deploy.0 = Release|x64
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|x86.ActiveCfg = Release|x86
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|x86.Build.0 = Release|x86
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|x86.Deploy.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -1 +0,0 @@
|
||||
MainPackage=C:\gh\pxt-microbit\win10\app\bin\Debug\m.pxt.io_0.1.4.0_AnyCPU_Debug.appx
|
@ -1,85 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|AnyCPU">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>AnyCPU</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x86">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|AnyCPU">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>AnyCPU</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x86">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>39122940-ab16-4cd4-a0ce-79a3eb863ecf</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0'">
|
||||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).Default.props" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).props" />
|
||||
<PropertyGroup>
|
||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
||||
<TargetPlatformVersion>10.0.10586.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
|
||||
<MinimumVisualStudioVersion>$(VersionNumberMajor).$(VersionNumberMinor)</MinimumVisualStudioVersion>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<PackageCertificateKeyFile>pxtwinapp_TemporaryKey.pfx</PackageCertificateKeyFile>
|
||||
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
|
||||
<AppxBundle>Always</AppxBundle>
|
||||
<AppxBundlePlatforms>neutral</AppxBundlePlatforms>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="package.appxmanifest">
|
||||
<SubType>Designer</SubType>
|
||||
</AppxManifest>
|
||||
<Content Include="msapp-error.js" />
|
||||
<Content Include="msapp-error.css" />
|
||||
<Content Include="msapp-error.html" />
|
||||
<Content Include="images\LockScreenLogo.scale-200.png" />
|
||||
<Content Include="images\SplashScreen.scale-200.png" />
|
||||
<Content Include="images\Square150x150Logo.scale-200.png" />
|
||||
<Content Include="images\Square44x44Logo.scale-200.png" />
|
||||
<Content Include="images\Square44x44Logo.targetsize-24_altform-unplated.png" />
|
||||
<Content Include="images\StoreLogo.png" />
|
||||
<Content Include="images\Wide310x150Logo.scale-200.png" />
|
||||
<None Include="pxtwinapp_TemporaryKey.pfx" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below then uncomment
|
||||
that target and the DisableFastUpToDateCheck PropertyGroup.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
<PropertyGroup>
|
||||
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
|
||||
</PropertyGroup>
|
||||
-->
|
||||
</Project>
|
@ -1,48 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25123.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "codethemicrobitapp", "codethemicrobitapp.jsproj", "{39122940-AB16-4CD4-A0CE-79A3EB863ECF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM = Release|ARM
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|x64.Build.0 = Debug|x64
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|x64.Deploy.0 = Debug|x64
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|x86.Build.0 = Debug|x86
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Debug|x86.Deploy.0 = Debug|x86
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|ARM.Build.0 = Release|ARM
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|x64.ActiveCfg = Release|x64
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|x64.Build.0 = Release|x64
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|x64.Deploy.0 = Release|x64
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|x86.ActiveCfg = Release|x86
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|x86.Build.0 = Release|x86
|
||||
{39122940-AB16-4CD4-A0CE-79A3EB863ECF}.Release|x86.Deploy.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 8.4 KiB |
@ -1,17 +0,0 @@
|
||||
body {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.tip {
|
||||
font-size: 90%;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.paramName {
|
||||
font-size: 100%;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.paramValue {
|
||||
color: black;
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Navigation Error</title>
|
||||
<link href="msapp-error.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="msapp-error.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Navigation Error</h1>
|
||||
<div id="failureUrl" class="param">
|
||||
<span>-</span><span class="paramName">failureUrl</span><span>=</span>
|
||||
<span id="failureUrlValue" class="paramValue"></span>
|
||||
<span class="tip">(indicates the url where the error occurred)</span><br/>
|
||||
</div><br/>
|
||||
<div id="httpStatus" class="param">
|
||||
<span>-</span><span class="paramName">httpStatus</span><span>=</span>
|
||||
<span id="httpStatusValue" class="paramValue"></span>
|
||||
<span class="tip">(available when the error has an http status code)</span><br/>
|
||||
</div><br/>
|
||||
<div id="failureName">
|
||||
<span>-</span><span class="paramName">failureName</span><span>=</span>
|
||||
<span id="failureNameValue" class="paramValue"></span>
|
||||
<span class="tip">(available only when the error does not have a http status code)</span><br/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,22 +0,0 @@
|
||||
(function () {
|
||||
var validParameterNames = [ "httpStatus", "failureName", "failureUrl" ];
|
||||
|
||||
function parseQueryParameters() {
|
||||
var query = location.search.slice(1);
|
||||
return query.split("&").reduce(function (queryParameters, rawPair) {
|
||||
var pair = rawPair.split("=").map(decodeURIComponent);
|
||||
queryParameters[pair[0]] = pair[1];
|
||||
return queryParameters;
|
||||
}, {});
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
var queryParameters = parseQueryParameters();
|
||||
validParameterNames.forEach(function (parameterName) {
|
||||
var parameterValue = queryParameters[parameterName] || "N/A";
|
||||
document.getElementById(parameterName + "Value").textContent = parameterValue;
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", initialize);
|
||||
}());
|
@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
|
||||
<Identity Name="39122940-ab16-4cd4-a0ce-79a3eb863ecf" Version="0.1.5.0" Publisher="CN=jhalleux" />
|
||||
<mp:PhoneIdentity PhoneProductId="39122940-ab16-4cd4-a0ce-79a3eb863ecf" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
|
||||
<Properties>
|
||||
<DisplayName>codethemicrobit</DisplayName>
|
||||
<PublisherDisplayName>Microsoft</PublisherDisplayName>
|
||||
<Logo>images\storelogo.png</Logo>
|
||||
</Properties>
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
|
||||
</Dependencies>
|
||||
<Resources>
|
||||
<Resource Language="x-generate" />
|
||||
</Resources>
|
||||
<Applications>
|
||||
<Application Id="App" StartPage="https://codethemicrobit.com">
|
||||
<uap:ApplicationContentUriRules>
|
||||
<uap:Rule Match="https://m.pxt.io/" Type="include" WindowsRuntimeAccess="all" />
|
||||
<uap:Rule Match="https://codemicrobit.com/" Type="include" WindowsRuntimeAccess="all" />
|
||||
<uap:Rule Match="https://codethemicrobit.com/" Type="include" WindowsRuntimeAccess="all" />
|
||||
</uap:ApplicationContentUriRules>
|
||||
<uap:VisualElements DisplayName="code the micro:bit" Description="A code editor for the BBC micro:bit with Blocks or Javascript." BackgroundColor="white" Square150x150Logo="images\Square150x150Logo.png" Square44x44Logo="images\Square44x44Logo.png">
|
||||
<uap:DefaultTile Wide310x150Logo="images\Wide310x150Logo.png" ShortName="code the micro:bit">
|
||||
</uap:DefaultTile>
|
||||
<uap:SplashScreen Image="images\splashscreen.png" />
|
||||
</uap:VisualElements>
|
||||
<Extensions>
|
||||
<uap:Extension Category="windows.fileTypeAssociation">
|
||||
<uap:FileTypeAssociation Name="microbithex">
|
||||
<uap:DisplayName>BBC micro:bit binary file</uap:DisplayName>
|
||||
<uap:SupportedFileTypes>
|
||||
<uap:FileType ContentType="application/x-microbit-hex">.hex</uap:FileType>
|
||||
</uap:SupportedFileTypes>
|
||||
</uap:FileTypeAssociation>
|
||||
</uap:Extension>
|
||||
</Extensions>
|
||||
</Application>
|
||||
</Applications>
|
||||
<Capabilities>
|
||||
<Capability Name="internetClient" />
|
||||
<uap:Capability Name="removableStorage" />
|
||||
<DeviceCapability Name="bluetooth" />
|
||||
<DeviceCapability Name="serialcommunication">
|
||||
<Device Id="any">
|
||||
<Function Type="name:serialPort" />
|
||||
</Device>
|
||||
</DeviceCapability>
|
||||
</Capabilities>
|
||||
</Package>
|
Before Width: | Height: | Size: 172 KiB |
Before Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 54 KiB |
@ -32,7 +32,7 @@ namespace Microsoft.MicroBit
|
||||
private void openEditor()
|
||||
{
|
||||
// lanch editor
|
||||
try { Process.Start("https://codethemicrobit.com#uploader"); } catch (Exception) { }
|
||||
try { Process.Start("https://pxt.microbit.org#uploader"); } catch (Exception) { }
|
||||
}
|
||||
|
||||
private void initializeFileWatch()
|
||||
@ -236,7 +236,7 @@ namespace Microsoft.MicroBit
|
||||
{
|
||||
try
|
||||
{
|
||||
Process.Start("https://codethemicrobit.com/uploader");
|
||||
Process.Start("https://pxt.microbit.org/uploader");
|
||||
}
|
||||
catch (IOException) { }
|
||||
}
|
||||
|
@ -1,16 +0,0 @@
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:site" content="@codethemicrobit" />
|
||||
<meta name="twitter:title" content="code the micro:bit" />
|
||||
<meta name="twitter:description" content="Blocks+JavaScript for programming your micro:bit" />
|
||||
<meta name="twitter:image" content="https://az851932.vo.msecnd.net/pub/drbwxcth" />
|
||||
|
||||
<meta property="og:title" content="micro:bit editor" />
|
||||
<meta property="og:description" content="Blocks+JavaScript for programming your micro:bit" />
|
||||
<meta property="og:site_name" content="code the micro:bit" />
|
||||
<meta property="og:image" content="https://az851932.vo.msecnd.net/pub/drbwxcth" />
|
||||
<!--
|
||||
Canonical URL needs to wait until main release is updated.
|
||||
<meta property="og:url" content="https://codethemicrobit.com" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="fb:app_id" content="" />
|
||||
-->
|
@ -1,6 +0,0 @@
|
||||
<script type="text/javascript">
|
||||
(function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!==typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable time_event track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config reset people.set people.set_once people.increment people.append people.union people.track_charge people.clear_charges people.delete_user".split(" ");
|
||||
for(g=0;g<i.length;g++)f(c,i[g]);b._i.push([a,e,d])};b.__SV=1.2;a=e.createElement("script");a.type="text/javascript";a.async=!0;a.src="undefined"!==typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"file:"===e.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";f=e.getElementsByTagName("script")[0];f.parentNode.insertBefore(a,f)}})(document,window.mixpanel||[]);
|
||||
mixpanel.init("762fef19c053a0ea4cec43d2fecae76e", { disable_persistence: true });
|
||||
if (typeof pxtConfig !== "undefined") mixpanel.register({ target: pxtConfig.targetId, version: pxtConfig.targetVersion });
|
||||
</script>
|
@ -1,21 +0,0 @@
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:site" content="@codethemicrobit" />
|
||||
<meta name="twitter:title" content="@name@" />
|
||||
<meta name="twitter:description" content="@description@" />
|
||||
<meta name="twitter:image" content="@cardLogo@" />
|
||||
|
||||
<meta property="og:title" content="@name@" />
|
||||
<meta property="og:site_name" content="code the micro:bit" />
|
||||
<meta property="og:description" content="@description@" />
|
||||
<meta property="og:image" content="@cardLogo@" />
|
||||
<!--
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="fb:app_id" content="" />
|
||||
-->
|
||||
|
||||
<link rel="apple-touch-icon" href="@appLogo@">
|
||||
<link rel="icon" type="image/png" href="@appLogo@">
|
||||
<link rel="mask-icon" href="https://az851932.vo.msecnd.net/pub/zwxazere/safari-pinned-tab.svg" color="#000000">
|
||||
<link rel="shortcut icon" href="@appLogo@">
|
||||
<meta name="theme-color" content="@accentColor@">
|
||||
|
@ -1,5 +0,0 @@
|
||||
#root .avatar .avatar-image {
|
||||
background-image: url(https://az851932.vo.msecnd.net/pub/jovrytni/microbit.simplified.svg);
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
<script type="text/javascript">
|
||||
(function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!==typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable time_event track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config reset people.set people.set_once people.increment people.append people.union people.track_charge people.clear_charges people.delete_user".split(" ");
|
||||
for(g=0;g<i.length;g++)f(c,i[g]);b._i.push([a,e,d])};b.__SV=1.2;a=e.createElement("script");a.type="text/javascript";a.async=!0;a.src="undefined"!==typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"file:"===e.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";f=e.getElementsByTagName("script")[0];f.parentNode.insertBefore(a,f)}})(document,window.mixpanel||[]);
|
||||
mixpanel.init("762fef19c053a0ea4cec43d2fecae76e", { disable_persistence: true });
|
||||
if (typeof pxtConfig !== "undefined") mixpanel.register({ target: pxtConfig.targetId, version: pxtConfig.targetVersion });
|
||||
</script>
|
@ -1,22 +0,0 @@
|
||||
{
|
||||
"name": "koduj z micro:bit",
|
||||
"title": "koduj z micro:bit",
|
||||
"docMenu": [
|
||||
{
|
||||
"name": "O nas",
|
||||
"path": "/about"
|
||||
},
|
||||
{
|
||||
"name": "Lekcje",
|
||||
"path": "/lessons"
|
||||
},
|
||||
{
|
||||
"name": "Instrukcja obsługi",
|
||||
"path": "/reference"
|
||||
},
|
||||
{
|
||||
"name": "Urządzenie",
|
||||
"path": "/device"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
# Dokumentacja
|
||||
|
||||
Witamy na stronach dokumentacji!
|
||||
|
||||
* Przeglądnij [instrukcje obsługi](/reference)
|
||||
* Dowiedz się więcej o [urządzeniu](/device)
|
||||
* Wystartuj z [lekcjami](/lessons)
|
3
docs/beta-ref.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"appref": "v"
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
# Unsupported configuration
|
||||
|
||||
[pxt.microbit.org](https://pxt.microbit.org) doesn't currently support
|
||||
your browser or operating system. The following configurations are supported:
|
||||
Your browser is currently not supported. The following configurations are supported:
|
||||
|
||||
## Windows
|
||||
|
||||
|
@ -91,3 +91,10 @@ basic.showString("d", 150)
|
||||
|
||||
You will not see the LED at position `0,0` lit up because the `show string` function overwrites the whole display buffer.
|
||||
|
||||
|
||||
### Pins: P3, P4, P6, P7, P9, P10
|
||||
|
||||
These pins are coupled to the LED matrix display, and also it’s associated ambient light sensing mode.
|
||||
To disable the display driver feature (which will automatically disable the light sensing feature) use the function [led.enable](/reference/led/enable).
|
||||
|
||||
More information at http://tech.microbit.org/hardware/edgeconnector_ds/ .
|
||||
|
@ -8,10 +8,10 @@
|
||||
* [Projects](/projects)
|
||||
* [Lessons](/lessons)
|
||||
|
||||
### Micro:bit reference
|
||||
### @boardname@ reference
|
||||
|
||||
* [The micro:bit APIs](/reference)
|
||||
* [The micro:bit device](/device)
|
||||
* [The @boardname@ APIs](/reference)
|
||||
* [The @boardname@ device](/device)
|
||||
|
||||
### Language and data reference
|
||||
|
||||
@ -28,4 +28,4 @@
|
||||
|
||||
* [Command Line Interface](/cli)
|
||||
* Learn about [packages](/packages)
|
||||
* [Release notes](/release-notes)
|
||||
|
||||
|
34
docs/faq.md
@ -2,33 +2,13 @@
|
||||
|
||||
### @description Frequently asked questions and answers from our users.
|
||||
|
||||
### Where can I get a BBC micro:bit?
|
||||
## Which web sites do I need to unblock for pxt.microbit.org?
|
||||
|
||||
More information at [http://uk.farnell.com/bbc-microbit](http://uk.farnell.com/bbc-microbit).
|
||||
This is the list of domains that need to be unblocked to allow the web editor to load:
|
||||
|
||||
### How do I send feedback?
|
||||
* https://pxt.microbit.org
|
||||
* https://www.pxt.io
|
||||
* https://trg-microbit.userpxt.io
|
||||
* https://pxt.azureedge.net
|
||||
|
||||
Find the small bubble icon on the bottom of the editor and
|
||||
post your feedback from there!
|
||||
|
||||
### How do I save my code?
|
||||
|
||||
The web editor automatically saves your code in the browser cache. Simply reopen the browser and navigate to the web editor
|
||||
to reopen your latest project. You can also open previous project stored locally through **More -> Open Project**.
|
||||
|
||||
The project source is also stored in each compiled ``.hex`` file. Drag and drop the ``.hex`` file into the web editor to load the project.
|
||||
|
||||
To share your project with others, you can use the [Embed Project...](/share).
|
||||
It stores your project in the cloud and creates a URL that you can share with others.
|
||||
|
||||
If you are using [Visual Studio Code](/code), all your programs are stored as files on your computer and you can use your favorite source control system as needed.
|
||||
|
||||
## Is the web site available in other languages?
|
||||
|
||||
You can [help us translate](/translate) the web site, documentation and blocks via our crowd-source translations!
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### My micro:bit does not show up as a drive when I connect it to my computer.
|
||||
|
||||
A common cause for this is a broken cable. Pick another USB cable and try it. Otherwise, try another computer as well.
|
||||
Can't find your question? Please search for solutions or open a ticket at [support.microbit.org](https://support.microbit.org)!
|
||||
|
BIN
docs/favicon.ico
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 15 KiB |
@ -1,6 +1,6 @@
|
||||
# Getting started
|
||||
|
||||
### @description An activity for beginners to get started with the micro:bit
|
||||
### @description An activity for beginners to get started with the @boardname@
|
||||
|
||||
## ~avatar
|
||||
|
||||
@ -35,7 +35,7 @@ When this program runs, you will see a smiley face, then a blank
|
||||
screen, then a smiley again -- it never stops! (That's because of the
|
||||
``forever`` block.)
|
||||
|
||||
Click **Download** to move your program to the BBC micro:bit!
|
||||
Click **Download** to move your program to the @boardname@!
|
||||
Make sure to follow the instructions.
|
||||
|
||||
### ~button /getting-started/screen
|
||||
|
@ -18,11 +18,11 @@ input.onButtonPressed(Button.A, () => {
|
||||
#### ~hint
|
||||
|
||||
The ``showString`` block can show letters, numbers, and punctuation
|
||||
on the micro:bit screen.
|
||||
on the @boardname@ screen.
|
||||
|
||||
#### ~
|
||||
|
||||
Now try to unscramble these blocks in the editor so that the micro:bit
|
||||
Now try to unscramble these blocks in the editor so that the @boardname@
|
||||
shows **BANANA** when you press button `B`.
|
||||
|
||||
```shuffle
|
||||
@ -37,7 +37,7 @@ You can find the letter `B` by clicking the letter `A` on the
|
||||
|
||||
#### ~
|
||||
|
||||
Click **Download** to move your program to the BBC micro:bit!
|
||||
Click **Download** to move your program to the @boardname@!
|
||||
|
||||
#### Your turn!
|
||||
|
||||
@ -48,9 +48,9 @@ name_ instead of **BANANA** when you press `B`?
|
||||
### Pins
|
||||
|
||||
You can also use the pins as buttons. (The pins are the holes in the
|
||||
metal stripe at the bottom of the micro:bit board.) For example, hold
|
||||
metal stripe at the bottom of the @boardname@ board.) For example, hold
|
||||
the ``GND`` button with one hand and touch the ``0`` pin (called
|
||||
``P0``) with your other hand to tell the micro:bit you're pressing it.
|
||||
``P0``) with your other hand to tell the @boardname@ you're pressing it.
|
||||
|
||||
Unscramble the blocks in the editor to show a heart when you touch
|
||||
pin ``P0``.
|
||||
@ -65,7 +65,7 @@ input.onPinPressed(TouchPin.P0, () => {
|
||||
. . # . .`);
|
||||
});
|
||||
```
|
||||
Click **Download** to move your program to the BBC micro:bit!
|
||||
Click **Download** to move your program to the @boardname@!
|
||||
|
||||
## ~hint
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
Are you trying to choose whether to play soccer or go to the movies
|
||||
instead, or which toppings to have on your pizza? Build a coin
|
||||
flipping machine with the BBC micro:bit to choose for you!
|
||||
flipping machine with the @boardname@ to choose for you!
|
||||
|
||||
### ~
|
||||
|
||||
@ -50,7 +50,7 @@ input.onButtonPressed(Button.AB, () => {
|
||||
```
|
||||
|
||||
These blocks mean that if you press button `A`, you will add `1` to
|
||||
your score, and if you press `A` and `B` together, the micro:bit will
|
||||
your score, and if you press `A` and `B` together, the @boardname@ will
|
||||
show your score.
|
||||
|
||||
When you're done, your coin flipping program should look like this:
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Build a Rock Paper Scissors game with the BBC micro:bit! You can play
|
||||
the game with a friend who has it on a micro:bit. You can also play
|
||||
Build a Rock Paper Scissors game with the @boardname@! You can play
|
||||
the game with a friend who has it on a @boardname@. You can also play
|
||||
it with friends who are just using their hands. (The game is built
|
||||
like a coin flipper, but with three choices instead of two.)
|
||||
|
||||
@ -11,9 +11,9 @@ like a coin flipper, but with three choices instead of two.)
|
||||
|
||||
## Step 1: Getting started
|
||||
|
||||
We want the micro:bit to choose rock, paper, or scissors when you
|
||||
We want the @boardname@ to choose rock, paper, or scissors when you
|
||||
shake it. Try creating an ``on shake`` block so when you shake the
|
||||
micro:bit, it will run part of a program.
|
||||
@boardname@, it will run part of a program.
|
||||
|
||||
Clear up the blocks and add the blocks below.
|
||||
|
||||
@ -23,7 +23,7 @@ input.onGesture(Gesture.Shake, () => {
|
||||
})
|
||||
```
|
||||
|
||||
Next, when you shake the micro:bit, it should pick a random number from `0` to `2`
|
||||
Next, when you shake the @boardname@, it should pick a random number from `0` to `2`
|
||||
and store it in the variable `item`.
|
||||
|
||||
Add a ``set`` block with a variable. Then add a ``pick random`` block,
|
||||
@ -75,7 +75,7 @@ input.onGesture(Gesture.Shake, () => {
|
||||
|
||||
## Step 3: A random rock
|
||||
|
||||
Now we are going to add a new picture for the micro:bit to show
|
||||
Now we are going to add a new picture for the @boardname@ to show
|
||||
when another random number comes up.
|
||||
|
||||
Make the ``else if`` part check if the variable `item` is `1`.
|
||||
@ -152,7 +152,7 @@ That's why you can use an ``else`` instead of an ``else if``.
|
||||
|
||||
Your game is ready!
|
||||
|
||||
Click **Download** to move your program to the BBC micro:bit!
|
||||
Click **Download** to move your program to the @boardname@!
|
||||
|
||||
Have fun!
|
||||
|
||||
@ -160,7 +160,7 @@ Have fun!
|
||||
|
||||
Here is a way you can make your Rock Paper Scissors game better.
|
||||
When button ``A`` is pressed,
|
||||
the micro:bit will add `1` to your score.
|
||||
the @boardname@ will add `1` to your score.
|
||||
|
||||
Open the ``Game`` drawer, and then add the block ``change score by 1`` to your program,
|
||||
like this:
|
||||
@ -174,7 +174,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
## Step 6: Prove you're the greatest!
|
||||
|
||||
After your micro:bit can add `1` to the score, show how many wins you have.
|
||||
After your @boardname@ can add `1` to the score, show how many wins you have.
|
||||
|
||||
```blocks
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
@ -185,7 +185,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
```
|
||||
## Step 7: Staying honest
|
||||
|
||||
Success! Your micro:bit can track wins!
|
||||
Success! Your @boardname@ can track wins!
|
||||
But what about losses?
|
||||
Use the ``Game`` drawer to subtract `1` from your score when you press button `B`.
|
||||
|
||||
@ -198,7 +198,7 @@ input.onButtonPressed(Button.B, () => {
|
||||
basic.showNumber(game.score())
|
||||
})
|
||||
```
|
||||
Click **Download** to move your program to the BBC micro:bit!
|
||||
Click **Download** to move your program to the @boardname@!
|
||||
|
||||
### ~button /projects
|
||||
NEXT: PROJECTS!
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
There are 25 bright LEDs on the micro:bit screen. Let's use them to create some cool animations!
|
||||
There are 25 bright LEDs on the @boardname@ screen. Let's use them to create some cool animations!
|
||||
|
||||
### ~
|
||||
|
||||
@ -12,7 +12,7 @@ Draw an unhappy face instead of the blank screen. Click on the dots
|
||||
in the second ``show leds`` block until it matches the blocks below.
|
||||
Now you have an **animation** (cartoon) that shows a happy face,
|
||||
then an unhappy one, then a happy one again, forever (or until
|
||||
you turn off your micro:bit)!
|
||||
you turn off your @boardname@)!
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -32,7 +32,7 @@ basic.forever(() => {
|
||||
`)
|
||||
});
|
||||
```
|
||||
Click **Download** to move your program to the BBC micro:bit!
|
||||
Click **Download** to move your program to the @boardname@!
|
||||
|
||||
### Your turn!
|
||||
|
||||
@ -85,7 +85,7 @@ basic.forever(() => {
|
||||
`)
|
||||
});
|
||||
```
|
||||
Click **Download** to move your program to the BBC micro:bit!
|
||||
Click **Download** to move your program to the @boardname@!
|
||||
|
||||
#### ~hint
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
# Shake
|
||||
|
||||
You can find when someone is shaking the BBC micro:bit by checking its
|
||||
**accelerometer** (it finds whether the micro:bit is speeding up or
|
||||
You can find when someone is shaking the @boardname@ by checking its
|
||||
**accelerometer** (it finds whether the @boardname@ is speeding up or
|
||||
slowing down).
|
||||
|
||||
Unscramble these blocks in the editor to show a frownie when someone
|
||||
shakes the micro:bit. (Ouch!)
|
||||
shakes the @boardname@. (Ouch!)
|
||||
|
||||
```shuffle
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
@ -17,7 +17,7 @@ input.onGesture(Gesture.Shake, () => {
|
||||
# . . . #`);
|
||||
});
|
||||
```
|
||||
Click **Download** to move your program to the BBC micro:bit!
|
||||
Click **Download** to move your program to the @boardname@!
|
||||
|
||||
### ~button /getting-started/coin-flipper
|
||||
NEXT: COIN FLIPPER GAME
|
||||
|
3
docs/index-ref.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"appref": "v0.5.63"
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
# JavaScript
|
||||
|
||||
Visit the cards below to starting programming JavaScript and TypeScript with the micro:bit:
|
||||
Visit the cards below to starting programming JavaScript
|
||||
with the @boardname@:
|
||||
|
||||
```codecard
|
||||
[{
|
||||
|
@ -1,8 +1,8 @@
|
||||
# Call a function
|
||||
|
||||
The simplest way to get started in JavaScript with your micro:bit is to
|
||||
call one of the micro:bit's built-in JavaScript functions. Just like Blocks
|
||||
are organized into categories/drawers, the micro:bit functions are organized by
|
||||
The simplest way to get started in JavaScript with your @boardname@ is to
|
||||
call one of the @boardname@'s built-in JavaScript functions. Just like Blocks
|
||||
are organized into categories/drawers, the @boardname@ functions are organized by
|
||||
namespaces, with names corresponding to the drawer names. The `basic` namespace
|
||||
contains a number of helpful functions, such as:
|
||||
|
||||
|
@ -35,7 +35,7 @@ This calls into the constructor we defined earlier, creating a new object with t
|
||||
# Inheritance
|
||||
|
||||
### ~hint
|
||||
### Inheritance is not supported yet for the micro:bit. Coming soon...
|
||||
### Inheritance is not supported yet for the @boardname@. Coming soon...
|
||||
### ~
|
||||
|
||||
In TypeScript, we can use common object-oriented patterns.
|
||||
|
@ -1,8 +1,8 @@
|
||||
# Frequently asked questions
|
||||
|
||||
# What is the language supported for the micro:bit?
|
||||
# What is the language supported for the @boardname@?
|
||||
|
||||
For the micro:bit, we support a "static" subset of TypeScript (itself a superset of JavaScript):
|
||||
For the @boardname@, we support a "static" subset of TypeScript (itself a superset of JavaScript):
|
||||
|
||||
## Supported language features
|
||||
|
||||
|
@ -13,7 +13,7 @@ basic.showNumber(add(1, 2))
|
||||
```
|
||||
|
||||
### ~ hint
|
||||
For the micro:bit, you must specify a [type](/js/types) for each function parameter.
|
||||
For the @boardname@, you must specify a [type](/js/types) for each function parameter.
|
||||
### ~
|
||||
|
||||
Functions can refer to variables outside of the function body.
|
||||
|
@ -1,9 +1,9 @@
|
||||
## Operators
|
||||
|
||||
The following JavaScript operators are supported for the micro:bit.
|
||||
The following JavaScript operators are supported for the @boardname@.
|
||||
|
||||
### ~hint
|
||||
Note that for the micro:bit all arithmetic is performed on integers, rather than floating point.
|
||||
Note that for the @boardname@ all arithmetic is performed on integers, rather than floating point.
|
||||
This also is true when simulating in the browser.
|
||||
### ~
|
||||
|
||||
|
@ -41,14 +41,14 @@ In JavaScript, there is the concept of an *empty statement*, which is whitespace
|
||||
a semicolon in the context where a statement is expected.
|
||||
So, the following code is an infinite loop
|
||||
followed by a call to `showNumber` that will never execute:
|
||||
```typescript
|
||||
while(true) ;
|
||||
```typescript-ignore
|
||||
while(true) ;
|
||||
basic.showNumber(1);
|
||||
```
|
||||
|
||||
|
||||
### ~hint
|
||||
For the micro:bit, we don't allow a program to contain an empty statement, such as shown above.
|
||||
For the @boardname@, we don't allow a program to contain an empty statement, such as shown above.
|
||||
If you really want an empty statement, you need to use curly braces to delimit an empty statement block:
|
||||
```typescript
|
||||
while(true) { }
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Statements
|
||||
|
||||
The following JavaScript statements are supported for the micro:bit:
|
||||
The following JavaScript statements are supported for the @boardname@:
|
||||
|
||||
## Variable declarations
|
||||
* `const` statement - [read more](http://devdocs.io/javascript/statements/const)
|
||||
|
@ -15,7 +15,7 @@ let isDone: boolean = false;
|
||||
|
||||
### ~ hint
|
||||
In JavaScript, `numbers` are floating point values.
|
||||
However, for the micro:bit, `numbers` are integer values.
|
||||
However, for the @boardname@, `numbers` are integer values.
|
||||
### ~
|
||||
|
||||
Integer values can be specified via decimal, hexadecimal and octal notation:
|
||||
@ -51,6 +51,8 @@ I'll be ${ age + 1 } years old next month.`
|
||||
This is equivalent to declaring `sentence` like so:
|
||||
|
||||
```ts
|
||||
let fullName: string = `Bob Bobbington`;
|
||||
let age: number = 37;
|
||||
let sentence: string = "Hello, my name is " + fullName + ".\n\n" +
|
||||
"I'll be " + (age + 1) + " years old next month."
|
||||
```
|
||||
@ -72,7 +74,7 @@ let list: Array<number> = [1, 2, 3];
|
||||
```
|
||||
|
||||
### ~hint
|
||||
For the micro:bit, all elements of an array must have the same type.
|
||||
For the @boardname@, all elements of an array must have the same type.
|
||||
### ~
|
||||
|
||||
|
||||
@ -82,7 +84,7 @@ A helpful addition to the standard set of datatypes from JavaScript is the `enum
|
||||
As in languages like C#, an enum is a way of giving more friendly names to sets of numeric values.
|
||||
|
||||
```ts
|
||||
enum Color {Red, Green, Blue};
|
||||
enum Color {Red, Green, Blue}
|
||||
let c: Color = Color.Green;
|
||||
```
|
||||
|
||||
@ -91,20 +93,20 @@ You can change this by manually setting the value of one of its members.
|
||||
For example, we can start the previous example at `1` instead of `0`:
|
||||
|
||||
```ts
|
||||
enum Color {Red = 1, Green, Blue};
|
||||
enum Color {Red = 1, Green, Blue}
|
||||
let c: Color = Color.Green;
|
||||
```
|
||||
|
||||
Or, even manually set all the values in the enum:
|
||||
|
||||
```ts
|
||||
enum Color {Red = 1, Green = 2, Blue = 4};
|
||||
enum Color {Red = 1, Green = 2, Blue = 4}
|
||||
let c: Color = Color.Green;
|
||||
```
|
||||
|
||||
# Any
|
||||
|
||||
The TypeScript type `any` is not supported in the micro:bit.
|
||||
The TypeScript type `any` is not supported in the @boardname@.
|
||||
|
||||
|
||||
# Void
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
## Intermediate
|
||||
|
||||
* [Magic 8](/lessons/magic-8), a fortune teller game with the BBC micro:bit
|
||||
* [Magic 8](/lessons/magic-8), a fortune teller game with the @boardname@
|
||||
* [Guess the Number](/lessons/guess-the-number), guess a random number with pick number
|
||||
* [Counter](/lessons/counter), display a number with a variable
|
||||
* [Love Meter](/lessons/love-meter), create a love meter with on pin pressed
|
||||
@ -40,7 +40,7 @@
|
||||
* [Temperature](/lessons/temperature), get the ambient temperature (degree Celsius °C)
|
||||
* [Digi Yoyo](/lessons/digi-yoyo), create a counter with a while loop
|
||||
* [Rotation Animation](/lessons/rotation-animation), control an animation with a boolean variable
|
||||
* [Compass](/lessons/compass), displays the direction the BBC micro:bit is pointing with compass
|
||||
* [Compass](/lessons/compass), displays the direction the @boardname@ is pointing with compass
|
||||
* [Zoomer](/lessons/zoomer), measure the force with acceleration
|
||||
* [Glowing Pendulum](/lessons/glowing-pendulum), construct a pendulum that glows using acceleration
|
||||
* [Classic Beatbox](/lessons/classic-beatbox), make a beatbox music player with variables
|
||||
@ -60,7 +60,7 @@
|
||||
* [Prank WiFi](/lessons/prank-wifi), create fake WiFi to trick your friends
|
||||
* [Speed Button](/lessons/speed-button), code a speed game with running time
|
||||
* [Headbands](/lessons/headbands), create a charades game with a collection of strings that hold the words
|
||||
* [Hero](/lessons/hero), reconstruct the classic arcade game pac man with the BBC micro:bit
|
||||
* [Hero](/lessons/hero), reconstruct the classic arcade game pac man with the @boardname@
|
||||
* [Catch the Egg](/lessons/catch-the-egg-game), catch falling eggs in a basket with an acceleration controller
|
||||
### ~
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# answering machine blocks lesson
|
||||
|
||||
Create an answering machine on the BBC micro:bit
|
||||
Create an answering machine on the @boardname@
|
||||
|
||||
## Topic
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# answering machine blocks activity
|
||||
|
||||
Learn to create an answering machine on the micro:bit
|
||||
Learn to create an answering machine on the @boardname@
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
|
@ -12,7 +12,7 @@ basic.showString("ASK ME A QUESTION")
|
||||
|
||||
### Challenge 1
|
||||
|
||||
Now we need to reply after someone asks micro:bit a yes or no question. We want to respond `YES` when button `A` is pressed. Add a condition for button `A` and inside it show the string `YES`.
|
||||
Now we need to reply after someone asks @boardname@ a yes or no question. We want to respond `YES` when button `A` is pressed. Add a condition for button `A` and inside it show the string `YES`.
|
||||
|
||||
```blocks
|
||||
basic.showString("ASK ME A QUESTION")
|
||||
@ -25,7 +25,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
### Challenge 2
|
||||
|
||||
What if micro:bit's answer to the question is no? Let's have `NO` be displayed when button `B` is pressed. Add a condition for button `B` and inside it show the string `NO`.
|
||||
What if @boardname@'s answer to the question is no? Let's have `NO` be displayed when button `B` is pressed. Add a condition for button `B` and inside it show the string `NO`.
|
||||
|
||||
```blocks
|
||||
basic.showString("ASK ME A QUESTION")
|
||||
|
@ -1,6 +1,6 @@
|
||||
# answering machine blocks quiz answers
|
||||
|
||||
Create an answering machine on the micro:bit.
|
||||
Create an answering machine on the @boardname@.
|
||||
|
||||
This is the answer key for the [answering machine quiz](/lessons/answering-machine/quiz).
|
||||
|
||||
@ -26,7 +26,7 @@ basic.showString("Hi")
|
||||

|
||||
|
||||
|
||||
## 4. If the rectangle below represents the micro:bit, write the code to display the letter "Z".
|
||||
## 4. If the rectangle below represents the @boardname@, write the code to display the letter "Z".
|
||||
|
||||

|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# answering machine blocks quiz
|
||||
|
||||
Create an answering machine on the micro:bit.
|
||||
Create an answering machine on the @boardname@.
|
||||
|
||||
## Name
|
||||
|
||||
@ -36,7 +36,7 @@ basic.showString("Hi")
|
||||
|
||||

|
||||
|
||||
## 4. If the rectangle below represents the micro:bit, write the code to display the letter "Z".
|
||||
## 4. If the rectangle below represents the @boardname@, write the code to display the letter "Z".
|
||||
|
||||
```blocks
|
||||
basic.showString("Z")
|
||||
|
@ -1,6 +1,6 @@
|
||||
# beautiful image lesson
|
||||
|
||||
Display beautiful images on the BBC micro:bit.
|
||||
Display beautiful images on the @boardname@.
|
||||
|
||||
## Topic
|
||||
|
||||
@ -14,7 +14,7 @@ Show LEDs
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
Learn how to **show LEDs**, to show an image on the BBC micro:bit's LED screen. We will be learning how to Show LEDs using simple commands such as Show LEDs and pause.
|
||||
Learn how to **show LEDs**, to show an image on the @boardname@'s LED screen. We will be learning how to Show LEDs using simple commands such as Show LEDs and pause.
|
||||
|
||||
## Documentation
|
||||
|
||||
@ -31,6 +31,6 @@ basic.pause(100)
|
||||
|
||||
## Objectives
|
||||
|
||||
* learn how to display an image on the micro:bit's LED screen
|
||||
* learn how to display an image on the @boardname@'s LED screen
|
||||
* learn how to pause your code for the specified number of milliseconds
|
||||
|
||||
|
@ -18,7 +18,7 @@ basic.showLeds(`
|
||||
|
||||
### Challenge 1
|
||||
|
||||
Now show an new image that will display on the micro:bit.
|
||||
Now show an new image that will display on the @boardname@.
|
||||
|
||||
```blocks
|
||||
basic.showLeds(`
|
||||
|
@ -4,19 +4,19 @@ An introduction to conditions for the Block Editor.
|
||||
|
||||
## Introduction to conditions
|
||||
|
||||
In the introduction to code, we made the BBC micro:bit automatically shows the message ‘hello world!’:
|
||||
In the introduction to code, we made the @boardname@ automatically shows the message ‘hello world!’:
|
||||
|
||||
```blocks
|
||||
basic.showString("hello world!")
|
||||
```
|
||||
|
||||
This statement, or code, will happen as soon as the BBC micro:bit is activated. This means it is unconditional. We can add a condition to make code function in certain ways:
|
||||
This statement, or code, will happen as soon as the @boardname@ is activated. This means it is unconditional. We can add a condition to make code function in certain ways:
|
||||
|
||||
* A calculator waits for the user in input numbers and a function, before outputting a result
|
||||
* A game waits for the user to press a button at the right time before outputting their score
|
||||
* A quiz waits for the user to choose the correct option, and if they are wrong the quiz will tell the user
|
||||
|
||||
In programming we use an ‘if’ statement: if this condition is met, do something. Lets add an if statement to the code we had before; the BBC Micro:bit will wait for the user to press a button before showing the image.
|
||||
In programming we use an ‘if’ statement: if this condition is met, do something. Lets add an if statement to the code we had before; the @boardname@ will wait for the user to press a button before showing the image.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -40,9 +40,9 @@ You could now add additional conditions to your 'if statement'. Here are some id
|
||||
|
||||
What if the user does not press a button? What if the user presses the wrong button? We call this an else, because if the criteria of the if statement are not met then something else is done.
|
||||
|
||||
For example, we could make it so our BBC Micro:bit tells us to press the A button. Remove the `button pressed` and `show string` blocks from the `if` block and right click it and select **Delete**. Now click the **If** category and drag out an `else if` block. Plug the `button pressed` and `show string` blocks in the correct places.
|
||||
For example, we could make it so our @boardname@ tells us to press the A button. Remove the `button pressed` and `show string` blocks from the `if` block and right click it and select **Delete**. Now click the **If** category and drag out an `else if` block. Plug the `button pressed` and `show string` blocks in the correct places.
|
||||
|
||||
We want the message "Press A!" to scroll across the BBC micro:bit, so right-click the `show string` block and select **Duplicate**. Drag this new block into the `else` section and replace the “hello, world!” with "Press A!". Your code should look like this:
|
||||
We want the message "Press A!" to scroll across the @boardname@, so right-click the `show string` block and select **Duplicate**. Drag this new block into the `else` section and replace the “hello, world!” with "Press A!". Your code should look like this:
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -54,7 +54,7 @@ basic.forever(() => {
|
||||
})
|
||||
```
|
||||
|
||||
So, to recap: the `forever` block makes sure our code runs forever. The BBC micro:bit checks if the user is pressing the left button, if the user is not then the “Press the button!” message will scroll across the LEDs. If the user is pressing the button then the “hello, world!” message will scroll across the screen. Check this in the simulator or attach the BBC micro:bit to the computer then click **Download** to send the code onto the BBC micro:bit.
|
||||
So, to recap: the `forever` block makes sure our code runs forever. The @boardname@ checks if the user is pressing the left button, if the user is not then the “Press the button!” message will scroll across the LEDs. If the user is pressing the button then the “hello, world!” message will scroll across the screen. Check this in the simulator or attach the @boardname@ to the computer then click **Download** to send the code onto the @boardname@.
|
||||
|
||||
## What is a condition?
|
||||
|
||||
|
@ -1,48 +1,48 @@
|
||||
# bop it challenges
|
||||
|
||||
a game similar to "Simon Says" with the BBC micro:bit.
|
||||
a game similar to "Simon Says" with the @boardname@.
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the following guided tutorial. Your code should look like this:
|
||||
|
||||
```blocks
|
||||
newAction() // ***
|
||||
```typescript
|
||||
let action = 0;
|
||||
function newAction() {}
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
if (action == 0) {
|
||||
game.addScore(1) // ***
|
||||
newAction() // ***
|
||||
game.addScore(1);
|
||||
newAction();
|
||||
}
|
||||
}) // ***
|
||||
})
|
||||
input.onLogoDown(() => {
|
||||
if (action == 1) {
|
||||
game.addScore(1) // ***
|
||||
newAction()
|
||||
game.addScore(1);
|
||||
newAction();
|
||||
}
|
||||
})
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
if (action == 2) {
|
||||
game.addScore(1)
|
||||
newAction()
|
||||
game.addScore(1);
|
||||
newAction();
|
||||
}
|
||||
})
|
||||
input.onButtonPressed(Button.B, () => {
|
||||
basic.showNumber(game.score(), 150) // ***
|
||||
basic.pause(2000) // ***
|
||||
newAction() // ***
|
||||
basic.showNumber(game.score(), 150);
|
||||
basic.pause(2000);
|
||||
newAction();
|
||||
})
|
||||
```
|
||||
|
||||
### Challenge 1
|
||||
|
||||
Now let's add some more types of instructions for the player to follow. Let's add `PRESS PIN 0`. Change the global variable `action` to `math->random(4)` so that we can add a new **IF** statement that checks if `action=3`. If it does, display instructions to press pin 0.
|
||||
Now let's add some more types of instructions for the player to follow. Let's add `PRESS PIN 0`.
|
||||
Change the global variable `action` to `math->random(4)` so that we can add a new **IF** statement that checks if `action=3`. If it does, display instructions to press pin 0.
|
||||
|
||||
```blocks
|
||||
/**
|
||||
* {highlight}
|
||||
*/
|
||||
```typescript
|
||||
let action = 0;
|
||||
export function newAction() {
|
||||
action = Math.random(4) // ***
|
||||
action = Math.random(4)
|
||||
if (action == 0) {
|
||||
basic.showString("PUSH A", 150) // ***
|
||||
}
|
||||
@ -62,19 +62,22 @@ export function newAction() {
|
||||
|
||||
Now let's implement `PRESS PIN 0` in the main. Create a condition of `input->on pin pressed("P0")` that will add one to the score and calls the method `new action`.
|
||||
|
||||
```blocks
|
||||
// **. . .**
|
||||
```typescript
|
||||
let action = 0;
|
||||
export function newAction() {
|
||||
// ...
|
||||
}
|
||||
input.onButtonPressed(Button.B, () => {
|
||||
basic.showNumber(game.score(), 150) // ***
|
||||
basic.pause(2000) // ***
|
||||
newAction() // ***
|
||||
}) // ***
|
||||
basic.showNumber(game.score(), 150)
|
||||
basic.pause(2000)
|
||||
newAction()
|
||||
})
|
||||
input.onPinPressed(TouchPin.P0, () => {
|
||||
if (action == 3) {
|
||||
game.addScore(1) // ***
|
||||
newAction() // ***
|
||||
game.addScore(1)
|
||||
newAction()
|
||||
}
|
||||
}) // ***
|
||||
})
|
||||
```
|
||||
|
||||
### Challenge 3
|
||||
|
@ -45,7 +45,7 @@ if (action == 1) {
|
||||
}
|
||||
```
|
||||
|
||||
## 5. Write the code that increments the score if the BBC micro:bit logo is tilted down when the global variable called 'action' is equal to 1
|
||||
## 5. Write the code that increments the score if the @boardname@ logo is tilted down when the global variable called 'action' is equal to 1
|
||||
|
||||
```blocks
|
||||
input.onLogoDown(() => {
|
||||
@ -65,7 +65,7 @@ if (action == 2) {
|
||||
}
|
||||
```
|
||||
|
||||
## 7. Write the code that increments the score if the BBC micro:bit is shaken when the global variable called 'action' is equal to 2
|
||||
## 7. Write the code that increments the score if the @boardname@ is shaken when the global variable called 'action' is equal to 2
|
||||
|
||||
```blocks
|
||||
input.onLogoDown(() => {
|
||||
|
@ -26,7 +26,7 @@ Answer the questions while completing the tutorial. Pay attention to the dialogu
|
||||
|
||||
<br />
|
||||
|
||||
### 5. Write the code that increments the score if the BBC micro:bit logo is tilted down when the global variable called 'action' is equal to 1
|
||||
### 5. Write the code that increments the score if the @boardname@ logo is tilted down when the global variable called 'action' is equal to 1
|
||||
|
||||
<br />
|
||||
|
||||
@ -34,5 +34,5 @@ Answer the questions while completing the tutorial. Pay attention to the dialogu
|
||||
|
||||
<br />
|
||||
|
||||
### 7. Write the code that increments the score if the BBC micro:bit is shaken when the global variable called 'action' is equal to 2
|
||||
### 7. Write the code that increments the score if the @boardname@ is shaken when the global variable called 'action' is equal to 2
|
||||
|
||||
|
@ -47,5 +47,5 @@ game.removeLife(1);
|
||||
* learn how to return the larger of two numbers
|
||||
* learn how to return a random number
|
||||
* learn how to return the modulus
|
||||
* learn how to show a number of the BBC micro:bit screen
|
||||
* learn how to show a number of the @boardname@ screen
|
||||
* learn how to pause your code for the specified number of milliseconds
|
||||
|
@ -43,7 +43,7 @@ eggY = eggY + 1
|
||||
led.plot(eggX, eggY)
|
||||
```
|
||||
|
||||
## 4. . Write the code that resets the egg after it has fallen past the bottom of the BBC micro:bit.
|
||||
## 4. . Write the code that resets the egg after it has fallen past the bottom of the @boardname@.
|
||||
|
||||
<br/>
|
||||
|
||||
|
@ -24,7 +24,7 @@ Answer the questions while completing the tutorial. Pay attention to the dialogu
|
||||
|
||||
<br/>
|
||||
|
||||
## 4. Write the code that resets the egg after it has fallen past the bottom of the BBC micro:bit.
|
||||
## 4. Write the code that resets the egg after it has fallen past the bottom of the @boardname@.
|
||||
|
||||
<br/>
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
# charting lesson
|
||||
|
||||
Create a charting app for simulating and measuring the acceleration applied to the micro:bit
|
||||
Create a charting app for simulating and measuring the acceleration applied to the @boardname@
|
||||
|
||||
## Topic
|
||||
|
||||
Acceleration
|
||||
|
||||
## Quick Links
|
||||
* [activity](/lessons/charting/activity)
|
||||
* [challenge](/lessons/charting/challenge)
|
||||
* [quiz](/lessons/charting/quiz)
|
||||
* [activity](/lessons/charting/activity)
|
||||
* [challenge](/lessons/charting/challenge)
|
||||
* [quiz](/lessons/charting/quiz)
|
||||
* [answers](/lessons/charting/quiz-answers)
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
@ -22,9 +22,8 @@ Learn the functions of **on data received**, **send number** and **receive numbe
|
||||
input.acceleration(Dimension.X)
|
||||
led.plotBarGraph(0, 1023)
|
||||
basic.showNumber(0)
|
||||
radio.onDataReceived(() => {})
|
||||
radio.onDataPacketReceived(() => {})
|
||||
radio.sendNumber(0)
|
||||
radio.receiveNumber()
|
||||
```
|
||||
|
||||
## Objectives
|
||||
@ -33,5 +32,5 @@ radio.receiveNumber()
|
||||
* learn how to get the acceleration value (g-force), in one of three specified dimensions
|
||||
* learn how to display a vertical bar graph based on the value and high value.
|
||||
* learn how to register code to run when a packet is received over radio
|
||||
* learn how to broadcast a number data packet to other micro:bits connected via radio
|
||||
* learn how to broadcast a number data packet to other @boardname@s connected via radio
|
||||
* learn how to read the next radio packet as a number data packet
|
||||
|
@ -1,10 +1,10 @@
|
||||
# Activity
|
||||
|
||||
Measure the acceleration on the micro:bit in the "x" direction.
|
||||
Measure the acceleration on the @boardname@ in the "x" direction.
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Welcome! This activity will teach how to use the micro:bit to chart the acceleration in the "x" direction. Let's get started!
|
||||
Welcome! This activity will teach how to use the @boardname@ to chart the acceleration in the "x" direction. Let's get started!
|
||||
|
||||
|
||||
### ~
|
||||
@ -16,7 +16,7 @@ input.acceleration(Dimension.X)
|
||||
```
|
||||
|
||||
### ~
|
||||
Use the plot bar chart to visualize the acceleration on the LED screen of the micro:bit in the specified range. You implement plot Bar Graph to display a vertical bar graph based on the "value" and "high" value. Then you must insert acceleration in the X dimension to measure the acceleration.
|
||||
Use the plot bar chart to visualize the acceleration on the LED screen of the @boardname@ in the specified range. You implement plot Bar Graph to display a vertical bar graph based on the "value" and "high" value. Then you must insert acceleration in the X dimension to measure the acceleration.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -26,27 +26,27 @@ basic.forever(() => {
|
||||
```
|
||||
|
||||
### ~
|
||||
Notice that moving the micro:bit in the simulator from left to right (x direction) changes the values beneath the micro:bit in a range from 1023 to -1023 as measured in milli-gravities. By hovering over the micro:bit from left to right, you can observe changing values beneath the micro:bit simulator. Also, the LEDs shown on the Bar Graph fluctates based on the movement of the micro:bit simulator in the x direction. The line underneath the micro:bit simulator reflect the acceleration in the x direction.
|
||||
Notice that moving the @boardname@ in the simulator from left to right (x direction) changes the values beneath the @boardname@ in a range from 1023 to -1023 as measured in milli-gravities. By hovering over the @boardname@ from left to right, you can observe changing values beneath the @boardname@ simulator. Also, the LEDs shown on the Bar Graph fluctates based on the movement of the @boardname@ simulator in the x direction. The line underneath the @boardname@ simulator reflect the acceleration in the x direction.
|
||||
|
||||
NOTE: The colors of the charts reflect the color of the micro:bit simulator. In this instance, the micro:bit is yellow. So the color of the data line reflects the color of the micro:bit
|
||||
NOTE: The colors of the charts reflect the color of the @boardname@ simulator. In this instance, the @boardname@ is yellow. So the color of the data line reflects the color of the @boardname@
|
||||
|
||||

|
||||
|
||||
### ~
|
||||
|
||||
Vigorously move the micro:bit in the micro:bit simulatator by moving the micro:bit image from side to side. Every time the micro:bit moves in the x direction in the simulator, you are generating data points that can be reviewed in Excel. The more attempts to move the micro:bit from side to side, the more data being saved in Excel. After you have vigarously moved the micro:bit simulator from side to side for a sufficient amount of time, you are ready to graph or chart the accceleration of the micro:bit. We want a printout of our acceleration on Excel that can be graphed in Excel.
|
||||
Vigorously move the @boardname@ in the @boardname@ simulatator by moving the @boardname@ image from side to side. Every time the @boardname@ moves in the x direction in the simulator, you are generating data points that can be reviewed in Excel. The more attempts to move the @boardname@ from side to side, the more data being saved in Excel. After you have vigarously moved the @boardname@ simulator from side to side for a sufficient amount of time, you are ready to graph or chart the accceleration of the @boardname@. We want a printout of our acceleration on Excel that can be graphed in Excel.
|
||||
|
||||
### ~
|
||||
|
||||
We want to chart the data collected by using a tool in Excel.
|
||||
|
||||
The final part of this experiment is opening and reviewing the data in the Excel CSV file. Simply click on the line beneath the simulator. A CSV file will be generated to display the data points collected by moving the micro:bit in the X direction. Then click or tap on the data Excel file that was downloaded to your local ``Downloads`` Folder.
|
||||
The final part of this experiment is opening and reviewing the data in the Excel CSV file. Simply click on the line beneath the simulator. A CSV file will be generated to display the data points collected by moving the @boardname@ in the X direction. Then click or tap on the data Excel file that was downloaded to your local ``Downloads`` Folder.
|
||||
|
||||
|
||||
### ~
|
||||
|
||||
|
||||
First, click or tap on the first two columns (A, B) to include the time of the data being collected; b) the results of acceleration data on the micro:bit
|
||||
First, click or tap on the first two columns (A, B) to include the time of the data being collected; b) the results of acceleration data on the @boardname@
|
||||
|
||||

|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
# Challenge
|
||||
# Challenge
|
||||
|
||||
### ~avatar avatar
|
||||
### ~avatar avatar
|
||||
|
||||
Welcome! The activity will teach you how to use the acceleration of the 1st micro:bit and to visualize the acceleration on the 2nd micro:bit.
|
||||
Welcome! The activity will teach you how to use the acceleration of the 1st @boardname@ and to visualize the acceleration on the 2nd @boardname@.
|
||||
Let's get started!
|
||||
|
||||
### ~
|
||||
Let's measure `acceleration (mg)` and then `send number`. `Acceleration` is measured in **milli-gravities**, so a value of -1000 is equivalent to -1g or -9.81m/s^2. We will be able to get the acceleration value (g-force), in the specified "x" dimension. `Send number` will broadcast a number data packet to other micro:bits connected via radio.
|
||||
Let's measure `acceleration (mg)` and then `send number`. `Acceleration` is measured in **milli-gravities**, so a value of -1000 is equivalent to -1g or -9.81m/s^2. We will be able to get the acceleration value (g-force), in the specified "x" dimension. `Send number` will broadcast a number data packet to other @boardname@s connected via radio.
|
||||
|
||||
```blocks
|
||||
radio.sendNumber(input.acceleration(Dimension.X));
|
||||
@ -28,37 +28,37 @@ We want to register code to run when a packet is received over radio. We can imp
|
||||
basic.forever(() => {
|
||||
radio.sendNumber(input.acceleration(Dimension.X))
|
||||
})
|
||||
radio.onDataReceived(() => {
|
||||
|
||||
radio.onDataPacketReceived(() => {
|
||||
|
||||
})
|
||||
```
|
||||
### ~
|
||||
Finally, we want to chart the acceleration. So we must first implement `plot bar graph`. `Plot Bar Graph` will display a vertical bar graph based on the value and high value. In order to transfer the receive the number from the 1st micro:bit, we must implement `receive number` to constantly display a vertical bar graph based on the value. Remember, the value will equal to the micro:bit's acceleration in the "x" direction.
|
||||
Finally, we want to chart the acceleration. So we must first implement `plot bar graph`. `Plot Bar Graph` will display a vertical bar graph based on the value and high value. In order to transfer the receive the number from the 1st @boardname@, we must implement `receive number` to constantly display a vertical bar graph based on the value. Remember, the value will equal to the @boardname@'s acceleration in the "x" direction.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
radio.sendNumber(input.acceleration(Dimension.X))
|
||||
})
|
||||
radio.onDataReceived(() => {
|
||||
led.plotBarGraph(radio.receiveNumber(), 1023)
|
||||
radio.onDataPacketReceived(({ receivedNumber }) => {
|
||||
led.plotBarGraph(receivedNumber, 1023)
|
||||
})
|
||||
|
||||
```
|
||||
### ~
|
||||
Notice that moving the micro:bit the farthest direction in the x direction will be -1023 on the charting beneath the simulator. The second observation will be that the LEDs will be full brightness on the 2nd micro:bit. There is a single LED turned on with the 1st micro:bit. Additionally, the graphs will reflect 0 acceleation for the 1st micro:bit. In this scenario, if you are adjusting the acceleration in the simualator, you are also changing your chart that will be produced.
|
||||
Notice that moving the @boardname@ the farthest direction in the x direction will be -1023 on the charting beneath the simulator. The second observation will be that the LEDs will be full brightness on the 2nd @boardname@. There is a single LED turned on with the 1st @boardname@. Additionally, the graphs will reflect 0 acceleation for the 1st @boardname@. In this scenario, if you are adjusting the acceleration in the simualator, you are also changing your chart that will be produced.
|
||||
|
||||

|
||||
|
||||
### ~
|
||||
NOTE: The colors of the charts reflect the color of the micro:bit simulator. In this instance, the micro:bits are blue and green. So the colors of the line graphs reflect the colors of the micro:bit
|
||||
|
||||
NOTE: The colors of the charts reflect the color of the @boardname@ simulator. In this instance, the @boardname@s are blue and green. So the colors of the line graphs reflect the colors of the @boardname@
|
||||
|
||||
### ~
|
||||
After running this simulation several seconds by moving the micro:bit side to side in the x direction, you are ready to graph or chart the accceleration of the micro:bit. We want a printout of our acceleration on Excel. We will graph the fluctuating acceleration of the simulation experiment.
|
||||
After running this simulation several seconds by moving the @boardname@ side to side in the x direction, you are ready to graph or chart the accceleration of the @boardname@. We want a printout of our acceleration on Excel. We will graph the fluctuating acceleration of the simulation experiment.
|
||||
|
||||

|
||||
|
||||
### ~
|
||||
Finally, you must open the Excel CSV file by clicking on the data.xls file that was downloaded to Downloads Folder.
|
||||
Finally, you must open the Excel CSV file by clicking on the data.xls file that was downloaded to Downloads Folder.
|
||||
|
||||

|
||||
|
||||
@ -81,12 +81,12 @@ Use the Recommended Charts command on the Insert tab to quickly create a chart t
|
||||
### ~
|
||||
Have fun reviewing your simulation and analyze the acceleration by chart the Excel data using Excel.
|
||||
|
||||
* Connect the first micro:bit to your computer using your USB cable and run the charting script on it.
|
||||
* Connect the second micro:bit to your computer using your USB cable and run the charting script on it.
|
||||
* The first person and second person take turns tilting the micro:bit in the "x" direction while the other player charts the data on the micro:bit!
|
||||
* Review and analyze the actual micro:bit device acceleration data on Excel
|
||||
* Display acceleration with y or z using plot bar graph by changing acceleration from "x" to "y" or "z"
|
||||
* Connect the first @boardname@ to your computer using your USB cable and run the charting script on it.
|
||||
* Connect the second @boardname@ to your computer using your USB cable and run the charting script on it.
|
||||
* The first person and second person take turns tilting the @boardname@ in the "x" direction while the other player charts the data on the @boardname@!
|
||||
* Review and analyze the actual @boardname@ device acceleration data on Excel
|
||||
* Display acceleration with y or z using plot bar graph by changing acceleration from "x" to "y" or "z"
|
||||
|
||||
```package
|
||||
microbit-radio
|
||||
radio
|
||||
```
|
@ -1,6 +1,6 @@
|
||||
# charting quiz answers
|
||||
|
||||
Measure the acceleration on the micro:bit in the "x" direction.
|
||||
Measure the acceleration on the @boardname@ in the "x" direction.
|
||||
|
||||
|
||||
## Name
|
||||
@ -25,7 +25,7 @@ We are creating a forever loop to constantly display the appropriate brightness
|
||||
led.plotBarGraph(input.acceleration(Dimension.X), 0)
|
||||
```
|
||||
|
||||
## 3. After vigarously moving the micro:bit from side to side along the "x" axis for a sufficient amount of time,insert the Excel graph for displaying a line chart used to display trends over time.
|
||||
## 3. After vigarously moving the @boardname@ from side to side along the "x" axis for a sufficient amount of time,insert the Excel graph for displaying a line chart used to display trends over time.
|
||||
|
||||
<br/>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# charting quiz
|
||||
|
||||
Measure the acceleration on the micro:bit in the "x" direction.
|
||||
Measure the acceleration on the @boardname@ in the "x" direction.
|
||||
|
||||
## Name
|
||||
|
||||
@ -18,6 +18,6 @@ Answer the questions while completing the tutorial. Pay attention to the dialogu
|
||||
|
||||
<br/>
|
||||
|
||||
## 3. After vigarously moving the micro:bit from side to side along the "x" axis for a sufficient amount of time,insert the Excel graph for displaying a line chart used to display trends over time.
|
||||
## 3. After vigarously moving the @boardname@ from side to side along the "x" axis for a sufficient amount of time,insert the Excel graph for displaying a line chart used to display trends over time.
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# classic beatbox
|
||||
|
||||
display beautiful images on the BBC micro:bit.
|
||||
display beautiful images on the @boardname@.
|
||||
|
||||
## Topic
|
||||
|
||||
@ -19,5 +19,5 @@ Learn how to make a beatbox music player using pins P1 and P2. We will be learni
|
||||
|
||||
## Objectives
|
||||
|
||||
* learn how to code music on the BBC micro:bit
|
||||
* learn how to code music on the @boardname@
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# compass lesson
|
||||
|
||||
create a die on the BBC micro:bit.
|
||||
create a die on the @boardname@.
|
||||
|
||||
## Topic
|
||||
|
||||
@ -36,7 +36,7 @@ basic.showLeds(`
|
||||
|
||||
## Objectives
|
||||
|
||||
* learn how to run code when the BBC micro:bit is shaken, when running code in the web browser, moving the mouse quickly simulates shaking
|
||||
* learn how to run code when the @boardname@ is shaken, when running code in the web browser, moving the mouse quickly simulates shaking
|
||||
* learn how to create a local variable as a place where you can store and retrieve data
|
||||
* learn how the assignment operator is used to declare a new local variable
|
||||
* learn how to declare a new local variable or update the value of a variable
|
||||
|
@ -1,10 +1,10 @@
|
||||
# compass activity
|
||||
|
||||
Display the direction that the micro:bit is facing using the compass
|
||||
Display the direction that the @boardname@ is facing using the compass
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Welcome! This guided tutorial will show you how to program a script that displays the direction the micro:bit is pointing. Let's get started!
|
||||
Welcome! This guided tutorial will show you how to program a script that displays the direction the @boardname@ is pointing. Let's get started!
|
||||
|
||||
### ~
|
||||
|
||||
@ -17,7 +17,7 @@ basic.forever(() => {
|
||||
})
|
||||
```
|
||||
|
||||
Store the reading of the micro:bit in a variable called `degrees`.
|
||||
Store the reading of the @boardname@ in a variable called `degrees`.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -25,7 +25,7 @@ basic.forever(() => {
|
||||
})
|
||||
```
|
||||
|
||||
If `degrees` is less than `45`, then the compass heading is mostly pointing toward North. Display `N` on the micro:bit.
|
||||
If `degrees` is less than `45`, then the compass heading is mostly pointing toward North. Display `N` on the @boardname@.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -36,7 +36,7 @@ basic.forever(() => {
|
||||
});
|
||||
```
|
||||
|
||||
If `degrees` is less than 135, the micro:bit is mostly pointing East. Display `E` on the micro:bit.
|
||||
If `degrees` is less than 135, the @boardname@ is mostly pointing East. Display `E` on the @boardname@.
|
||||
|
||||
|
||||
```blocks
|
||||
@ -51,7 +51,7 @@ basic.forever(() => {
|
||||
});
|
||||
```
|
||||
|
||||
If `degrees` is less than 225, the micro:bit is mostly pointing South. Display `S` on the micro:bit.
|
||||
If `degrees` is less than 225, the @boardname@ is mostly pointing South. Display `S` on the @boardname@.
|
||||
|
||||
|
||||
```blocks
|
||||
@ -70,7 +70,7 @@ basic.forever(() => {
|
||||
```
|
||||
|
||||
|
||||
If none of these conditions returned true, then the micro:bit must be pointing West. Display `W` on the micro:bit.
|
||||
If none of these conditions returned true, then the @boardname@ must be pointing West. Display `W` on the @boardname@.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
# compass challenges
|
||||
|
||||
Display the direction that the micro:bit is facing using the compass
|
||||
Display the direction that the @boardname@ is facing using the compass
|
||||
|
||||
## Before we get started
|
||||
|
||||
@ -27,7 +27,7 @@ basic.forever(() => {
|
||||
|
||||
### Challenge 1
|
||||
|
||||
Instead of displaying `N` when the BBC micro:bit is pointing North, display a star to indicate the north star.
|
||||
Instead of displaying `N` when the @boardname@ is pointing North, display a star to indicate the north star.
|
||||
|
||||
```blocks
|
||||
let degrees = 0;
|
||||
|
@ -12,7 +12,7 @@ Answer the questions while completing the tutorial. Pay attention to the dialogu
|
||||
|
||||
## 1. What is the purpose of the 'compass heading' block?
|
||||
|
||||
Gets the compass heading of the micro:bit in degrees
|
||||
Gets the compass heading of the @boardname@ in degrees
|
||||
|
||||
|
||||
## 2. Write the code that stores the compass heading into a local variable called 'degrees'.
|
||||
@ -22,7 +22,7 @@ Gets the compass heading of the micro:bit in degrees
|
||||
let degrees = input.compassHeading()
|
||||
```
|
||||
|
||||
## 3. Write the 'If statement' that will check if the device is mostly pointing North. Display 'N' on the micro:bit
|
||||
## 3. Write the 'If statement' that will check if the device is mostly pointing North. Display 'N' on the @boardname@
|
||||
|
||||
|
||||
```blocks
|
||||
@ -32,7 +32,7 @@ if (degrees < 45) {
|
||||
}
|
||||
```
|
||||
|
||||
## 4. Write the 'If statement' that will check if the device is mostly pointing East. Display 'E' on the micro:bit
|
||||
## 4. Write the 'If statement' that will check if the device is mostly pointing East. Display 'E' on the @boardname@
|
||||
|
||||
|
||||
```blocks
|
||||
@ -42,7 +42,7 @@ if (degrees < 135) {
|
||||
}
|
||||
```
|
||||
|
||||
## 5. Write the 'If statement' that will check if the device is mostly pointing South. Display 'S' on the micro:bit
|
||||
## 5. Write the 'If statement' that will check if the device is mostly pointing South. Display 'S' on the @boardname@
|
||||
|
||||
|
||||
```blocks
|
||||
|