Compare commits

...

670 Commits

Author SHA1 Message Date
579eb29ce3 0.2.191 2016-07-22 15:22:50 +01:00
ada9560642 Bump pxt-core to 0.2.201 2016-07-22 15:22:49 +01:00
7b352b3a58 Use pre-cached TD scripts for testing 2016-07-22 15:21:16 +01:00
a5d5836ea2 Add some tests converted from TD 2016-07-22 15:18:38 +01:00
3e37b03808 0.2.190 2016-07-22 12:26:13 +01:00
d035713786 Bump pxt-core to 0.2.200 2016-07-22 12:26:13 +01:00
6e4a71b2f4 0.2.189 2016-07-22 12:12:21 +01:00
0b4dd534ab Bump pxt-core to 0.2.199 2016-07-22 12:12:20 +01:00
ed07f0baad 0.2.188 2016-07-22 11:57:15 +01:00
004d34b5df Bump pxt-core to 0.2.197 2016-07-22 11:57:15 +01:00
aa380baf1c 0.2.187 2016-07-22 11:39:39 +01:00
5123a962d9 Bump pxt-core to 0.2.196 2016-07-22 11:39:39 +01:00
7dcd770508 Cache sources for testconv in travis 2016-07-22 11:32:57 +01:00
ead4d32446 Update analog-read-pin.md 2016-07-21 16:36:33 -07:00
a51a14022a Update analog-pitch.md 2016-07-21 16:25:20 -07:00
8e74965964 remove experiemental translations 2016-07-21 14:22:30 -07:00
63913c2182 updated getting-started intro 2016-07-21 13:46:22 -07:00
c55716e148 Control pages now link to Lancaster 2016-07-21 13:29:59 -07:00
dd94442555 Merge pull request #173 from gingemonster/master
fixing more help broken links
2016-07-21 11:10:55 -07:00
56f6a2fa56 Merge pull request #172 from gingemonster/patch-1
updated setPull help annotation
2016-07-21 11:10:15 -07:00
4ca9df141c Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-07-21 11:06:13 -07:00
a29e06abce removing dangling file 2016-07-21 11:06:02 -07:00
43e4d06fd9 Add tests (for pxt testdir) 2016-07-21 16:08:22 +01:00
3c8027425a Fix order of arguments for memset() 2016-07-21 09:54:53 +01:00
3f66870688 Getting started with Control 2016-07-20 16:25:09 -07:00
478b1c84de Adding templates to Control directory 2016-07-20 11:31:14 -07:00
20ac14fdf6 fixing more help documentation links
set-accelerometer-range was wrong so fixing reference to help doc
2016-07-20 10:44:32 +01:00
c805d67cf6 fixing help for pins.pulseDuration
Help document at https://codethemicrobit.com/reference/pins/pulse-duration doesnt match the help annotation in the code so this fixes it
2016-07-20 06:29:44 +01:00
943c2e7716 Fixing help annotation on serial.redirect
Code currently points to help at https://codethemicrobit.com/reference/serial/redirect but the working url is https://codethemicrobit.com/reference/serial/redirect-to so fixed the help annotation
2016-07-20 06:21:15 +01:00
298a37e576 updated setPull help annotation
At some point Im guessing the help file has been renamed and its current url is https://codethemicrobit.com/reference/pins/set-pull. This change to the annotation of setPull removes the word "digital" so that the link should work again
2016-07-20 06:14:18 +01:00
327d52014c Misnamed, redundant file 2016-07-19 16:02:31 -07:00
6a5cfae5ff snake_case -> camelCase in docs 2016-07-19 11:42:42 +01:00
64ebb5c8c3 Correct assignment blocks in docs
Previously these blocks were not rendering.
2016-07-19 11:26:41 +01:00
bb97b57b01 Correct typo in string documentation
Note that currently you can't follow through with these instructions because string literals aren't supported, and there isn't support for converting the JS in this doc.
2016-07-19 09:25:48 +01:00
534e3723d2 Finishing fixing parameters 2016-07-18 15:51:28 -07:00
ad6ef04b1f Fixing parameters 2016-07-18 15:18:40 -07:00
2c09b7794f Fixing parameters 2016-07-18 14:23:05 -07:00
4941ce1694 Fixing parameters 2016-07-18 14:04:15 -07:00
aa6a965f59 Fixing parameters 2016-07-18 11:14:51 -07:00
1831c30050 Fixing parameters 2016-07-18 10:39:41 -07:00
df5989760c Make serial docs clearer, resolve issue #158 2016-07-18 17:17:16 +01:00
6a7f65894c Added missing parameters sections 2016-07-15 16:43:26 -07:00
f56e9369dd Fixed some parameter names 2016-07-15 14:53:52 -07:00
e23c5e019f Fix param names 2016-07-15 14:12:10 -07:00
1aa08f63fe Another new Game topic and more fixes 2016-07-15 11:54:22 -07:00
8ef94d2854 update docs 2016-07-15 11:47:37 -07:00
797474063d New Game topic, some fixes 2016-07-15 10:24:16 -07:00
b76622542b Ensure title shows correctly for doc pages 2016-07-15 15:50:26 +01:00
6a1415b3e1 Default indentation for default project.
The editor lints the TS file every time it launches, might as well commit the change.
2016-07-15 15:39:16 +01:00
2d09aef287 Merge pull request #164 from thomasdenney/master
Fixed '@params' in Neopixel blocks' docs and 'about about'
2016-07-15 08:47:59 +01:00
3ce1fa9b6e New Game topic 2016-07-14 16:58:08 -07:00
155bbb25f7 New Game topic 2016-07-14 12:49:19 -07:00
5fb3da5a77 New Game topic 2016-07-14 12:47:33 -07:00
5b682cd8d9 some mods to the docs 2016-07-14 12:09:40 -07:00
4755f0953c update ignore file 2016-07-14 12:04:06 -07:00
bdcd299805 New Serial topic 2016-07-13 16:24:56 -07:00
3e23fe4814 New Game topic, some fixes 2016-07-13 15:04:10 -07:00
3782d26e64 New Game topic 2016-07-13 13:10:06 -07:00
84a29eec65 Merge remote-tracking branch 'upstream/master' 2016-07-13 09:17:32 +01:00
299efaf0f2 Merge branch 'master' of github.com:Microsoft/pxt-microbit 2016-07-12 18:34:32 +02:00
33c60b467b Add ignore file for ptrcheck 2016-07-12 18:34:21 +02:00
81f74f07b2 Fix typo, resolve issue #165 2016-07-12 09:46:46 +01:00
583b08df28 Wrote new Serial topic 2016-07-11 12:54:28 -07:00
01f80b67bc Fix parameters 2016-07-11 11:13:13 -07:00
a890d2a357 Wrote new Serial topic 2016-07-11 10:58:16 -07:00
0d1b91afc3 0.2.186 2016-07-11 17:10:00 +02:00
5c0d37d718 Bump pxt-core to 0.2.194 2016-07-11 17:10:00 +02:00
c81e56613e Mark microbit DAL config as just defaults 2016-07-11 14:29:49 +02:00
4cc7215d35 Updated Linux (and Windows) instructions 2016-07-08 16:34:56 -07:00
8751d2aaa1 Rewrote one Serial topic; shifted some material 2016-07-08 15:29:14 -07:00
af91622dda Wrote new Serial topic 2016-07-08 12:45:31 -07:00
45d4caf595 Rewrote/expanded serial topic 2016-07-08 11:46:51 -07:00
a8e1d2a86c Fixed '@params' in Neopixel blocks' docs 2016-07-08 14:30:45 +01:00
5099b11823 remove hint 2016-07-06 20:37:43 -07:00
37e0307698 Wrote two new Game topics 2016-07-06 15:19:43 -07:00
1b15eefa5a Wrote new Game topic 2016-07-06 13:31:42 -07:00
a4eccaf4f9 Wrote new advanced topic 2016-07-06 11:54:42 -07:00
5981863e3f more intellisense 2016-07-05 17:35:37 -07:00
9ac7a4c522 Wrote new advanced topic 2016-07-05 16:36:09 -07:00
9f1c3ee13c Created advanced topic 2016-07-05 14:04:12 -07:00
8b9c3d71d5 Wrote new I2C topic. 2016-07-05 12:40:04 -07:00
6d726b7499 Wrote new I2C topic. 2016-07-05 12:30:28 -07:00
b5da5afd1d 0.2.185 2016-07-03 15:57:20 -07:00
420898e98c fix links in cards 2016-07-03 15:56:13 -07:00
f6b392356c 0.2.184 2016-07-02 19:05:57 -04:00
f4896f8d7c update doc 2016-07-02 18:55:00 -04:00
4dbd691146 update docs 2016-07-02 18:27:58 -04:00
2742dba0c4 update 2016-07-02 18:27:49 -04:00
5bea47a094 more on js 2016-07-02 10:18:45 -04:00
835a4b5cf0 Edited advanced topic. 2016-07-01 13:03:53 -07:00
055704b3ef 0.2.183 2016-07-01 15:16:43 +01:00
60107aa7ce Bump pxt-core to 0.2.193 2016-07-01 15:16:43 +01:00
787ab021a7 0.2.182 2016-07-01 15:03:49 +01:00
f56a70f502 Bump pxt-core to 0.2.192 2016-07-01 15:03:48 +01:00
4ec6749ee6 Merge branch 'master' of github.com:Microsoft/pxt-microbit 2016-07-01 14:46:14 +01:00
8413b61397 Format code 2016-07-01 14:46:05 +01:00
ecbb970983 Add target-specific meta headers for social media 2016-07-01 09:26:54 +01:00
36e6570296 Edited advanced topic 2016-06-30 12:43:42 -07:00
92c63b615a Edited advanced topic. 2016-06-30 11:53:13 -07:00
f71267c988 Edited and expanded advanced topic. 2016-06-30 11:02:28 -07:00
38fc0f8099 Fix typo preventing docs upload 2016-06-30 18:10:15 +01:00
8c7238eab3 0.2.181 2016-06-30 16:36:17 +01:00
2baca30184 Bump pxt-core to 0.2.191 2016-06-30 16:36:17 +01:00
ac56979142 Merge branch 'master' of github.com:Microsoft/pxt-microbit 2016-06-30 16:36:13 +01:00
ff72858c42 Use new index.html includes/overrides 2016-06-30 16:36:07 +01:00
deac587164 Rewrote in simple language. Added hint about average values. 2016-06-29 13:10:45 -07:00
7a0a2fbd0a Rewrote in simple language. Added hint about averaging read values. 2016-06-29 12:41:35 -07:00
79c32097b5 Merge branch 'master' of github.com:Microsoft/pxt-microbit 2016-06-29 17:49:02 +01:00
26c20d9fc3 Set twitter card logo 2016-06-29 17:48:40 +01:00
fe826a508a start on doc for javascript 2016-06-28 13:35:40 -04:00
62d2140d24 Merge pull request #152 from bluetooth-mdw/master
Reordered links in See Also sections
2016-06-28 13:34:48 -04:00
499d619faf Reordered links in 'See also' sections 2016-06-27 13:54:44 +01:00
c178e58260 Added About Bluetooth page and links to profile reference and overview 2016-06-27 13:46:29 +01:00
d242501fe6 better aspect ratio 2016-06-25 20:21:33 -04:00
37a438735d add Next buttons to projects 2016-06-25 17:23:00 -04:00
b862cfc4ec Format code 2016-06-25 19:40:21 +01:00
31002ae1a8 Fix typo in onPulse; hook up createBuffer 2016-06-25 19:17:43 +01:00
e8a3a2f676 Merge branch 'master' of github.com:Microsoft/pxt-microbit 2016-06-25 15:22:12 +01:00
e6baf8c35e bring streaming into menu 2016-06-24 19:37:05 -04:00
b72ff9fe4f New page for accelerometer range. 2016-06-24 15:42:21 -07:00
58f79ea617 0.2.180 2016-06-24 13:54:47 -07:00
ed6d343992 Bump pxt-core to 0.2.190 2016-06-24 13:54:45 -07:00
92b46d5c7b using button instead of large links 2016-06-24 13:27:34 -07:00
9cf7f08ae2 0.2.179 2016-06-24 11:31:22 -07:00
3b05b8f2f6 Bump pxt-core to 0.2.189 2016-06-24 11:31:20 -07:00
774d614d79 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-06-24 11:26:51 -07:00
545f715eeb fixing uarl docs 2016-06-24 11:03:39 -07:00
45b480c6dd Rewrote in simple language. Deleted an irrelevant example. 2016-06-24 10:25:47 -07:00
7cc93507d9 0.2.178 2016-06-24 09:48:44 -07:00
80d3f67e6c Bump pxt-core to 0.2.188 2016-06-24 09:48:42 -07:00
dfbea2719b updated project landing page 2016-06-24 09:41:51 -07:00
ce5da6bf80 updated projects link 2016-06-24 09:14:07 -07:00
d8d2129685 removed strings page 2016-06-24 09:02:31 -07:00
5dd37a1494 updated bluetooth docs page 2016-06-24 09:02:14 -07:00
6cfe39dac3 patching up bluetooth uart 2016-06-24 08:12:52 -07:00
660b22b398 Merge pull request #146 from bluetooth-mdw/master
UART blocks plus pairing documentation and updated hints section
2016-06-24 07:57:33 -07:00
b9a24a4542 Documentation for pairing. Hint section updated to reference this. 2016-06-24 11:09:56 +01:00
af5bf6e04e Documentation for the uartRead block 2016-06-24 09:35:31 +01:00
ecc71a3295 UART read block with string param unlimited length added 2016-06-24 08:46:05 +01:00
0834402b18 Pairing documentation worj in progress. UART write block added 2016-06-24 07:59:08 +01:00
8edd8ac73a Support macOS in automatic deployment 2016-06-23 23:55:36 -07:00
1207a91a7f 0.2.177 2016-06-23 23:53:58 -07:00
727490668c splitting the getting started page 2016-06-23 23:52:24 -07:00
f068b3d204 Merge remote-tracking branch 'upstream/master' 2016-06-24 07:37:21 +01:00
205a486e58 Bump pxt-core to 0.2.179 2016-06-24 07:28:23 +01:00
f3bfd41a75 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-06-23 23:23:16 -07:00
8d5c5daaaf added streaming page 2016-06-23 23:22:46 -07:00
83cfe8f534 Merge remote-tracking branch 'upstream/master' 2016-06-24 05:50:03 +01:00
9378e5e90c updated manifest 2016-06-23 16:29:26 -07:00
8617f0f3b4 Expanded stub. Rewrote in simple language. 2016-06-23 15:25:56 -07:00
0ecf3dc2b4 Rewrote in simple language. Updated example (needs work). 2016-06-23 14:29:32 -07:00
76005841fa Increased default power to 6, added UART write block 2016-06-23 11:38:23 +01:00
7bf00ff139 Merge remote-tracking branch 'upstream/master' 2016-06-23 08:06:34 +01:00
82e34d852c checking in 2016-06-23 08:05:49 +01:00
7cd8ee1e23 0.2.176 2016-06-22 20:25:02 -07:00
a91a87b628 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-06-22 20:24:53 -07:00
9d71f46e78 removed old test 2016-06-22 20:24:41 -07:00
ccf405e64c Rewrote in simple language 2016-06-22 16:24:14 -07:00
c0a75d1845 Rewrote in simpler language. Added another example. 2016-06-22 15:35:20 -07:00
e65a521bd4 Rewrote in simple language. Added second example. 2016-06-22 15:19:10 -07:00
1f203269ff updated chrome manifest 2016-06-22 14:48:51 -07:00
18feea45bb 0.2.175 2016-06-22 12:17:43 -07:00
597f0c895b Bump pxt-core to 0.2.187 2016-06-22 12:17:40 -07:00
5f21789d90 migration to codethemicrobit.com 2016-06-22 09:43:41 -07:00
64826db4aa importing chrome extension 2016-06-22 09:43:03 -07:00
b150ee873f updated bluetooth docs 2016-06-22 09:25:01 -07:00
34effcefc6 jsdoc on bluetooth 2016-06-21 14:30:05 -07:00
68be2384d9 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-06-21 13:19:40 -07:00
2629192bdb code of conduct 2016-06-21 13:17:42 -07:00
67b5afd73a integrating docs about "devices" namespace 2016-06-21 11:17:34 -07:00
5d8193301c adding reference pages for bluetooth 2016-06-21 09:46:13 -07:00
adf21fee6f 0.2.174 2016-06-21 09:35:55 -07:00
20f3e1d24e Bump pxt-core to 0.2.185 2016-06-21 09:35:51 -07:00
bf8f38fe38 docs formatting fixes 2016-06-21 09:17:46 -07:00
3e3b8ebec5 Merge pull request #142 from bluetooth-mdw/master
Documentation for Bluetooth LED service block
2016-06-21 09:12:11 -07:00
8faeeffecf Added documentation for on-bluetooth-connected and on-bluetooth-disconnected event handlers 2016-06-21 12:12:36 +01:00
343968cf09 Added documentation for Bluetooth temperature service 2016-06-21 10:10:02 +01:00
ca92f787e8 Added documentation for Bluetooth button service 2016-06-21 09:55:52 +01:00
49a67e73be Added documentation for Bluetooth accelerometer service 2016-06-21 09:40:51 +01:00
11af897c3d Added documentation for Bluetooth magnetometer service 2016-06-21 08:45:00 +01:00
08cd04b2c8 Merge remote-tracking branch 'upstream/master' 2016-06-21 08:08:12 +01:00
c1656cf441 Added documentation for Bluetooth LED service 2016-06-21 08:01:33 +01:00
8f3c585588 updated devices docs 2016-06-20 22:06:19 -07:00
dd181e4178 0.2.173 2016-06-20 13:39:34 -07:00
ff3689e92d Bump pxt-core to 0.2.184 2016-06-20 13:39:31 -07:00
fffcf0f809 added config section 2016-06-20 13:39:18 -07:00
240162370e Rewrote in simple language. New example. 2016-06-20 13:18:41 -07:00
98238caffb updated translations 2016-06-20 11:28:52 -07:00
f55977a51d Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-06-20 11:07:20 -07:00
91938f156a Merge pull request #136 from bluetooth-mdw/master
Documentation for Bluetooth IO Pin service block++
2016-06-20 11:07:04 -07:00
eb01245cce Added sig section 2016-06-20 18:11:02 +01:00
17cbea9989 refreshing localizations 2016-06-20 08:37:17 -07:00
22c03dfd7a Documentation for Bluetooth IO Pin service block.
Addition of event handler blocks for Bluetooth connection state changes.
2016-06-20 08:39:51 +01:00
cf3e8684d5 all pix are 300px wide 2016-06-19 17:50:56 -07:00
cd0b2a646f fixing various doc links 2016-06-19 05:28:46 -07:00
d7528c09e3 updated transmit power default value 2016-06-19 05:15:13 -07:00
e055484492 updated loc strings 2016-06-19 05:14:46 -07:00
947d69da48 added strings for block in microbit project 2016-06-17 22:11:32 -07:00
07822c47a3 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-06-17 21:57:51 -07:00
25d6746b7e Rewrote in simple language. Fixed broken links. 2016-06-17 16:20:17 -07:00
7cb85ff459 New page for 'create big image' 2016-06-17 15:00:24 -07:00
73d18c8d39 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-06-17 13:55:55 -07:00
74b6d99ab1 Rewrote in simple language. Added blocks example. 2016-06-17 13:42:01 -07:00
491ff29e40 0.2.172 2016-06-17 12:45:55 -07:00
d1db619c8d added entry to troubleshoot 2016-06-17 11:44:05 -07:00
733996f83e 0.2.171 2016-06-17 11:40:07 -07:00
4a624cb365 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-06-17 11:34:21 -07:00
637ea17f8e removing large image 2016-06-17 11:34:10 -07:00
f8d6bd280e change typescript to javascript 2016-06-17 09:02:06 -07:00
b91de5bad2 moving win10 app, bringing back uploader 2016-06-16 23:11:00 -07:00
d7c3433bb2 updated project page 2016-06-16 22:42:29 -07:00
43456e9a53 0.2.170 2016-06-16 16:09:22 -07:00
081244218f Bump pxt-core to 0.2.182 2016-06-16 16:09:20 -07:00
6ae39f192b Examples now set to same radio group 2016-06-16 15:33:35 -07:00
ed5263f248 First draft; need to debug examples 2016-06-16 15:15:14 -07:00
f1ee861eb4 0.2.169 2016-06-16 13:24:54 -07:00
2ce2fd95ba Bump pxt-core to 0.2.181 2016-06-16 13:24:52 -07:00
741f94ce6c typo fixed 2016-06-16 16:21:59 -04:00
4b7e415ae7 fixing package 2016-06-16 13:18:37 -07:00
3efbb4fbde Merge remote-tracking branch 'origin/master'
# Conflicts:
#	package.json
2016-06-16 16:16:08 -04:00
4d9450dd06 getting started 2016-06-16 16:15:24 -04:00
910870e46f Edited for simpler language 2016-06-16 12:52:47 -07:00
b664df4208 0.2.168 2016-06-16 12:12:48 -07:00
c660277a23 Bump pxt-core to 0.2.180 2016-06-16 12:12:46 -07:00
0416d88d59 Merge remote-tracking branch 'origin/master' 2016-06-16 14:56:37 -04:00
4f822e3cda update 2016-06-16 14:46:48 -04:00
20d4e473ff finishing with link to projects 2016-06-16 09:50:12 -07:00
e45190922e 0.2.167 2016-06-16 08:51:37 -07:00
1df118fa19 more docs on running locally 2016-06-16 08:01:28 -07:00
8ba27ccc2d 0.2.166 2016-06-15 23:18:13 -07:00
ff646d32b5 Bump pxt-core to 0.2.179 2016-06-15 23:18:09 -07:00
75d99b324c Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-06-15 23:14:30 -07:00
ece91d980a updated bundled translations 2016-06-15 23:12:44 -07:00
a6a9f25e86 updated docs and strings 2016-06-15 22:50:23 -07:00
cc5330bf3d removed broken cross link 2016-06-15 22:22:10 -07:00
4a9e1466e6 Added Parameters section. 2016-06-15 17:56:41 -07:00
fa947036f0 Rewrote in simple language, added xrefs, etc. 2016-06-15 17:01:18 -07:00
0b0884a7eb 0.2.165 2016-06-15 16:54:16 -07:00
d5b2a21d16 Bump pxt-core to 0.2.178 2016-06-15 16:54:14 -07:00
fe28dd9b92 0.2.164 2016-06-15 16:15:51 -07:00
cfcbe8fb41 Bump pxt-core to 0.2.177 2016-06-15 16:15:48 -07:00
d86f820a57 Rewrote in simple language. Replaced screenshot. Added xrefs. 2016-06-15 15:58:35 -07:00
ace1ddb00b 0.2.163 2016-06-15 15:35:15 -07:00
96be411ba2 Bump pxt-core to 0.2.176 2016-06-15 15:35:14 -07:00
f24f7c2279 Rewrote in simple language. Streamlined. Added example. 2016-06-15 14:56:58 -07:00
0130a7753e Rewrote in simple language. Streamlined. Added cross-refs. 2016-06-15 14:14:15 -07:00
54b72ba312 reduce to 5 menu items 2016-06-15 14:04:06 -04:00
7bced60466 fix more broken links 2016-06-15 08:09:40 -04:00
041b10ef04 fix broken links 2016-06-15 07:55:19 -04:00
0e08b58f84 add basic typescript page 2016-06-15 06:31:18 -04:00
dd14489f47 0.2.162 2016-06-14 21:06:14 -07:00
6d6c2b5e99 Bump pxt-core to 0.2.173 2016-06-14 21:06:13 -07:00
251f382e8e remove old stuff 2016-06-14 22:06:55 -04:00
887a652a06 more remapping 2016-06-14 21:44:51 -04:00
bbbb1ea6bc moving stuff around 2016-06-14 21:37:55 -04:00
2c399f198a move LED namespace after music 2016-06-14 19:16:08 -04:00
54213cf554 put lessons back for Michael 2016-06-14 17:28:08 -04:00
0c67cd8e8b Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-06-14 17:21:02 -04:00
a0a23a261c restructuring to separate language from API 2016-06-14 17:20:45 -04:00
20c7a16524 Used Dimension.X in sample instead of string 2016-06-14 14:01:00 -07:00
0a722b2196 0.2.161 2016-06-14 13:57:46 -07:00
4a537b1ce8 updated bluetooth library 2016-06-14 13:57:27 -07:00
cf0372aeaa adding bluetooth button service. fix for #106 2016-06-14 13:53:05 -07:00
918d2f1a3a support for bluetooth accelerometer service. fix for #105 2016-06-14 13:47:18 -07:00
c1a6c1c66a support for magnetometer service. fix for #112 2016-06-14 13:39:24 -07:00
7a2c4f0056 updated shims 2016-06-14 13:27:21 -07:00
23eefb28d2 support for starting the temperature service #113 2016-06-14 13:24:55 -07:00
2ab2535966 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-06-14 13:18:43 -07:00
bb20c1780b Add Bluetooth LED service. fix for #111 2016-06-14 13:17:20 -07:00
764505d2ca Rewrite in simple language. Improve code examples. 2016-06-14 12:51:21 -07:00
62b6b8e9eb Second pass. Clarify API's functionality. 2016-06-14 12:12:26 -07:00
beac252620 renaming... 2016-06-14 14:39:31 -04:00
6e62acb384 fixed typo 2016-06-14 12:17:54 -04:00
b5afe25387 avatar for flashing heart 2016-06-14 12:11:29 -04:00
ebea6b29f3 added device section 2016-06-14 11:58:01 -04:00
f4eca66648 move lessons out of web site
will move select lessons back to "educators" section
2016-06-14 11:49:58 -04:00
a6e6dd8287 10 projects, first draft complete 2016-06-14 11:30:25 -04:00
d94c7e0157 lessons to projects 2016-06-14 11:12:13 -04:00
4657263abb minor mods 2016-06-14 10:55:13 -04:00
a6c2b24e8d minor change 2016-06-14 10:31:21 -04:00
31651f9a11 more work on LED screen doc 2016-06-14 10:31:21 -04:00
43c7692a8f 0.2.160 2016-06-14 06:40:57 -07:00
7f05de734c Bump pxt-core to 0.2.171 2016-06-14 06:40:55 -07:00
fe39eec686 fixing color, help of io pin service 2016-06-14 06:40:44 -07:00
655fa0fde8 updated annotations 2016-06-14 06:33:18 -07:00
2841df6950 added 'microbit-bluetooth' package 2016-06-14 06:30:07 -07:00
713dfec949 pass over LED screen 2016-06-13 21:43:01 -04:00
23c4087830 Rewrote in simple language. 2016-06-13 15:47:08 -07:00
de293be4fc Rewrote (2nd pass). Changed to . 2016-06-13 14:15:39 -07:00
4e54649ce7 Rewrote in simpler language 2016-06-13 13:39:05 -07:00
caeef2f1e1 Rewrote in simple language 2016-06-13 12:57:42 -07:00
f3d7693a26 typos 2016-06-13 14:53:08 -04:00
2ceece6cdf typos 2016-06-13 14:49:07 -04:00
c2913aea82 fix typos 2016-06-13 14:41:08 -04:00
bf90e01e7e 0.2.159 2016-06-12 06:26:57 -07:00
bbee53607b updated square image 2016-06-12 06:26:45 -07:00
e94e2e7dc4 remove references to language primitives 2016-06-12 08:16:04 -04:00
02a0839a4e typos 2016-06-11 22:37:09 -04:00
67ea6c01f2 remove linksto lessons from references 2016-06-11 22:28:57 -04:00
5b5cac878b starting to reorganize lessons 2016-06-11 22:15:36 -04:00
56301d2d6f linking in maker activities 2016-06-11 21:12:08 -04:00
f8e80e6a9d pics for music 2016-06-11 20:54:12 -04:00
d1f314d790 added compass 2016-06-11 19:43:54 -04:00
27f39b4458 move rock paper scissors to correct position 2016-06-11 18:08:05 -04:00
0c40f79dec three projects down 2016-06-11 17:12:12 -04:00
346ec3d1a6 finish second lesson 2016-06-11 14:40:09 -04:00
5a2896808e fix up pics 2016-06-10 23:39:30 -04:00
4a34edeab0 get it in the menu 2016-06-10 23:15:12 -04:00
5c2833978b name change 2016-06-10 23:10:32 -04:00
edfc2274a2 change name 2016-06-10 23:10:00 -04:00
899c9fd8d6 finish first lesson 2016-06-10 23:09:18 -04:00
13f63c2f46 Rewrote in simple language. Purged legacy example. 2016-06-10 16:13:37 -07:00
8841c47638 Rewrote in simple language. Fixed some typos. 2016-06-10 14:44:49 -07:00
c6f5a8dcc6 updated help links. fix for #90 2016-06-09 21:41:41 -07:00
786c5f9733 0.2.158 2016-06-09 21:14:54 -07:00
0cdedd02b4 updated rendering of buttons 2016-06-09 21:14:33 -07:00
aba028b1e8 Rewrote in simple language. Updated code example. 2016-06-09 18:25:59 -07:00
3049c88d5b Simulator warnings, etc. 2016-06-09 15:30:47 -07:00
8239329c2e Rewrote with simple language 2016-06-09 15:09:48 -07:00
c9d4807f25 0.2.157 2016-06-09 14:08:27 -07:00
5f4ff08c09 Bump pxt-core to 0.2.170 2016-06-09 14:08:25 -07:00
b99be68ea5 display bolts on simulator button 2016-06-09 14:08:15 -07:00
c639cc3f83 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-06-09 13:05:21 -07:00
cd56181703 Rewrote in simple language. API might not be functional. 2016-06-09 12:34:56 -07:00
5b1a807443 updated windows 10 app manifest 2016-06-09 11:49:40 -07:00
e604b27c4f various docs updates 2016-06-09 11:10:01 -07:00
4727b105c4 Rewrote in simple language. May be an obsolete API. 2016-06-08 18:14:00 -07:00
4063b5aac8 Rewrote in simple language. Deleted redundant material. 2016-06-08 16:59:20 -07:00
ee8505b4f1 0.2.156 2016-06-08 14:52:16 -07:00
ab4e2c458a Bump pxt-core to 0.2.168 2016-06-08 14:52:15 -07:00
126c236b14 New topic. Double-checked example. 2016-06-08 11:21:58 -07:00
532abadb6b 0.2.155 2016-06-07 14:35:49 -07:00
eea179e07c Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-06-07 14:21:28 -07:00
f94015803f fixing some docs on microbit-devices 2016-06-07 14:21:19 -07:00
f085253306 bundling and fixing microbit-devices 2016-06-07 14:06:13 -07:00
6de2f22542 Deleted loop around event handlers in coin flipper 2016-06-07 11:44:42 -07:00
3051e09bcf updated yotta settings for neopixel package 2016-06-07 10:53:44 -07:00
bd835a8a6e Rewrote in simple language; added examples 2016-06-06 17:29:23 -07:00
f75a034a3f Rewrote in simple language 2016-06-06 17:02:15 -07:00
71b3b6bb22 0.2.154 2016-06-06 16:38:09 -07:00
b868bd1e09 Bump pxt-core to 0.2.167 2016-06-06 16:38:06 -07:00
02e48f196c Rewritten in simple language 2016-06-06 15:41:17 -07:00
742eb7ea2f 0.2.153 2016-06-06 14:58:07 -07:00
f1904143b6 Bump pxt-core to 0.2.165 2016-06-06 14:58:05 -07:00
e621252f3b Added boolean picker / coin flipper example. 2016-06-06 14:49:36 -07:00
3633d39f57 updated readme.md 2016-06-06 10:14:56 -07:00
21bbf8fc86 css tweaks 2016-06-04 07:41:49 -07:00
dd5124f660 0.2.152 2016-06-04 00:23:34 -07:00
966ad1f503 0.2.151 2016-06-04 00:11:51 -07:00
d94f394d24 Bump pxt-core to 0.2.163 2016-06-04 00:11:50 -07:00
40ddd896cf 0.2.150 2016-06-03 23:53:51 -07:00
5a8815c4fc removed "open editor" from getting started 2016-06-03 23:51:40 -07:00
9a04eb1790 0.2.149 2016-06-03 23:40:28 -07:00
906e2a2fff Bump pxt-core to 0.2.162 2016-06-03 23:40:27 -07:00
781339026e 0.2.148 2016-06-03 23:16:45 -07:00
bd23de14e1 Merge pull request #88 from Microsoft/setpull
Setpull
2016-06-03 23:16:25 -07:00
e6ca366d20 full support for setPull 2016-06-03 23:15:51 -07:00
e2ce49d94b Merge remote-tracking branch 'origin/master' into setpull 2016-06-03 22:23:35 -07:00
e3b6350785 upgraded to lancaster 2.0.0-rc4 (core 0.1.11) 2016-06-03 22:22:13 -07:00
66aba696dc tweaks to getting started 2016-06-03 22:19:43 -07:00
5206f1f8e8 0.2.147 2016-06-03 21:10:03 -07:00
f9a7ec89e4 Bump pxt-core to 0.2.161 2016-06-03 21:09:59 -07:00
97894511dd Spot reminders to click COMPILE. 2016-06-03 15:42:18 -07:00
e785ece9bd Numerous requested changes. Still missing heads/tails. 2016-06-03 15:15:24 -07:00
63035b3d5c Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-06-03 14:25:31 -07:00
1f8ea7ad30 removed dangling link. 2016-06-03 14:24:39 -07:00
899ca47a77 Rewritten for clarity. Already has great example! 2016-06-03 14:06:24 -07:00
84f14182bf 0.2.146 2016-06-03 13:43:13 -07:00
ca3702b4fe Bump pxt-core to 0.2.159 2016-06-03 13:43:10 -07:00
94f1b6c785 0.2.145 2016-06-03 11:11:08 -07:00
c749c8b644 Bump pxt-core to 0.2.157 2016-06-03 11:11:05 -07:00
b108f1538d Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-06-03 10:35:40 -07:00
45690215dd Merge branch 'master' of https://github.com/Microsoft/pxt-microbit into setpull 2016-06-03 10:35:05 -07:00
af42dbf30a support for setpull 2016-06-03 10:34:20 -07:00
45ecd883bb fixed uploader page... 2016-06-03 10:16:22 -07:00
641a714f74 updated configuration 2016-06-03 09:47:06 -07:00
d1cd0a23a2 Nearing end of radio docs 2016-06-02 17:08:09 -07:00
54331eb113 Second pass 2016-06-02 16:24:06 -07:00
d4c53f1fb3 Extra examples and hints 2016-06-02 15:48:11 -07:00
40305c3ccd Updated to be funner (and clearer) 2016-06-02 15:25:19 -07:00
e6761699d3 added faq 2016-06-02 14:47:37 -07:00
b15f140181 0.2.144 2016-06-02 13:52:30 -07:00
00e38e202b Bump pxt-core to 0.2.156 2016-06-02 13:52:28 -07:00
4cbabcd112 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-06-02 13:11:23 -07:00
5def3518cf adding link to start rock-paper-scissor in editor 2016-06-02 13:10:47 -07:00
2c6f76e1a5 First pass 2016-06-02 12:52:03 -07:00
3eb529852b Bump pxt-core to 0.2.154 2016-06-02 12:35:18 -07:00
3b0cb40ea9 0.2.143 2016-06-02 12:33:01 -07:00
5cb3467194 Bump pxt-core to 0.2.155 2016-06-02 12:32:56 -07:00
d5628c08c8 updated getting started 2016-06-02 12:32:13 -07:00
c5c0103573 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-06-02 12:07:49 -07:00
b89d6477c7 Temporarily broken. 2016-06-02 11:38:14 -07:00
f3a6b00734 fixing localized file path 2016-06-02 09:48:40 -07:00
091fbb9db8 fixing some game content 2016-06-02 09:13:02 -07:00
3de977c98f updated naming of locale strings 2016-06-02 09:07:30 -07:00
d262dc3704 removed duplicate file 2016-06-02 08:33:21 -07:00
b2e59eb676 0.2.142 2016-06-01 21:51:03 -07:00
f2d5237d5c Bump pxt-core to 0.2.154 2016-06-01 21:51:02 -07:00
0c701a6809 more typos 2016-06-01 21:36:32 -07:00
d571ce85c1 fixing broken path 2016-06-01 21:35:37 -07:00
6fa316ff0e shrinking various images 2016-06-01 21:28:57 -07:00
1e436f4e71 more docs updates 2016-06-01 21:19:16 -07:00
d54aa41fc9 updated some lessons 2016-06-01 21:13:30 -07:00
0d90aec229 tweaks 2016-06-01 21:08:46 -07:00
98ee6899a1 renaming image files 2016-06-01 21:01:57 -07:00
c3e9ec2dc4 Merge branch 'origin/docs' 2016-06-01 20:54:57 -07:00
4cba801d78 Merge branch 'master' into origin/docs 2016-06-01 20:53:46 -07:00
a3d559c7af Rewrite for simplicity. 2016-06-01 17:11:28 -07:00
985ed56984 Fixed typo. 2016-06-01 16:29:43 -07:00
be284c5e52 0.2.141 2016-06-01 16:13:16 -07:00
d59d7cb19f Bump pxt-core to 0.2.153 2016-06-01 16:13:14 -07:00
28d522175b Second edit pass. Needs better image examples? 2016-06-01 16:02:22 -07:00
7b74428275 more glow / stop sound on player stop 2016-06-01 15:45:40 -07:00
c5571c20c7 updated release notes 2016-06-01 15:06:47 -07:00
fc97b59d0e 0.2.140 2016-06-01 13:36:58 -07:00
8417d10ad3 Bump pxt-core to 0.2.152 2016-06-01 13:36:56 -07:00
1a6d47a1c9 First edit pass. Please push to server. 2016-06-01 13:35:53 -07:00
d74702353f 0.2.139 2016-06-01 09:11:55 -07:00
53922986b1 Bump pxt-core to 0.2.149 2016-06-01 09:11:53 -07:00
230de475d1 0.2.138 2016-06-01 08:52:21 -07:00
9b1d2085ba Bump pxt-core to 0.2.148 2016-06-01 08:52:20 -07:00
246d81ffd5 0.2.137 2016-06-01 08:13:26 -07:00
3b2729d9d8 0.2.136 2016-06-01 07:42:41 -07:00
571ae8337f Bump pxt-core to 0.2.147 2016-06-01 07:42:39 -07:00
cc2d18b969 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-06-01 07:42:37 -07:00
fd02bd9407 updated docs menu 2016-06-01 07:42:03 -07:00
6429b57081 Improve docs (terminology, hyperlinks). 2016-05-31 17:17:36 -07:00
5650f7dc35 Finishing pass on send/receive number. Examples distributed more sensibly. 2016-05-31 17:02:22 -07:00
a9cfe83bdf Target=kids so removing all 'Important Security Considerations' for now. 2016-05-31 12:06:03 -07:00
f9409b5fb5 Mailbot example works now. 2016-05-31 11:44:20 -07:00
7f9f14df18 rename 2016-05-27 21:40:59 -07:00
a383060b4d Improved examples; last one needs work. 2016-05-27 16:22:38 -07:00
04c8221b41 0.2.135 2016-05-27 14:48:59 -07:00
facea7d27d Bump pxt-core to 0.2.146 2016-05-27 14:48:57 -07:00
cfe65569ad Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-05-27 14:48:56 -07:00
7a0ad8e3ed disabling source maps 2016-05-27 14:16:47 -07:00
4fb10faec2 Radio send/receive string. Rewrote text. Updated examples. 2016-05-27 12:03:54 -07:00
f3463b5961 refactor strings.json generation for packages 2016-05-27 09:23:47 -07:00
f39703e6f7 refreshed docs 2016-05-27 08:55:40 -07:00
74b333dee4 various small updates to docs 2016-05-27 07:06:24 -07:00
466bda468f update instructions 2016-05-26 21:38:11 -07:00
f4afa773ad missing images blocks 2016-05-26 20:42:15 -07:00
21280f41bc updated random boolean color 2016-05-26 19:55:25 -07:00
41c7053f3f added math.randomBoolean 2016-05-26 19:49:38 -07:00
1a00fded98 final vidoe cleanup 2016-05-26 19:33:26 -07:00
304ef89a1d 0.2.134 2016-05-26 19:30:45 -07:00
433b2bb08d Bump pxt-core to 0.2.145 2016-05-26 19:30:43 -07:00
273e23095b Merged. 2016-05-26 16:52:33 -07:00
8af6d640d3 Exhaustive rewrite. Did not change code much. 2016-05-26 16:18:33 -07:00
5553fb93bb removing videos from docs 2016-05-26 15:24:10 -07:00
493f76eba7 removed video from rps 2016-05-26 15:10:46 -07:00
91b90bf70e 0.2.133 2016-05-26 12:49:32 -07:00
43adfa198f Bump pxt-core to 0.2.143 2016-05-26 12:49:30 -07:00
59f7d0b537 update logo 2016-05-26 12:27:05 -07:00
f3bfe3d94e 0.2.132 2016-05-26 11:15:56 -07:00
ed54ace797 Bump pxt-core to 0.2.141 2016-05-26 11:15:16 -07:00
0648e80131 added serial.redirect 2016-05-26 11:07:09 -07:00
ce9a83ff28 0.2.131 2016-05-26 09:15:26 -07:00
54439bba4d Bump pxt-core to 0.2.140 2016-05-26 09:15:22 -07:00
23a581c899 added rock-paper-scissors page 2016-05-26 09:15:10 -07:00
3f8fa4b05b 0.2.130 2016-05-25 10:53:55 -07:00
53ab8651bd Bump pxt-core to 0.2.139 2016-05-25 10:53:52 -07:00
87300be648 updated starter template 2016-05-24 22:18:33 -07:00
d0a7df7f36 0.2.129 2016-05-24 21:57:47 -07:00
1c8fa5eab6 move pins->map up in block list 2016-05-24 21:39:57 -07:00
d8c2d697b1 Merge pull request #75 from gbaman/master
Add few more radio documentation pages
2016-05-24 21:21:00 -07:00
2ede815535 Add write-value-to-serial documentation 2016-05-25 02:58:27 +01:00
a67f16a860 Deleted redundant paragraph. 2016-05-24 18:27:14 -07:00
819ab9aa9a Add receive-string documentation page 2016-05-25 02:23:33 +01:00
318ffde27f Add send-string documentation page 2016-05-25 01:53:13 +01:00
525e59ae4f Heavy rewrite; added Fahrenheit example too for US. 2016-05-24 17:51:10 -07:00
ab087b4afa Add set-transmit-power documentation page 2016-05-25 01:40:01 +01:00
3b8ae69a6c Rewrite of text and examples. 2016-05-24 15:36:04 -07:00
8de6605112 0.2.128 2016-05-24 14:32:27 -07:00
daea493dcb Bump pxt-core to 0.2.138 2016-05-24 14:32:11 -07:00
b290692334 using pxt constant to find binary .hex 2016-05-24 14:06:25 -07:00
f25f295d0c 0.2.127 2016-05-24 13:03:06 -07:00
5fd691ef92 Bump pxt-core to 0.2.137 2016-05-24 13:03:04 -07:00
67c8753315 Updating loop docs 2016-05-24 12:30:31 -07:00
9d405afde0 0.2.126 2016-05-24 11:41:37 -07:00
b05c8ebd56 Bump pxt-core to 0.2.136 2016-05-24 11:41:35 -07:00
b69156a12e adding target compile service configuration 2016-05-24 09:46:33 -07:00
961e2cb6e9 Simple language rewrite. Needs new code example; legacy one broken. 2016-05-23 18:02:40 -07:00
924d31a211 Simple language for short topic. 2016-05-23 17:21:36 -07:00
8721b54679 Pretty thoroughly rewritten in simple language. 2016-05-23 16:21:08 -07:00
e99292d008 Minor clarification 2016-05-23 14:46:11 -07:00
cc1ed10efb pics for the 10 activities 2016-05-23 17:39:44 -04:00
b48c11d380 Simpler language; added another (simpler) example. 2016-05-23 13:41:01 -07:00
3f1602f2c0 Simpler language, more interesting example (running time was always 0). 2016-05-23 12:45:14 -07:00
324fd45fb6 Rewriting play-tone for correctness & clarity. 2016-05-23 11:50:08 -07:00
d1a3892eab Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-05-21 08:25:16 -07:00
28d28eb67f Rewrite text, code sample. 2016-05-20 18:33:31 -07:00
a67164d5e6 Making another topic easier to understand. 2016-05-20 16:05:45 -07:00
86b35ae88d Absolutely necessary tiny tweak. 2016-05-20 15:36:37 -07:00
919c8fdfca Rewrite in simple English, debug the examples. 2016-05-20 15:33:15 -07:00
4abdb28a59 More simple English docs. 2016-05-20 13:24:27 -07:00
21361708ec Rest of Basic in simple English. Reconsider some code samples? 2016-05-20 13:09:18 -07:00
4e56342e52 updated docs 2016-05-20 05:40:54 -07:00
7273354944 support for 3g/6g gestures 2016-05-20 05:39:44 -07:00
9c96591edd 0.2.125 2016-05-19 23:21:16 -07:00
4f38658d74 Bump pxt-core to 0.2.131 2016-05-19 23:21:14 -07:00
6329a79ce1 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-05-19 23:19:17 -07:00
befbdd32cc Four rewrites of basic.* API pages in simple English. 2016-05-19 16:50:02 -07:00
44688ee5d5 missing simulator function for serial 2016-05-19 14:50:02 -07:00
cc36bae97d Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-05-19 13:56:28 -07:00
c65bdb34af various docs updates 2016-05-19 13:56:24 -07:00
21f7ef9b55 Simplified (but not oversimplified) show-string docs. Proposed new reference format. 2016-05-19 13:49:26 -07:00
d7250d54f8 Simplified (but not oversimplified) show-string docs. Proposed new reference format. 2016-05-19 13:46:02 -07:00
9a36a2fc05 removing serial event (not supported in DAL) 2016-05-19 13:39:28 -07:00
539357237f 0.2.124 2016-05-19 12:37:54 -07:00
35d59da17e Bump pxt-core to 0.2.130 2016-05-19 12:37:52 -07:00
0b226bc9aa updated category colors theme 2016-05-19 11:59:57 -07:00
f2bab5d122 missing async annotation on serial 2016-05-19 10:53:48 -07:00
6e6a98559c updated setup instructions 2016-05-19 10:34:24 -07:00
217fce953d Table of contents proof of concept 2016-05-18 15:57:43 -07:00
bfac2910da tentative serial fix for #66 2016-05-18 11:57:10 -07:00
5962c28b0e Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-05-18 11:30:38 -07:00
d3509a6254 Test docs tweak 2016-05-18 11:28:15 -07:00
df91bf234c adding side menu 2016-05-18 11:15:00 -07:00
2a46935f62 better startup instructions 2016-05-18 09:18:14 -07:00
5e024c6f23 added test package 2016-05-17 10:42:44 -07:00
28b3d823b2 0.2.123 2016-05-17 10:28:46 -07:00
b7c9bc7978 fixing test suite 2016-05-17 10:28:26 -07:00
52b2ee3f4c 0.2.122 2016-05-17 09:59:06 -07:00
263cc25633 updated docs 2016-05-17 09:58:51 -07:00
2e3d875b7d added serial events 2016-05-17 09:36:01 -07:00
7704ad9f8d doc updates 2016-05-17 09:35:55 -07:00
845d7a004c updated docs 2016-05-16 22:18:58 -07:00
1cf070d649 changed starting template 2016-05-16 22:04:41 -07:00
24420a2cc4 0.2.121 2016-05-16 21:52:35 -07:00
2f8b61998b bringing back triangles / logo on simulator 2016-05-16 21:48:54 -07:00
af38071c6a 0.2.120 2016-05-16 16:25:04 -07:00
89f09c7f35 added pins->on pulsed 2016-05-16 16:24:44 -07:00
a667467bbd 0.2.119 2016-05-13 06:25:57 -07:00
ada2583e17 removing browserconfig.xml / favicon.ico until cloud supports it 2016-05-13 06:18:15 -07:00
c04538313d 0.2.118 2016-05-13 05:44:48 -07:00
1039dc560e Bump pxt-core to 0.2.129 2016-05-13 05:44:46 -07:00
957c7ad848 0.2.117 2016-05-13 05:08:07 -07:00
5e7351a481 Bump pxt-core to 0.2.127 2016-05-13 05:08:05 -07:00
f0c089373b updated mobile icons 2016-05-13 04:55:28 -07:00
879a85bdbb exposing i2c blocks in pins 2016-05-13 03:38:52 -07:00
7a9c2e0fe4 0.2.116 2016-05-12 22:23:46 -07:00
9656c1159a Bump pxt-core to 0.2.125 2016-05-12 22:23:45 -07:00
801117d6b0 remove head from simulator 2016-05-12 22:23:23 -07:00
c084bff334 remove logo in simulator 2016-05-12 21:56:22 -07:00
18bf35f179 updated camp 2016-05-12 13:56:03 -07:00
7e7dc91947 updated camp 2016-05-12 13:50:27 -07:00
da79f643dc 0.2.115 2016-05-12 13:41:34 -07:00
ea10cde3eb added camp 2016-05-12 13:41:15 -07:00
0a60b0ee37 0.2.114 2016-05-12 12:37:57 -07:00
b4bc985068 upgraded to lancaster 2.0.0.rc3 (core 0.1.9)
added radio.send/receive string
2016-05-12 12:35:40 -07:00
d4a55bd53d update seismograph 2016-05-12 11:55:10 -07:00
2b8d8f7b44 update seis challenge 2016-05-12 10:44:12 -07:00
8b2037f51d update seis challenge 2016-05-12 10:40:41 -07:00
1477fc4bed update seis challenge 2016-05-12 10:36:35 -07:00
e4badc18b8 udpate seis change 2016-05-12 09:44:32 -07:00
625d4de530 update seis challenge 2016-05-12 09:41:54 -07:00
a3cf104185 update challenge 2016-05-12 09:02:02 -07:00
608f2d8f82 update seis challenge 2016-05-12 09:01:05 -07:00
8f9ac35d70 update seis 2016-05-12 08:49:25 -07:00
ce18ddbb70 update seis challenge 2016-05-12 08:48:10 -07:00
ac64cbb8c5 update seis activity 2016-05-11 16:35:13 -07:00
706c51c99c update seis challenge 2016-05-11 15:59:19 -07:00
7fa88249d6 update seis challenge 2016-05-11 15:53:47 -07:00
5c735e839e update seis lesson 2016-05-11 15:35:24 -07:00
19752b01b6 seismograph challenge 2016-05-11 15:31:51 -07:00
4192eeb413 update seis challenge 2016-05-11 15:29:47 -07:00
87c63959cf update challenge 2016-05-11 15:28:14 -07:00
79ee825926 update seis challenge 2016-05-11 15:21:11 -07:00
20dbcfd203 updated challenge 2016-05-11 15:19:05 -07:00
993952cbe9 update seis challenge 2016-05-11 15:10:07 -07:00
90a8bdcea1 update seis challenge 2016-05-11 15:01:44 -07:00
b9cff5a5e9 seis challenge 2016-05-11 14:52:25 -07:00
638594bb5e update seis activity 2016-05-11 14:16:37 -07:00
d3b5809fe7 update seis acti 2016-05-11 14:11:22 -07:00
365f5dcecf Merge remote-tracking branch 'refs/remotes/origin/master' into docs 2016-05-11 13:39:05 -07:00
4c9982051e update activity 2016-05-11 13:36:36 -07:00
655c9c4431 update seis activity 2016-05-11 13:28:13 -07:00
e328c22a2d update seis activity 2016-05-11 13:24:57 -07:00
dc9eb26038 update seis activity 2016-05-11 12:34:00 -07:00
3971bb5fc1 update seis activity 2016-05-11 12:24:58 -07:00
acfdfd3668 update seis activity 2016-05-11 12:21:39 -07:00
35edde573e seis activity 2016-05-11 12:20:01 -07:00
6d21e28360 update seis activity 2016-05-11 12:08:19 -07:00
f636a7e37f update seis activity 2016-05-11 12:07:12 -07:00
78f9af5bc2 0.2.113 2016-05-11 12:05:13 -07:00
c15c3255ef seis activity 2016-05-11 11:57:30 -07:00
7f64328079 update seis activity 2016-05-11 11:51:52 -07:00
e9410d17a6 0.2.112 2016-05-11 11:42:51 -07:00
ca8ef260d5 Bump pxt-core to 0.2.124 2016-05-11 11:42:49 -07:00
b19d7a5b7b update seismograph activity 2016-05-11 11:42:21 -07:00
5ea5e9bb5b added accent color 2016-05-11 11:39:45 -07:00
8322310640 update seis activity 2016-05-11 11:12:39 -07:00
8f6577f029 update seis activity 2016-05-11 11:11:46 -07:00
a64b3e2b09 update seis activity 2016-05-11 11:10:55 -07:00
95ed3f419b update seismograph activity 2016-05-11 11:09:38 -07:00
8fcc59c9c3 update acc challenge 2016-05-11 10:40:16 -07:00
a83a7f7135 update charting 2016-05-11 10:39:19 -07:00
2f1a7e3896 Merge remote-tracking branch 'refs/remotes/origin/master' into docs 2016-05-11 09:30:54 -07:00
19c689a8c4 added microsoft logo 2016-05-11 09:18:29 -07:00
72226cd4e5 0.2.111 2016-05-11 08:49:33 -07:00
0d3af60892 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-05-11 06:46:05 -07:00
f88cda8244 added privacy/tou urls 2016-05-11 06:45:45 -07:00
f71925fdd2 Simplify logo some more 2016-05-11 15:39:20 +02:00
bfeda371a9 Add simplified logo (more suitable for small size) 2016-05-11 15:33:55 +02:00
eb09530391 Fix typo 2016-05-11 14:12:09 +02:00
346d1e77da 0.2.110 2016-05-10 21:49:16 -07:00
bf384355c4 Bump pxt-core to 0.2.122 2016-05-10 21:49:15 -07:00
3801e52370 fixed build instructions 2016-05-10 21:43:41 -07:00
99574f1ec8 added link to live editor 2016-05-10 21:43:12 -07:00
12705eed06 removed some ids 2016-05-10 21:40:39 -07:00
a62f2b00b4 updated radio apis to support key/value pair 2016-05-10 21:13:16 -07:00
b32c14937c seismograph activity 2016-05-10 16:59:57 -07:00
a5e1f84975 seismograph sync 2016-05-10 16:53:41 -07:00
6d0beb1aa3 seismograph 2016-05-10 16:48:37 -07:00
7d0101af25 marking various radio functions as debug until API is stable 2016-05-10 16:42:18 -07:00
26d92f993b update seismograph lesson 2016-05-10 16:35:00 -07:00
d4c0dddb62 seis activity 2016-05-10 15:22:27 -07:00
fa17ce43f7 update seis activity 2016-05-10 15:20:56 -07:00
b9a9abb478 update seis activity 2016-05-10 14:23:34 -07:00
ae925da409 seis activity 2016-05-10 14:05:25 -07:00
b82c3c0277 seismograph activity 2016-05-10 13:29:07 -07:00
b4ce65cdf3 seismograph act 2016-05-10 13:17:23 -07:00
db7e8b6fd4 update seis activity 2016-05-10 13:15:53 -07:00
7532cc01a2 seis activity 2016-05-10 13:10:18 -07:00
60c3f1f427 0.2.109 2016-05-10 12:41:37 -07:00
8552a2de52 fixing docs icon size 2016-05-10 12:41:20 -07:00
6725f8ef90 update seis activity 2016-05-10 12:31:22 -07:00
dea8054fbe update seis activity 2016-05-10 12:29:56 -07:00
f9cc3d2ee1 update seis activity 2016-05-10 12:28:45 -07:00
220ada6cd8 update seis activity 2016-05-10 11:56:41 -07:00
b68b12e6f1 update seis activity 2016-05-10 11:52:55 -07:00
5838c4d740 update seis activity 2016-05-10 11:47:35 -07:00
68d25e3814 update seis activity 2016-05-10 11:40:46 -07:00
06be2019a6 seis activity 2016-05-10 11:21:40 -07:00
6a742f5348 update seis activity 2016-05-10 11:08:53 -07:00
73cf802300 update seis act 2016-05-10 11:03:16 -07:00
2b71e2b834 update images lowercase 2016-05-10 11:01:27 -07:00
0442c33808 update seis activity 2016-05-10 10:54:25 -07:00
2975e6acc9 updated seis activity 2016-05-10 10:52:10 -07:00
df38904ba1 updated acc activity 2016-05-10 10:47:51 -07:00
d744e21975 update seis act 2016-05-10 10:41:36 -07:00
81c86f544c seis act 2016-05-10 09:27:36 -07:00
fa145ecd5c update act 2016-05-10 09:24:30 -07:00
cdfc99ad3f update seis act 2016-05-10 09:11:11 -07:00
f77e7b8850 update seis act 2016-05-10 09:09:30 -07:00
d71186b083 update seis act 2016-05-09 16:56:29 -07:00
852067c641 update seis act 2016-05-09 16:53:18 -07:00
7445db5707 update seis act 2016-05-09 16:51:59 -07:00
e4fd00c827 update seis act 2016-05-09 16:47:08 -07:00
5ccecc1195 update seis activity 2016-05-09 16:42:41 -07:00
cdfcd30c3c update acc activity 2016-05-09 16:41:43 -07:00
25b4f46440 update seis act 2016-05-09 16:32:06 -07:00
9f9cd6b766 update seis act 2016-05-09 16:18:10 -07:00
4dafa4d42c update seis act 2016-05-09 16:14:13 -07:00
fdff0a7f19 update act 2016-05-09 16:12:25 -07:00
a63daed690 update seis act 2016-05-09 16:10:39 -07:00
3eeaf2ca46 update seis act 2016-05-09 16:08:10 -07:00
005e002fd8 update seis act 2016-05-09 16:07:11 -07:00
b1db17fc27 sesimo update 2016-05-09 16:04:43 -07:00
a51791414c updated seismograph act 2016-05-09 16:02:22 -07:00
265dd660ef seismograph act 2016-05-09 15:50:39 -07:00
7517776492 update seismograph act 2016-05-09 15:44:49 -07:00
29b901b856 update seismograph activity 2016-05-09 15:33:57 -07:00
20637aeb29 updated activity 2016-05-09 15:20:51 -07:00
90dbc6dd08 updated lessons page 2016-05-09 14:49:53 -07:00
8f99ee3608 beautiful image tutorial 2016-05-09 14:34:51 -07:00
15bbc13595 update seismograph activity 2016-05-05 14:23:56 -07:00
cac5df56eb update activity 2016-05-05 14:00:56 -07:00
0c7f9058a7 Merge remote-tracking branch 'refs/remotes/origin/master' into docs 2016-05-05 10:13:18 -07:00
610 changed files with 10793 additions and 4016 deletions

15
.gitignore vendored
View File

@ -1,12 +1,17 @@
node_modules
yotta_modules
yotta_targets
pxt_modules
built
typings
tmp
temp
projects
win10/app/bin
win10/app/bld
win10/*.opendb
projects/**
clients/win10/app/bin
clients/win10/app/bld
clients/win10/*.opendb
clients/**/bin/**
clients/**/obj/**
*.user
*.sw?
@ -14,4 +19,4 @@ win10/*.opendb
*.tgz
*.db
*.suo
*.log
*.log

View File

@ -5,7 +5,7 @@ script:
- "node node_modules/pxt-core/built/pxt.js travis"
- "(cd libs/lang-test0; node ../../node_modules/pxt-core/built/pxt.js run)"
- "node node_modules/pxt-core/built/pxt.js uploaddoc"
- "(cd libs/hello; node ../../node_modules/pxt-core/built/pxt.js testconv ../../testconv.json)"
- "(cd libs/hello; node ../../node_modules/pxt-core/built/pxt.js testconv https://az851932.vo.msecnd.net/files/td-converter-tests-v0.json)"
sudo: false
notifications:
email:
@ -14,4 +14,5 @@ cache:
directories:
- node_modules
- built/cache
- libs/hello/built/cache

View File

@ -1,26 +1,59 @@
# micro:bit target for PXT
This target allow to program a [BBC micro:bit](https://www.microbit.co.uk/) using
[Microsoft Programming Experience Toolkit](https://github.com/Microsoft/pxt).
PXT ([Microsoft Programming Experience Toolkit](https://github.com/Microsoft/pxt)).
* [Try it live](https://codethemicrobit.com)
[![Build Status](https://travis-ci.org/Microsoft/pxt-microbit.svg?branch=master)](https://travis-ci.org/Microsoft/pxt-microbit)
# Getting started
## Local server
Please follow instructions at https://github.com/Microsoft/pxt#running-a-target-from-localhost
### Setup
The following commands are a 1-time setup after synching the repo on your machine.
* clone this repo to your computer
* install the PXT command line
```
npm install -g pxt
```
* install the dependencies
```
npm install
```
### Running
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):
```
pxt serve -yt
```
To make sure you're running the latest tools, run (add ``sudo`` for Mac/Linux shells)
```
pxt update
```
More instructions at https://github.com/Microsoft/pxt#running-a-target-from-localhost
## Universal Windows App
The Windows 10 app is a [Universal Windows Hosted Web App](https://microsoftedge.github.io/WebAppsDocs/en-US/win10/CreateHWA.htm)
that wraps m.pxt.io and provides additional features.
### Sideloading
* Open Windows **settings** and search for **Developer options**
* Enable the developer mode.
* Find the latest build under ``win10/app/AppPackages/latest`` and run the ``Add-AppDevPackage.ps1`` PowerShell script (mouse right-click, then `run with PowerShell`)
that wraps ``codethemicrobit.com`` and provides additional features.
### Building
* Install Visual Studio 2015 Update 2 or higher. Make sure the Windows 10 templates are installed.
* open the ``win10/app.sln`` solution and launch the ``codemicrobit`` project.
* open the ``win10/app.sln`` solution and launch the ``codethemicrobit`` project.
## Code of Conduct
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

26
clients/chrome/README.md Normal file
View File

@ -0,0 +1,26 @@
# microbit-chrome
Prototype chrome addon that exposes the micro:bit's serial output to webpages.
* watch the [demo video](https://vimeo.com/146207766)
# Installation
See [developer.chrome.com](https://developer.chrome.com/extensions/getstarted#unpacked)
for instructions on how to install the local version into your chrome browser.
# Requirements
* Chrome 48 or later.
# Sample page
The `demo.html` webpage goes along with the
https://github.com/Microsoft/microbit-touchdevelop/blob/master/examples/tcs34725.cpp
program. Run `http-server` from this directory, then visit
http://localhost:8080/demo.html
(keep in mind that pages served from `file://` cannot open ports).
# Building
Open a command prompt and run the following commands.
````
npm install
typings update
````

View File

@ -0,0 +1,68 @@
///<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.
var ports = [];
function byPath(path) {
return connections.filter(function (x) { return x.path == path; });
}
function byId(id) {
return connections.filter(function (x) { return x.id == id; });
}
function onReceive(data, id) {
if (ports.length == 0)
return;
var view = new DataView(data);
var decoder = new TextDecoder("utf-8");
var decodedString = decoder.decode(view);
ports.forEach(function (port) { return port.postMessage({
type: "serial",
data: decodedString,
id: id
}); });
}
function findNewDevices() {
chrome.serial.getDevices(function (serialPorts) {
serialPorts.forEach(function (serialPort) {
if (byPath(serialPort.path).length == 0 &&
serialPort.displayName == "mbed Serial Port") {
chrome.serial.connect(serialPort.path, { bitrate: 115200 }, function (info) {
// In case the [connect] operation takes more than five seconds...
if (info && byPath(serialPort.path).length == 0)
connections.push({
id: info.connectionId,
path: serialPort.path
});
});
}
});
});
}
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)) {
ports.push(port);
port.onDisconnect.addListener(function () {
ports = ports.filter(function (x) { return x != port; });
});
}
});
// When receiving data for one of the connections that we're tracking, forward
// it to all connected clients.
chrome.serial.onReceive.addListener(function (info) {
if (byId(info.connectionId).length > 0)
onReceive(info.data, info.connectionId);
});
// When it looks like we've been disconnected, drop the corresponding
// connection object from the [connections] global variable.
chrome.serial.onReceiveError.addListener(function (info) {
if (info.error == "system_error" || info.error == "disconnected" || info.error == "device_lost")
connections = connections.filter(function (x) { return x.id != info.connectionId; });
});
// Probe serial connections at regular intervals. In case we find an mbed port
// we haven't yet connected to, connect to it.
setInterval(findNewDevices, 5000);
findNewDevices();
}
document.addEventListener("DOMContentLoaded", main);

View File

@ -0,0 +1,92 @@
// A list of: {
// id: number;
// path: string;
// } where [id] is the [connectionId] (internal to Chrome) and [path] is the
// OS' name for the device (e.g. "COM4").
interface Connection {
id: string;
path: string;
}
let connections: Connection[] = [];
// 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.
let ports = [];
interface Message {
type: string;
data: string;
id: string;
}
function byPath(path: string): Connection[] {
return connections.filter((x) => x.path == path);
}
function byId(id: string): Connection[] {
return connections.filter((x) => x.id == id);
}
function onReceive(data, id: string) {
if (ports.length == 0) return;
let view = new DataView(data);
let decoder = new TextDecoder("utf-8");
let decodedString = decoder.decode(view);
ports.forEach(port => port.postMessage(<Message>{
type: "serial",
data: decodedString,
id: id,
}));
}
function findNewDevices() {
chrome.serial.getDevices(function (serialPorts) {
serialPorts.forEach(function (serialPort) {
if (byPath(serialPort.path).length == 0 &&
serialPort.displayName == "mbed Serial Port") {
chrome.serial.connect(serialPort.path, { bitrate: 115200 }, function (info) {
// In case the [connect] operation takes more than five seconds...
if (info && byPath(serialPort.path).length == 0)
connections.push({
id: info.connectionId,
path: serialPort.path
});
});
}
});
});
}
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)) {
ports.push(port);
port.onDisconnect.addListener(function () {
ports = ports.filter(function (x) { return x != port });
});
}
});
// When receiving data for one of the connections that we're tracking, forward
// it to all connected clients.
chrome.serial.onReceive.addListener(function (info) {
if (byId(info.connectionId).length > 0)
onReceive(info.data, info.connectionId);
});
// When it looks like we've been disconnected, drop the corresponding
// connection object from the [connections] global variable.
chrome.serial.onReceiveError.addListener(function (info) {
if (info.error == "system_error" || info.error == "disconnected" || info.error == "device_lost")
connections = connections.filter((x) => x.id != info.connectionId);
});
// Probe serial connections at regular intervals. In case we find an mbed port
// we haven't yet connected to, connect to it.
setInterval(findNewDevices, 5000);
findNewDevices();
}
document.addEventListener("DOMContentLoaded", main);

BIN
clients/chrome/logo128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
clients/chrome/logo48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,30 @@
{
"app": {
"background": {
"scripts": [ "background.js" ]
}
},
"manifest_version": 2,
"name": "code the micro:bit",
"version": "0.6.0",
"author": "Microsoft Corporation",
"short_name": "code the micro:bit",
"description": "Extension for https://codethemicrobit.com.",
"homepage_url": "https://codethemicrobit.com",
"offline_enabled": "true",
"icons": {
"48": "logo48.png",
"128": "logo128.png"
},
"permissions": [
"serial",
"usb"
],
"externally_connectable": {
"matches": [ "*://localhost/*", "https://codethemicrobit.com/*", "https://*.codethemicrobit.com/*" ]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

View File

@ -0,0 +1,7 @@
{
"compiler-options": {
"target": "ES5",
"module": "amd",
"sourceMap": false
}
}

View File

@ -0,0 +1,48 @@

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

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

@ -1,9 +1,9 @@
<?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.4.0" Publisher="CN=jhalleux" />
<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>codemicrobitapp</DisplayName>
<DisplayName>codethemicrobit</DisplayName>
<PublisherDisplayName>Microsoft</PublisherDisplayName>
<Logo>images\storelogo.png</Logo>
</Properties>
@ -14,12 +14,14 @@
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" StartPage="https://m.pxt.io/">
<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="m.pxt.io" Description="Code editors for the BBC micro:bit" BackgroundColor="white" Square150x150Logo="images\Square150x150Logo.png" Square44x44Logo="images\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="images\Wide310x150Logo.png" ShortName="m.pxt.io">
<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>
@ -27,7 +29,6 @@
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="microbithex">
<uap:DisplayName>BBC micro:bit binary file</uap:DisplayName>
<uap:InfoTip>.hex file created with m.pxt.io or microbit.co.uk</uap:InfoTip>
<uap:SupportedFileTypes>
<uap:FileType ContentType="application/x-microbit-hex">.hex</uap:FileType>
</uap:SupportedFileTypes>

View File

@ -0,0 +1,66 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeTheMicrobit", "Microbit.Uploader\CodeTheMicrobit.csproj", "{7DC6CA45-FD75-44BC-805E-708C812CD4BF}"
EndProject
Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "codethemicrobitapp", "..\win10\app\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
{7DC6CA45-FD75-44BC-805E-708C812CD4BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7DC6CA45-FD75-44BC-805E-708C812CD4BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7DC6CA45-FD75-44BC-805E-708C812CD4BF}.Debug|ARM.ActiveCfg = Debug|Any CPU
{7DC6CA45-FD75-44BC-805E-708C812CD4BF}.Debug|ARM.Build.0 = Debug|Any CPU
{7DC6CA45-FD75-44BC-805E-708C812CD4BF}.Debug|x64.ActiveCfg = Debug|Any CPU
{7DC6CA45-FD75-44BC-805E-708C812CD4BF}.Debug|x64.Build.0 = Debug|Any CPU
{7DC6CA45-FD75-44BC-805E-708C812CD4BF}.Debug|x86.ActiveCfg = Debug|Any CPU
{7DC6CA45-FD75-44BC-805E-708C812CD4BF}.Debug|x86.Build.0 = Debug|Any CPU
{7DC6CA45-FD75-44BC-805E-708C812CD4BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7DC6CA45-FD75-44BC-805E-708C812CD4BF}.Release|Any CPU.Build.0 = Release|Any CPU
{7DC6CA45-FD75-44BC-805E-708C812CD4BF}.Release|ARM.ActiveCfg = Release|Any CPU
{7DC6CA45-FD75-44BC-805E-708C812CD4BF}.Release|ARM.Build.0 = Release|Any CPU
{7DC6CA45-FD75-44BC-805E-708C812CD4BF}.Release|x64.ActiveCfg = Release|Any CPU
{7DC6CA45-FD75-44BC-805E-708C812CD4BF}.Release|x64.Build.0 = Release|Any CPU
{7DC6CA45-FD75-44BC-805E-708C812CD4BF}.Release|x86.ActiveCfg = Release|Any CPU
{7DC6CA45-FD75-44BC-805E-708C812CD4BF}.Release|x86.Build.0 = Release|Any CPU
{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

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0"/>
<supportedRuntime version="v2.0.50727"/>
</startup>
</configuration>

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{7DC6CA45-FD75-44BC-805E-708C812CD4BF}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.MicroBit</RootNamespace>
<AssemblyName>CodeTheMicrobit</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>
</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<DelaySign>false</DelaySign>
</PropertyGroup>
<PropertyGroup />
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Management" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Settings.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Settings.Designer.cs">
<DependentUpon>Settings.cs</DependentUpon>
</Compile>
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="KnownFolders.cs" />
<Compile Include="LicenseDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="LicenseDialog.Designer.cs">
<DependentUpon>LicenseDialog.cs</DependentUpon>
</Compile>
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SingleInstanceAppHelper.cs" />
<Compile Include="SingleInstanceAppStarter.cs" />
<EmbeddedResource Include="LicenseDialog.resx">
<DependentUpon>LicenseDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="Settings.resx">
<DependentUpon>Settings.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="MSFT_logo_png.png" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="Resources\MSR-LA - 2576.rtf" />
</ItemGroup>
<ItemGroup>
<Content Include="favicon.ico" />
<EmbeddedResource Include="microbit.red.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,33 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Management;
using System.Runtime.InteropServices;
using System.Security;
namespace Microsoft.MicroBit
{
/// <summary>
/// Class containing methods to retrieve specific file system paths.
/// </summary>
internal static class KnownFoldersNativeMethods
{
[SecurityCritical]
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
public static string GetDownloadPath()
{
IntPtr outPath;
int result = SHGetKnownFolderPath(new Guid("{374DE290-123F-4565-9164-39C4925E467B}"), 0x00004000, new IntPtr(0), out outPath);
if (result >= 0)
return Marshal.PtrToStringUni(outPath);
else return null;
}
[SuppressMessage("Microsoft.Security", "CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule")]
[DllImport("Shell32.dll")]
[SecurityCritical]
private static extern int SHGetKnownFolderPath(
[MarshalAs(UnmanagedType.LPStruct)]Guid rfid, uint dwFlags, IntPtr hToken,
out IntPtr ppszPath);
}
}

View File

@ -0,0 +1,93 @@
namespace Microsoft.MicroBit
{
partial class LicenseDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.textBox = new System.Windows.Forms.RichTextBox();
this.acceptButton = new System.Windows.Forms.Button();
this.exitButton = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// textBox
//
this.textBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox.Location = new System.Drawing.Point(13, 13);
this.textBox.Name = "textBox";
this.textBox.ReadOnly = true;
this.textBox.Size = new System.Drawing.Size(465, 438);
this.textBox.TabIndex = 0;
this.textBox.Text = "";
//
// acceptButton
//
this.acceptButton.Location = new System.Drawing.Point(322, 457);
this.acceptButton.Name = "acceptButton";
this.acceptButton.Size = new System.Drawing.Size(75, 23);
this.acceptButton.TabIndex = 1;
this.acceptButton.Text = "Accept";
this.acceptButton.UseVisualStyleBackColor = true;
this.acceptButton.Click += new System.EventHandler(this.acceptButton_Click);
//
// exitButton
//
this.exitButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.exitButton.Location = new System.Drawing.Point(403, 457);
this.exitButton.Name = "exitButton";
this.exitButton.Size = new System.Drawing.Size(75, 23);
this.exitButton.TabIndex = 2;
this.exitButton.Text = "Exit";
this.exitButton.UseVisualStyleBackColor = true;
this.exitButton.Click += new System.EventHandler(this.exitButton_Click);
//
// LicenseDialog
//
this.AcceptButton = this.acceptButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.exitButton;
this.ClientSize = new System.Drawing.Size(490, 492);
this.ControlBox = false;
this.Controls.Add(this.exitButton);
this.Controls.Add(this.acceptButton);
this.Controls.Add(this.textBox);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "LicenseDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "code the micro:bit terms of use";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.RichTextBox textBox;
private System.Windows.Forms.Button acceptButton;
private System.Windows.Forms.Button exitButton;
}
}

View File

@ -0,0 +1,32 @@
using Microsoft.MicroBit.Properties;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Microsoft.MicroBit
{
public partial class LicenseDialog : Form
{
public LicenseDialog()
{
InitializeComponent();
this.textBox.Rtf = Resources.MSR_LA___2576;
}
private void acceptButton_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Yes;
this.Close();
}
private void exitButton_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.No;
this.Close();
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@ -0,0 +1,173 @@
namespace Microsoft.MicroBit
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.statusLabel = new System.Windows.Forms.Label();
this.backgroundPictureBox = new System.Windows.Forms.PictureBox();
this.trayIcon = new System.Windows.Forms.NotifyIcon(this.components);
this.versionLabel = new System.Windows.Forms.LinkLabel();
this.label1 = new System.Windows.Forms.Label();
this.SettingsLabel = new System.Windows.Forms.LinkLabel();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
((System.ComponentModel.ISupportInitialize)(this.backgroundPictureBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// statusLabel
//
this.statusLabel.BackColor = System.Drawing.SystemColors.Window;
this.statusLabel.Font = new System.Drawing.Font("Consolas", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.statusLabel.Location = new System.Drawing.Point(11, 30);
this.statusLabel.Name = "statusLabel";
this.statusLabel.Size = new System.Drawing.Size(364, 23);
this.statusLabel.TabIndex = 1;
this.statusLabel.Text = "loading...";
//
// backgroundPictureBox
//
this.backgroundPictureBox.BackColor = System.Drawing.Color.White;
this.backgroundPictureBox.Cursor = System.Windows.Forms.Cursors.Hand;
this.backgroundPictureBox.Image = global::Microsoft.MicroBit.Properties.Resources.MSFT_logo_png;
this.backgroundPictureBox.InitialImage = null;
this.backgroundPictureBox.Location = new System.Drawing.Point(226, 91);
this.backgroundPictureBox.Name = "backgroundPictureBox";
this.backgroundPictureBox.Size = new System.Drawing.Size(149, 52);
this.backgroundPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.backgroundPictureBox.TabIndex = 0;
this.backgroundPictureBox.TabStop = false;
this.backgroundPictureBox.Click += new System.EventHandler(this.backgroundPictureBox_Click);
//
// trayIcon
//
this.trayIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("trayIcon.Icon")));
this.trayIcon.Visible = true;
this.trayIcon.Click += new System.EventHandler(this.trayIcon_Click);
//
// versionLabel
//
this.versionLabel.AutoSize = true;
this.versionLabel.Location = new System.Drawing.Point(12, 121);
this.versionLabel.Name = "versionLabel";
this.versionLabel.Size = new System.Drawing.Size(28, 13);
this.versionLabel.TabIndex = 2;
this.versionLabel.TabStop = true;
this.versionLabel.Text = "v0.9";
this.versionLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.versionLabel_LinkClicked);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(12, 103);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(169, 15);
this.label1.TabIndex = 3;
this.label1.Text = "Automatic upload of .hex files.";
//
// SettingsLabel
//
this.SettingsLabel.AutoSize = true;
this.SettingsLabel.Location = new System.Drawing.Point(151, 121);
this.SettingsLabel.Name = "SettingsLabel";
this.SettingsLabel.Size = new System.Drawing.Size(43, 13);
this.SettingsLabel.TabIndex = 4;
this.SettingsLabel.TabStop = true;
this.SettingsLabel.Text = "settings";
this.SettingsLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.SettingsLabel_LinkClicked);
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.White;
this.pictureBox1.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBox1.Image = global::Microsoft.MicroBit.Properties.Resources.microbit_red;
this.pictureBox1.InitialImage = null;
this.pictureBox1.Location = new System.Drawing.Point(226, 6);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(149, 79);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 5;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
//
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.Location = new System.Drawing.Point(62, 121);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(60, 13);
this.linkLabel1.TabIndex = 6;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "open editor";
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(388, 143);
this.Controls.Add(this.linkLabel1);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.SettingsLabel);
this.Controls.Add(this.label1);
this.Controls.Add(this.versionLabel);
this.Controls.Add(this.statusLabel);
this.Controls.Add(this.backgroundPictureBox);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "MainForm";
this.ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "code the micro:bit";
this.Load += new System.EventHandler(this.MainForm_Load);
((System.ComponentModel.ISupportInitialize)(this.backgroundPictureBox)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.PictureBox backgroundPictureBox;
private System.Windows.Forms.Label statusLabel;
private System.Windows.Forms.NotifyIcon trayIcon;
private System.Windows.Forms.LinkLabel versionLabel;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.LinkLabel SettingsLabel;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.LinkLabel linkLabel1;
}
}

View File

@ -0,0 +1,267 @@
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Security;
using System.Threading;
using System.Windows.Forms;
namespace Microsoft.MicroBit
{
internal partial class MainForm : Form
{
FileSystemWatcher watcher;
private string customcopypath = "";
public MainForm()
{
InitializeComponent();
var v = typeof(MainForm).Assembly.GetName().Version;
this.versionLabel.Text = "v" + v.Major + "." + v.Minor;
}
private void MainForm_Load(object sender, EventArgs e)
{
this.initializeFileWatch();
customcopypath = (string)Application.UserAppDataRegistry.GetValue("CustomDirectory", "");
this.openEditor();
}
private void openEditor()
{
// lanch editor
try { Process.Start("https://codethemicrobit.com"); } catch (Exception) { }
}
private void initializeFileWatch()
{
if (!checkTOU()) return;
var downloads = KnownFoldersNativeMethods.GetDownloadPath();
if (downloads == null)
{
this.updateStatus("oops, can't find the `Downloads` folder");
return;
}
this.watcher = new FileSystemWatcher(downloads);
this.watcher.Renamed += (sender, e) => this.handleFileEvent(e);
this.watcher.Created += (sender, e) => this.handleFileEvent(e);
this.watcher.EnableRaisingEvents = true;
this.waitingForHexFileStatus();
}
private void waitingForHexFileStatus()
{
this.updateStatus("waiting for .hex file...");
this.trayIcon.ShowBalloonTip(3000, "ready...", "waiting for .hex file...", ToolTipIcon.None);
}
static bool checkTOU()
{
var v = (int)Application.UserAppDataRegistry.GetValue("TermOfUse", 0);
if (v != 1)
{
using (var f = new LicenseDialog())
{
var r = f.ShowDialog();
if (r != DialogResult.Yes)
{
Application.Exit();
return false;
}
}
Application.UserAppDataRegistry.SetValue("TermOfUse", 1, RegistryValueKind.DWord);
}
return true;
}
delegate void Callback();
private void updateStatus(string value)
{
Callback a = (Callback)(() =>
{
this.statusLabel.Text = value;
this.trayIcon.Text = value;
});
this.Invoke(a);
}
void handleFileEvent(FileSystemEventArgs e)
{
this.handleFile(e.FullPath);
}
volatile int copying;
void handleFile(string fullPath)
{
try
{
// In case this is data-url download, at least Chrome will not rename file, but instead write to it
// directly. This mean we may catch it in the act. Let's leave it some time to finish writing.
Thread.Sleep(500);
var info = new System.IO.FileInfo(fullPath);
Trace.WriteLine("download: " + info.FullName);
if (info.Extension != ".hex") return;
var infoName = info.Name;
Trace.WriteLine("download name: " + info.Name);
if (!infoName.StartsWith("microbit-", StringComparison.OrdinalIgnoreCase)) return;
if (info.Name.EndsWith(".uploaded.hex", StringComparison.OrdinalIgnoreCase)) return;
if (info.Length > 1000000) return; // make sure we don't try to copy large files
// already copying?
if (Interlocked.Exchange(ref this.copying, 1) == 1)
return;
try
{
var driveletters = getMicrobitDrives();
List<String> drives = new List<String>();
foreach (var d in driveletters)
{
drives.Add(d.RootDirectory.FullName);
}
if (!String.IsNullOrEmpty(customcopypath) && Directory.Exists(customcopypath))
{
drives.Add(customcopypath);
}
if (drives.Count == 0)
{
this.updateStatus("no board found");
this.trayIcon.ShowBalloonTip(3000, "cancelled uploading...", "no board found", ToolTipIcon.None);
return;
}
this.updateStatus("uploading .hex file");
this.trayIcon.ShowBalloonTip(3000, "uploading...", "uploading .hex file", ToolTipIcon.None);
// copy to all boards
copyFirmware(info.FullName, drives);
// move away hex file
var temp = System.IO.Path.ChangeExtension(info.FullName, ".uploaded.hex");
try
{
File.Copy(info.FullName, temp, true);
File.Delete(info.FullName);
}
catch (IOException) { }
catch (NotSupportedException) { }
catch (UnauthorizedAccessException) { }
catch (ArgumentException) { }
// update ui
this.updateStatus("uploading done");
this.waitingForHexFileStatus();
}
finally
{
Interlocked.Exchange(ref this.copying, 0);
}
}
catch (IOException) { }
catch (NotSupportedException) { }
catch (UnauthorizedAccessException) { }
catch (ArgumentException) { }
}
static void copyFirmware(string file, List<string> drives)
{
var waitHandles = new List<WaitHandle>();
foreach (var drive in drives)
{
var ev = new AutoResetEvent(false);
waitHandles.Add(ev);
ThreadPool.QueueUserWorkItem((state) =>
{
try
{
var trg = System.IO.Path.Combine(drive, "firmware.hex");
File.Copy(file, trg, true);
}
catch (IOException) { }
catch (NotSupportedException) { }
catch (UnauthorizedAccessException) { }
catch (ArgumentException) { }
ev.Set();
}, ev);
}
//waits for all the threads (waitHandles) to call the .Set() method
//and inform that the execution has finished.
WaitHandle.WaitAll(waitHandles.ToArray());
}
static DriveInfo[] getMicrobitDrives()
{
var drives = System.IO.DriveInfo.GetDrives();
var r = new System.Collections.Generic.List<DriveInfo>();
foreach (var di in drives)
{
var label = getVolumeLabel(di);
if (label.StartsWith("MICROBIT", StringComparison.Ordinal))
r.Add(di);
}
return r.ToArray();
}
static string getVolumeLabel(DriveInfo di)
{
try { return di.VolumeLabel; }
catch (IOException) { }
catch (SecurityException) { }
catch (UnauthorizedAccessException) { }
return "";
}
private void trayIcon_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
this.WindowState = FormWindowState.Normal;
this.Show();
this.Activate();
}
private void versionLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
try
{
Process.Start("https://codethemicrobit.com/uploader");
}
catch (IOException) { }
}
private void backgroundPictureBox_Click(object sender, EventArgs e)
{
this.openEditor();
}
private void SettingsLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
var settings = new Settings(customcopypath);
settings.ShowDialog();
customcopypath = settings.CustomCopyPath;
Application.UserAppDataRegistry.SetValue("CustomDirectory", customcopypath, RegistryValueKind.String);
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
this.openEditor();
}
private void pictureBox1_Click(object sender, EventArgs e)
{
this.openEditor();
}
}
}

View File

@ -0,0 +1,172 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="trayIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="trayIcon.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAEBAAAAAAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAMIOAADCDgAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAN6bIZTOkxoUtj62FL5W1hTWpzYUvlbWFLY+thTKgwoUxnb+FLY6shS6TsoUzpMaFL5a1hS2P
rYUxnb6FNZ2+ZTCTsvkriaf/KYKe/yuIpf8uk7L/K4il/ymBnP8tjqz/K4qn/yiBnP8qhaL/KoWh/yqG
o/8ogJv/JXeQ/yqDnvkRMjz/Di02/wofJv8MJS3/Di02/wskLP8HGB3/Di43/w0qM/8HFxz/CyMr/w4s
Nv8MJi7/CiAm/w4sNv8RMTv/BQsN/wUQE/8BAgL/AQQF/wYRFP8EBgf/AgIA/xAYJv8TGy3/AgIA/wMF
Bv8HEhX/AQUG/wECAv8FEBT/BQsN/wYFD/8LByT/AQAC/wAAAP8CAgL/AwMD/woKEv8LCxT/DAwY/woK
Ev8DAwT/AgIC/wAAAP8AAAD/AAAA/wICAv8JCA//IBs//wwMEP8AAAD/AgIC/wQEBv8bGzf/BgYK/wQE
Bf8bGzj/BgYJ/wMDA/8AAAD/CgoK/xEREf8HBwf/Li4u/1FRUf9ERET/AQEA/wwMGf8UFCj/BAQE/wMD
Av8DAwL/BAQE/xAQIP8RESL/AAAA/z8/P/9SUlH/NTU1/y4uLv9QUFD/QUFB/wEBAP8LCxf/EhIk/wIC
Af8JCRH/CwsV/wICAf8PDx3/Dw8f/wAAAP89PT3/UVFQ/zQ0M/8FBQX/DAwM/wgICP8AAAD/CwsW/xIS
JP8FBQb/Dg4b/xERIv8FBQb/Dw8d/w8PHv8AAAD/CAgK/xwXO/8KCRT/BAMI/wAAAP8AAAD/AAAA/wIC
Av8EBAX/HR06/wgIEP8GBgv/HR07/wYGCf8DAwL/AAAA/wAAAP8JBh3/BwUS/y0fhf8FBBD/AAAA/wAA
AP8AAAD/AAAA/xIOMv8fFVz/HhVa/xQPOP8AAQD/AAAA/wAAAP8AAAD/AAAA/wICAv9UO/v/MiKX/wUD
D/8FAw7/AwIK/wAAAP8RCzP/IBZi/yAWYP8TDTr/AAAA/wAAAP8AAAD/AAAA/wAAAP8CAgL/VTz/+FQ6
/P8yI5j/IBZg/ywehf8MCCX/BAMN/wUEEP8GBBH/AQED/wAAAP8AAAD/AAAA/wAAAP8AAAD/AgIC9Vc+
/2BVOv9+Ujj0fTwptH5ONul9OCapfRUOPn4AAAB+AAAAfQAAAH4AAAB+AAAAfQAAAH4AAAB+AAAAfgQE
BFkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAA//8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAA//8AAA==
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAEBAAAAAAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAMIOAADCDgAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAN6bIZTOkxoUtj62FL5W1hTWpzYUvlbWFLY+thTKgwoUxnb+FLY6shS6TsoUzpMaFL5a1hS2P
rYUxnb6FNZ2+ZTCTsvkriaf/KYKe/yuIpf8uk7L/K4il/ymBnP8tjqz/K4qn/yiBnP8qhaL/KoWh/yqG
o/8ogJv/JXeQ/yqDnvkRMjz/Di02/wofJv8MJS3/Di02/wskLP8HGB3/Di43/w0qM/8HFxz/CyMr/w4s
Nv8MJi7/CiAm/w4sNv8RMTv/BQsN/wUQE/8BAgL/AQQF/wYRFP8EBgf/AgIA/xAYJv8TGy3/AgIA/wMF
Bv8HEhX/AQUG/wECAv8FEBT/BQsN/wYFD/8LByT/AQAC/wAAAP8CAgL/AwMD/woKEv8LCxT/DAwY/woK
Ev8DAwT/AgIC/wAAAP8AAAD/AAAA/wICAv8JCA//IBs//wwMEP8AAAD/AgIC/wQEBv8bGzf/BgYK/wQE
Bf8bGzj/BgYJ/wMDA/8AAAD/CgoK/xEREf8HBwf/Li4u/1FRUf9ERET/AQEA/wwMGf8UFCj/BAQE/wMD
Av8DAwL/BAQE/xAQIP8RESL/AAAA/z8/P/9SUlH/NTU1/y4uLv9QUFD/QUFB/wEBAP8LCxf/EhIk/wIC
Af8JCRH/CwsV/wICAf8PDx3/Dw8f/wAAAP89PT3/UVFQ/zQ0M/8FBQX/DAwM/wgICP8AAAD/CwsW/xIS
JP8FBQb/Dg4b/xERIv8FBQb/Dw8d/w8PHv8AAAD/CAgK/xwXO/8KCRT/BAMI/wAAAP8AAAD/AAAA/wIC
Av8EBAX/HR06/wgIEP8GBgv/HR07/wYGCf8DAwL/AAAA/wAAAP8JBh3/BwUS/y0fhf8FBBD/AAAA/wAA
AP8AAAD/AAAA/xIOMv8fFVz/HhVa/xQPOP8AAQD/AAAA/wAAAP8AAAD/AAAA/wICAv9UO/v/MiKX/wUD
D/8FAw7/AwIK/wAAAP8RCzP/IBZi/yAWYP8TDTr/AAAA/wAAAP8AAAD/AAAA/wAAAP8CAgL/VTz/+FQ6
/P8yI5j/IBZg/ywehf8MCCX/BAMN/wUEEP8GBBH/AQED/wAAAP8AAAD/AAAA/wAAAP8AAAD/AgIC9Vc+
/2BVOv9+Ujj0fTwptH5ONul9OCapfRUOPn4AAAB+AAAAfQAAAH4AAAB+AAAAfQAAAH4AAAB+AAAAfgQE
BFkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAA//8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAA//8AAA==
</value>
</data>
</root>

View File

@ -0,0 +1,30 @@
using Microsoft.VisualBasic.ApplicationServices;
using System;
using System.Windows.Forms;
namespace Microsoft.MicroBit
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
SingleInstanceAppStarter.Start(new MainForm(), StartNewInstance);
}
// The handler when attempting to start another instance of this application
// We can customize the logic here for which form to activate in different
// conditions. Like in this sample, we will be selectively activate the LoginForm
// or MainForm based on the login state of the user.
static void StartNewInstance(object sender, StartupNextInstanceEventArgs e)
{
e.BringToForeground = true;
}
}
}

View File

@ -0,0 +1,40 @@
using System;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Code The micro:bit Uploader")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("MicrosoftMicrobitUploader")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("7dc6ca45-fd75-44bc-805e-708c812cd4bf")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.9.0.0")]
[assembly: AssemblyFileVersion("0.9.0.0")]
[assembly: CLSCompliant(true)]
[assembly: NeutralResourcesLanguage("en-US")]

View File

@ -0,0 +1,93 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Microsoft.MicroBit.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.MicroBit.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap microbit_red {
get {
object obj = ResourceManager.GetObject("microbit_red", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap MSFT_logo_png {
get {
object obj = ResourceManager.GetObject("MSFT_logo_png", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized string similar to {\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
///{\f2\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f3\fbidi \froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}{\f10\fbidi \fnil\fcharset2\fp [rest of string was truncated]&quot;;.
/// </summary>
internal static string MSR_LA___2576 {
get {
return ResourceManager.GetString("MSR_LA___2576", resourceCulture);
}
}
}
}

View File

@ -0,0 +1,130 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="MSR_LA___2576" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MSR-LA - 2576.rtf;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="MSFT_logo_png" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\MSFT_logo_png.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="microbit_red" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\microbit.red.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -0,0 +1 @@
TBD

View File

@ -0,0 +1,76 @@
namespace Microsoft.MicroBit
{
partial class Settings
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(107, 12);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 20);
this.textBox1.TabIndex = 0;
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(34, 15);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(67, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Custom Path";
//
// Settings
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(246, 48);
this.Controls.Add(this.label1);
this.Controls.Add(this.textBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Settings";
this.ShowIcon = false;
this.Text = "Settings";
this.Load += new System.EventHandler(this.Settings_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
}
}

View File

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Security.AccessControl;
using System.Text;
using System.Windows.Forms;
namespace Microsoft.MicroBit
{
public partial class Settings : Form
{
public string CustomCopyPath;
public Settings(string currentpath)
{
InitializeComponent();
CustomCopyPath = currentpath;
}
private void Settings_Load(object sender, EventArgs e)
{
textBox1.Text = CustomCopyPath;
}
private void label1_Click(object sender, EventArgs e)
{
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
CustomCopyPath = textBox1.Text;
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,39 @@
/****************************** Module Header ******************************\
* Module Name: SingleInstanceAppHelper.cs
* Project: CSWinFormSingleInstanceApp
* Copyright (c) Microsoft Corporation.
*
* The sample demonstrates how to achieve the goal that only
* one instance of the application is allowed in Windows Forms application..
*
* This source is subject to the Microsoft Public License.
* See http://www.microsoft.com/en-us/openness/resources/licenses.aspx#MPL.
* All other rights reserved.
*
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
\***************************************************************************/
using System;
using Microsoft.VisualBasic.ApplicationServices;
using System.Windows.Forms;
namespace Microsoft.MicroBit
{
// We need to add Microsoft.VisualBasic reference to use
// WindowsFormsApplicationBase type.
class SingleInstanceApp : WindowsFormsApplicationBase
{
public SingleInstanceApp()
{
}
public SingleInstanceApp(Form f)
{
// Set IsSingleInstance property to true to make the application
base.IsSingleInstance = true;
// Set MainForm of the application.
this.MainForm = f;
}
}
}

View File

@ -0,0 +1,39 @@
/****************************** Module Header ******************************\
* Module Name: SingleInstanceAppStarter.cs
* Project: CSWinFormSingleInstanceApp
* Copyright (c) Microsoft Corporation.
*
* The sample demonstrates how to achieve the goal that only
* one instance of the application is allowed in Windows Forms application..
*
* This source is subject to the Microsoft Public License.
* See http://www.microsoft.com/en-us/openness/resources/licenses.aspx#MPL.
* All other rights reserved.
*
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
\***************************************************************************/
using System;
using System.Windows.Forms;
using Microsoft.VisualBasic.ApplicationServices;
namespace Microsoft.MicroBit
{
internal static class SingleInstanceAppStarter
{
static SingleInstanceApp app = null;
// Construct SingleInstanceApp object, and invoke its run method.
public static void Start(Form f, StartupNextInstanceEventHandler handler)
{
if (app == null && f != null)
app = new SingleInstanceApp(f);
// Wire up StartupNextInstance event handler.
app.StartupNextInstance += handler;
app.Run(Environment.GetCommandLineArgs());
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -1,11 +1,13 @@
/// <reference path="../node_modules/pxt-core/built/pxt.d.ts"/>
import * as fs from 'fs';
import * as path from 'path';
import * as child_process from 'child_process';
import * as fs from "fs";
import * as path from "path";
import * as child_process from "child_process";
let writeFileAsync: any = Promise.promisify(fs.writeFile)
let execAsync: (cmd: string, options?: { cwd?: string }) => Promise<Buffer> = Promise.promisify(child_process.exec)
let readDirAsync = Promise.promisify(fs.readdir)
export function deployCoreAsync(res: ts.pxt.CompileResult) {
return getBitDrivesAsync()
@ -13,10 +15,10 @@ export function deployCoreAsync(res: ts.pxt.CompileResult) {
if (drives.length == 0) {
console.log("cannot find any drives to deploy to")
} else {
console.log("copy microbit.hex to " + drives.join(", "))
console.log(`copy ${ts.pxt.BINARY_HEX} to ` + drives.join(", "))
}
return Promise.map(drives, d =>
writeFileAsync(d + "microbit.hex", res.outfiles["microbit.hex"])
writeFileAsync(d + ts.pxt.BINARY_HEX, res.outfiles[ts.pxt.BINARY_HEX])
.then(() => {
console.log("wrote hex file to " + d)
}))
@ -37,6 +39,10 @@ function getBitDrivesAsync(): Promise<string[]> {
})
return res
})
}
else if (process.platform == "darwin") {
return readDirAsync("/Volumes")
.then(lst => lst.filter(s => /MICROBIT/.test(s)).map(s => "/Volumes/" + s + "/"))
} else {
return Promise.resolve([])
}

View File

@ -8,6 +8,6 @@
"module": "commonjs",
"rootDir": ".",
"newLine": "LF",
"sourceMap": true
"sourceMap": false
}
}

View File

@ -26,33 +26,41 @@ input.onButtonPressed(Button.B, () => {
The [BBC micro:bit](https://www.microbit.co.uk) is a [pocket-size computer](/device) with a 5x5 display of 25 LEDs, Bluetooth and sensors that can be programmed by anyone.
The BBC micro:bit was made possible by many [partners](https://www.microbit.co.uk/partners).
The micro:bit provides a fun introduction to programming and making switch on, program it to do something fun wear it, customize it.
The micro:bit provides an easy and fun introduction to programming and making switch on, program it to do something fun wear it, customize it.
Just like Arduino, the micro:bit can be connected to and interact with sensors, displays, and other devices.
## Blocks or JavaScript
## Hardware: The Device
The student can program the BBC micro:bit using [visual blocks](http://www.github.com/Google/blockly) or JavaScript.
Learn about the [hardware components](/device) of the micro:bit to make the most of it!
## Programming: Blocks or JavaScript
You can program the micro:bit using [Blocks](/blocks) or [JavaScript](/javascript), via the [micro:bit APIs](/reference):
```blocks
basic.showString("BBC micro:bit!");
basic.showString("Hi!");
```
## Compile and Flash
## Compile and Flash: Your Program!
When a user has her code ready, she can connect her BBC micro:bit to a computer via a USB cable, so it appears as a mounted drive.
When you have your code ready, you connect your micro:bit to a computer via a USB cable, so it appears as a mounted drive (named MICROBIT).
Compilation to the ARM thumb machine code happens in the browser.
The student is prompted to save the ARM binary program to a file, which she then simply drags to the micro:bit mounted drive,
which flashes the micro:bit device with the new program.
Compilation to ARM thumb machine code from [Blocks](/blocks) or [JavaScript](/javascript) happens in the browser. You save the ARM binary
program to a file, which you then copy to the micro:bit drive, which flashes the micro:bit device with the new program.
## Simulator: Test Your Code
Before a student compiles her code for the micro:bit, she can run it using the micro:bit simulator, all within the confines of a web browser.
You can run your code using the micro:bit simulator, all within the confines of a web browser.
The simulator has support for the LED screen, buttons, as well as compass, accelerometer, and digital I/O pins.
## C++ Runtime
The [C++ BBC micro:bit runtime](http://lancaster-university.github.io/microbit-docs/), created at [Lancaster University](http://www.lancaster.ac.uk/), provides access to the hardware functions of the micro:bit,
The [C++ micro:bit runtime](http://lancaster-university.github.io/microbit-docs/), created at [Lancaster University](http://www.lancaster.ac.uk/), provides access to the hardware functions of the micro:bit,
as well as a set of helper functions (such as displaying a number/image/string on the LED screen).
The JavaScript micro:bit library mirrors the functions of the C++ library.
The [micro:bit library](/reference) mirrors the functions of the C++ library.
When code is compiled to ARM machine code, the calls to JavaScript micro:bit functions are replaced with calls to the corresponding C++ functions.
## Open Source
The code for the micro:bit is [open source](/open-source) on GitHub. Contributors are welcome!

8
docs/blocks.md Normal file
View File

@ -0,0 +1,8 @@
# Blocks language
```namespaces
for (let i = 0;i<5;++i) {}
if (true){}
let x = 0;
Math.random(5);
```

9
docs/blocks/logic.md Normal file
View File

@ -0,0 +1,9 @@
# Logic
```cards
if(true) {}
true;
true && false;
!true;
1 != 0;
```

View File

@ -2,8 +2,6 @@
true or false.
### @parent blocks/language
A Boolean has one of two possible values: `true`; `false`. Boolean (logical) operators (*and*, *or*, *not*) take Boolean inputs and yields a Boolean value. Comparison operators on other types ([numbers](/reference/types/number), [strings](/reference/types/string) yields a Boolean value.
The following blocks represent the true and false Boolean values, which can be plugged in anywhere a Boolean value is expected:
@ -32,7 +30,7 @@ The next six blocks represent comparison operators that yield a Boolean value. M
42 >= 0;
```
Boolean values and operators are often used with an [if](/reference/logic/if) or [while](/reference/loops/while) statement to determine which code will execute next. For example:
Boolean values and operators are often used with an [if](/blocks/logic/if) or [while](/blocks/loops/while) statement to determine which code will execute next. For example:
### Functions that return a Boolean
@ -98,11 +96,7 @@ if(x < 5) {
See the documentation on [Numbers](/reference/types/number) for more information on comparing two Numbers. You can also [compare strings](/reference/types/string-functions) using the `equals` function.
### Lessons
[rotation animation](/lessons/rotation-animation), [love meter](/lessons/love-meter), [zoomer](/lessons/zoomer)
### See also
[if](/reference/logic/if), [while](/reference/loops/while), [number](/reference/types/number)
[if](/blocks/logic/if), [while](/blocks/loops/while), [number](/reference/types/number)

28
docs/blocks/logic/if.md Normal file
View File

@ -0,0 +1,28 @@
# If
### @parent blocks/language
Conditionally run code depending on whether a [Boolean](/blocks/logic/boolean) condition is true or false.
```blocks
if(true) {
}
```
Click on the dark blue gear icon (see above) to add an *else* or *if* to the current block.
### Example: adjusting screen brightness
```blocks
if(input.lightLevel()<100){
led.setBrightness(255);
}
```
If the [light level](/reference/input/light-level) is `< 100`, this code sets the brightness to `255`:
### See also
[while loop](/blocks/loops/while), [for](/blocks/loops/for), [boolean](/blocks/logic/boolean)

7
docs/blocks/loops.md Normal file
View File

@ -0,0 +1,7 @@
# Loops
```cards
for(let i = 0;i<5;i++) {}
while(true) {}
basic.forever(() => {});
```

20
docs/blocks/loops/for.md Normal file
View File

@ -0,0 +1,20 @@
# For
### @parent blocks/language
Run part of the program the number of times you say.
### Example: Count to 4
This program will show the numbers 0, 1, 2, 3, and 4 one after another on the LED screen.
```blocks
for(let i = 0; i < 5; ++i) {
basic.showNumber(i)
}
```
### See also
[repeat](/blocks/loops/repeat), [while](/blocks/loops/while), [if](/blocks/logic/if), [show number](/reference/basic/show-number)

View File

@ -0,0 +1,12 @@
# Repeat
Run part of the program the number of times you say.
### Block Editor
![](/static/mb/blocks/contents-0.png)
### See also
[for](/blocks/loops/for), [while](/blocks/loops/while), [if](/blocks/logic/if), [show number](/reference/basic/show-number)

View File

@ -0,0 +1,29 @@
# While
Repeat code while a [Boolean](/blocks/logic/boolean) `condition` is true.
```blocks
while(true) {
}
```
The while loop has a *condition* that evaluates to a [Boolean](/blocks/logic/boolean) value. After the `do` keyword, add the code that you want to run while the `condition` is `true`. The while loop concludes with `end while`.
The condition is tested before any code runs. Which means that if the condition is false, the code inside the loop doesn't execute.
### Example: diagonal line
The following example uses a while loop to make a diagonal line on the LED screen (points `0, 0`, `1, 1`, `2, 2`, `3, 3`, `4, 4`).
```blocks
let index = 4;
while(index >= 0) {
led.plot(index, index);
index--;
}
```
### See also
[on button pressed](/reference/input/on-button-pressed), [for](/blocks/loops/for), [if](/blocks/logic/if), [forever](/reference/basic/forever)

View File

@ -1,15 +1,9 @@
# Math Library
Functions in the math library.
# Math functions
### @parent blocks/language
The math library includes math related functions that you can use with [Numbers](/reference/types/number).
* In the [Block editor](/blocks/editor), click **maths** on the left to see the available blocks
The functions available in Block Editor are:
### abs
math `->` abs (x : [Number](/reference/types/number)) *returns* [Number](/reference/types/number)
@ -42,11 +36,7 @@ returns a random [Number](/reference/types/number) between 0 and the parameter *
![](/static/mb/blocks/math-3.png)
### Lessons
[love meter](/lessons/love-meter)
### See also
[Block Editor documentation](/blocks/contents), [Number](/reference/types/number)
[Number](/reference/types/number)

21
docs/blocks/variables.md Normal file
View File

@ -0,0 +1,21 @@
# Variables
[Assign](/blocks/variables/assign) (set) a variable's value
```blocks
let x = 0;
```
Get a variable's value
```blocks
let x = 0;
x;
```
[Change](/blocks/variables/change-var) a variable's value
```blocks
let x = 0;
x+=1;
```

View File

@ -0,0 +1,36 @@
# Assignment Operator
Use an equals sign to make a [variable](/blocks/variables/var) store the [number](/reference/types/number)
or [string](/reference/types/string) you say.
When you use the equals sign to store something in a variable, the equals sign is called
an *assignment operator*, and what you store is called a *value*.
### Storing numbers in variables
This program makes the variable `item` equal `5` and then shows it on the [LED screen](/device/screen).
````blocks
let item = 5
basic.showNumber(item)
````
### Storing strings in variables
This program makes the variable `name` equal `Joe` and then shows it on the [LED screen](/device/screen).
````blocks
let name = "Joe"
basic.showString(name);
````
### Notes
You can use the assignment operator with variables of
every [type](/reference/types). A *type* is which kind of thing
a variable can store, like a number or string.
### See also
[variable](/blocks/variables/var), [types](/reference/types)

View File

@ -0,0 +1,40 @@
# Change Value
Set the value for local and global variables.
### @parent blocks/change-value
Change the value of a variable
```blocks
let x = 0
x += 1
```
### Declare a variable
Use the assignment operator to set the value of a [variable](/blocks/variables/var). Change the value of a variable from 0 to 1 using the change item block. Like this:
```blocks
let x = 0
x += 1
```
### Example
Use the assignment operator to set the value of a [variable](/blocks/variables/var). Change the value of a variable from 0 to 1 using the change item block. Then display the new value of the variable on the LED screen. Like this:
```blocks
let x = 0;
x += 1;
basic.showNumber(x);
```
### Notes
* You can use the assignment operator with variables of each of the supported [types](/reference/types).
### See also
[variable](/blocks/variables/var), [types](/reference/types)

View File

@ -13,7 +13,7 @@ A variable is a place where you can store and retrieve data. Variables have a na
### Var statement
Use the Block Editor variable statement to create a variable
and the [assignment operator](/reference/variables/assign)
and the [assignment operator](/blocks/variables/assign)
to store something in the variable.
For example, this code stores the number `2` in the `x` variable:
@ -27,7 +27,7 @@ Here's how to define a variable in the Block Editor:
2. Change the default variable name if you like.
3. Drag a block type on the right-side of the [assignment operator](/reference/variables/assign) and click the down arrow to change the variable name.
3. Drag a block type on the right-side of the [assignment operator](/blocks/variables/assign) and click the down arrow to change the variable name.
A variable is created for the number returned by the [brightness](/reference/led/brightness) function.
@ -81,11 +81,7 @@ if (led.brightness() > 128) {
* You can use the default variable names if you'd like, however, it's best to use descriptive variable names. To change a variable name in the editor, select the down arrow next to the variable and then click "new variable".
### Lessons
[glowing pendulum](/lessons/glowing-pendulum), [love meter](/lessons/love-meter), [temperature](/lessons/temperature), [zoomer](/lessons/zoomer)
### See also
[types](/reference/types), [assignment operator](/reference/variables/assign)
[types](/reference/types), [assignment operator](/blocks/variables/assign)

View File

@ -1,6 +1,6 @@
# Device
All the bits and pieces that make up your BBC micro:bit
All the bits and pieces that make up the BBC micro:bit
![](/static/mb/device-0.png)
@ -15,19 +15,21 @@ It flashes yellow when the system wants to tell the user that something has happ
### Buttons
Buttons A and B are a form of input. When you press a button, it completes an electrical circuit.
The micro:bit can detect either of its two buttons being pressed and un-pressed and be programmed
to act on that or send the information to another device.
The micro:bit can detect either of its two buttons being pressed/released and be programmed
to act on these events.
Button R on the back of the micro:bit is a system button. It has different uses.
When you have downloaded and run your code onto your micro:bit, press Button R to restart and run your program from the beginning.
When you plug in your micro:bit, it should appear as MICROBIT.
### USB connection
When you plug in your micro:bit, it should appear as ``MICROBIT``.
If you accidentally hold down the reset button as youre plugging in your micro:bit,
the micro:bit will appear as a MAINTENANCE drive instead of MICROBIT. This is known as maintenance mode.**
the micro:bit will appear as a MAINTENANCE drive instead of ``MICROBIT``. This is known as maintenance mode.**
To continue programming your micro:bit YOU MUST unplug your USB and reconnect it. Check that the drive now shows as MICROBIT.
To continue programming your micro:bit YOU MUST unplug your USB and reconnect it. Check that the drive now shows as ``MICROBIT``.
**Use with caution. If you click on the drive while it shows as MAINTENANCE,
**Use with caution. If you click on the drive while it shows as ``MAINTENANCE``,
you can see which version of firmware you have running on your micro:bit.
Firmware on your micro:bit should be up-to-date already.
You can find the version of firmware in the 'version.txt' file on the micro:bit. Further information on the firmware can be found here:
@ -43,7 +45,7 @@ This data can be used by the micro:bit in a program or be sent to another device
### Accelerometer
There is a an accelerometer on your micro:bit which detects changes in the micro:bits speed.
There is an accelerometer on your micro:bit which detects changes in the micro:bits speed.
It converts analogue information into digital form that can be used in micro:bit programs.
Output is in milli-g. The device will also detect a small number of standard actions e.g. shake, tilt and free-fall.
@ -53,6 +55,10 @@ The pins can be a form of input or output.
There are labels for the input/output pins P0, P1, P2, which you can attach external sensors to such as thermometers or moisture detectors.
You can read more about large and small pins [here](/device/pins).
### Light level
The screen can also be used a light level sensor (it's a really cool trick).
### How do I connect the micro:bit to my computer?
Your micro:bit can be connected to your computer via a micro USB cable.
@ -63,7 +69,7 @@ and about the error messages you might get [here](/device/error-codes).
### Powering your micro:bit
When your micro:bit is connected to your computer with the micro USB, it doesnt need another power source.
When your micro:bit is connected to your computer with the micro USB, it doesnt need another power source.
When your micro:bit isnt connected to your computer, tablet or mobile, you will need 2 x AAA 1.5 V batteries to power it.
The pins labelled 3V and GND are the power supply pins.
@ -71,11 +77,11 @@ You can attach an external device such as a motor to these and power it using th
### Serial Communication
The BBC micro:bit can send an receive data via [serial communication](/device/serial). The serial data can be transfered via USB or BlE.
The micro:bit can send an receive data via [serial communication](/device/serial). The serial data can be transfered via USB or BLE.
### Bluetooth Low Energy (BLE) Antenna
You will see the label BLE ANNTENA on the back of your micro:bit. It is for a messaging service,
You will see the label BLE ANTENNA on the back of your micro:bit. It is for a messaging service,
so that devices can talk to each other. The micro:bit is a peripheral
device which can talk to a central device like a smart phone or tablet that has Bluetooth Low Energy (BLE).
The micro:bit can send signals and receive signals from a central device so another BLE device can

View File

@ -1,7 +1,5 @@
# micro:bit - the device
The micro:bit device #docs
The micro:bit is a very capable device with many components:
* [the USB connector](/device/usb)

View File

@ -11,12 +11,6 @@ This example displays a random number every time the crocodile clip holds `GND`
### Connecting Crocodile Clips
### Lessons
[love meter](/lessons/love-meter)
### See also
[micro:bit pins](/device/pins), [pin is pressed](/reference/input/pin-is-pressed), [analog read pin](/reference/pins/analog-read-pin), [analog write pin](/reference/pins/analog-write-pin), [digital read pin](/reference/pins/digital-read-pin), [digital write pin](/reference/pins/digital-write-pin)

View File

@ -1,6 +1,6 @@
# Error codes
The micro:bit error codes #docs
The micro:bit error codes
Your micro:bit may encounter a situation that prevents it from running your code. When this happens, a frowny face will appear on your micro:bit screen (see picture) followed by an error number.

View File

@ -1,7 +1,5 @@
# The micro:bit - a reactive system
The micro:bit is a reactive system. #docs
### Computing systems
What sort of a *computing system* is the micro:bit?

View File

@ -3,40 +3,61 @@
The micro:bit LED screen
```sim
basic.showString(" ");
basic.showLeds(`
# . # . #
. # . # .
# . # . #
. # . # .
# . # . #
`);
```
The micro:bit LED screen consists of 25 red LED lights arranged in a 5X5 grid (5 LEDs across by 5 LEDs down).
In the screen above, we created a checkerboard pattern using the LEDs.
### Which LED?
You use ``x , y`` coordinates to specify a particular LED in the grid; where ``x`` is the horizontal position and ``y`` is the vertical position (0, 1, 2, 3, 4). To figure out the ``x``, ``y`` coordinates, position your micro:bit horizontally, like a credit card (see picture above).
You use `(x ,y)` coordinates to specify a particular LED in the grid;
where `x` is the horizontal position (0,1,2,3,4) and `y` is the vertical position
(0, 1, 2, 3, 4).
To figure out the ``x``, ``y`` coordinates, position your micro:bit horizontally, like a credit card (see picture above).
Here are the x, y coordinates for the LEDs in the 5X5 grid:
`0, 0` `1, 0` `2, 0` `3, 0` `4, 0`
`(0,0)` `(1,0)` `(2,0)` `(3,0)` `(4,0)`
`0, 1` `1, 1` `2, 1` `3, 1` `4, 1`
`(0,1)` `(1,1)` `(2,1)` `(3,1)` `(4,1)`
`0, 2` `1, 2` `2, 2` `3, 2` `4, 2`
`(0,2)` `(1,2)` `(2,2)` `(3,2)` `(4,2)`
`0, 3` `1, 3` `2, 3` `3, 3` `4, 3`
`(0,3)` `(1,3)` `(2,3)` `(3,3)` `(4,3)`
`0, 4` `1, 4` `2, 4` `3, 4` `4, 4`
`(0,4)` `(1,4)` `(2,4)` `(3,4)` `(4,4)`
The x, y coordinates for the LED in the centre of the grid are `2, 2`. Starting from `0, 0` count over 2 columns and then down 2 rows.
The x, y coordinates for the LED in the centre of the grid are `(2,2)`. Starting from `(0,0)` count over 2 columns and then down 2 rows.
### Check your understanding
Which LEDs are turned on in the checkboard pattern above?
### Row, column - 1
Since the row and column numbers start at 0, an easy way to figure out the x, y coordinates is to subtract 1 from the row and column number (when counting from 1). In other words, to specify the LED in the 4th column 5th row, subtract 1 from each number to get coordinates `3, 4`.
Since the row and column numbers start at 0, an easy way to figure out the (x,y) coordinates
is to subtract 1 from the row and column number (when counting from 1).
In other words, to specify the LED in the 4th column 5th row, subtract 1 from each number to get coordinates `(3,4)`.
### Turn a LED on/off
Use [plot](/reference/led/plot) and [unplot](/reference/led/unplot) to turn a LED on or off
```blocks
led.plot(0,0)
led.unplot(0,0)
led.plot(0,0);
led.plot(1,1);
basic.pause(1000);
led.unplot(0,0);
basic.pause(1000);
led.unplot(1,1);
```
### Is a LED on/off?

View File

@ -11,16 +11,43 @@ input.onButtonPressed(Button.A, () => {
})
```
Data is also automatically streamed to serial by the ** bar graph** block
and picked up by the editor. This data can be streamed to the cloud as well.
```blocks
basic.forever(() => {
led.plotBarGraph(input.acceleration(Dimension.X), 0);
});
```
## How to read the micro:bit's serial output from your computer
Unfortunately, using the serial library requires quite a bit of a setup.
### BBC micro:bit Chrome Extension
If you are using the Google Chrome browser, you can use our extension to get serial data streaming in the editor.
* Install the [Extension for BBC micro:bit](https://chrome.google.com/webstore/detail/extension-for-bbc-microbi/cihhkhnngbjlhahcfmhekmbnnjcjdbge?hl=en-US) on the Chrome Web Store.
* Restart Chrome and open the [web editor](https://codethemicrobit.com)
* The serial data will show below the simulator
### Windows
You must install a device driver (for the computer to recognize the serial interface of the micro:bit); then, you must also install a terminal emulator (which is going to connect to the micro:bit and read its output). Here's how to do it:
You must install a device driver (for the computer to recognize the
serial interface of the micro:bit); then, you must also install a
terminal emulator (which is going to connect to the micro:bit and read
its output).
* Follow instructions at https://developer.mbed.org/handbook/Windows-serial-configuration in order to install the device driver
* Install a terminal emulator; we recommend [Tera Term](https://ttssh2.osdn.jp/index.html.en). At the time of this writing, the latest version is 4.88 and can be downloaded [from here](http://en.osdn.jp/frs/redir.php?m=jaist&f=%2Fttssh2%2F63767%2Fteraterm-4.88.exe). Follow the instructions from the installer.
* Follow the instructions at
https://developer.mbed.org/handbook/Windows-serial-configuration to
install the device driver.
* Instructions for installing a terminal emulator are below.
#### Windows > Tera Term
* Install the terminal emulator [Tera Term](https://ttssh2.osdn.jp/index.html.en). At the time of this writing, the latest version is 4.88 and can be downloaded [from here](http://en.osdn.jp/frs/redir.php?m=jaist&f=%2Fttssh2%2F63767%2Fteraterm-4.88.exe). Follow the instructions from the installer.
Once both the driver and the terminal emulator are installed, plug in the micro:bit and wait until the device is fully setup. Then, open TeraTerm.
@ -32,7 +59,7 @@ You should be good. Feel free to hit `Setup` > `Save Setup` in the menus to eras
Please note that Windows will assign you a different COM port if you plug in another micro:bit. If you're juggling between micro:bits, you'll have to change the COM port every time.
### Alternative Windows setup with Putty
#### Windows > Putty
If you prefer another terminal emulator (such as [PuTTY](http://www.putty.org/)), here are some instructions.
@ -47,14 +74,16 @@ If you prefer another terminal emulator (such as [PuTTY](http://www.putty.org/))
### Linux
(Untested).
* Install the program `screen` if it is not already installed.
* Plug in the micro:bit.
* Open a terminal.
* Find which device node the micro:bit was assigned to with the command `ls /dev/ttyACM*`.
* If it was `/dev/ttyACM0`, type the command `screen /dev/ttyACM0 115200`. If it was some other device node,
use that one in the command instead. **Note:** You may need root access to run `screen`
successfully. You can probably use the command `sudo` like this: `sudo screen /dev/ttyACM0 115200`.
* To exit `screen`, type `Ctrl-A` `Ctrl-D`.
* Plug in the micro:bit
* Open a terminal
* `dmesg | tail` will show you which `/dev/` node the micro:bit was assigned (e.g. `/dev/ttyUSB0`)
* Then, do: `screen /dev/ttyUSB0 115200` (install the `screen` program if you don't have it). To exit, run `Ctrl-A` `Ctrl-D`.
Alternative programs include minicom, etc.
Alternative programs include `minicom` and so on.
### Mac OS

View File

@ -2,7 +2,8 @@
How to compile, transfer, and run a script on your micro:bit.
While you're writing and testing your Block Editor or Touch Develop scripts, you'll mostly be running scripts in your browser by clicking the `Run` button (see [run code in your browser](/device/simulator) for info about this).
While you're writing and testing your scripts, you'll mostly be running scripts in your browser by clicking the `PLay` button
(see [run code in your browser](/device/simulator) for info about this).
Once your masterpiece is complete, you can compile your script and run it on your micro:bit.

View File

@ -1,8 +1,26 @@
# Documentation
Welcome to the documentation.
### Things to do
* Browse the [API reference](/reference)
* Learn more about the [device](/device)
* Get started with [lessons](/lessons)
* Learn about [libraries](/libraries) (possibly using C++)
* **[Getting Started](/getting-started)**
* [Ten projects](/projects)
### Micro:bit reference
* [The micro:bit APIs](/reference)
* [The micro:bit device](/device)
### Language and data reference
* [Blocks language](/blocks)
* [JavaScript language](/javascript)
* [Streaming data](/streaming)
### More questions?
* [Frequently Asked Question](/faq)
* [Release notes](/release-notes)
### Developers
* Learn about [packages](/packages)

12
docs/faq.md Normal file
View File

@ -0,0 +1,12 @@
# Frequently Asked Questions
### Where can I get a BBC micro:bit?
More information at [http://uk.farnell.com/bbc-microbit](http://uk.farnell.com/bbc-microbit).
## 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.

41
docs/getting-started.md Normal file
View File

@ -0,0 +1,41 @@
# Getting started
## ~avatar
Here are some challenges for you. Arrange the blocks in the editor
to make real programs that work!
## ~
Use the **Basic** drawer in the editor
to drag out and arrange three blocks to create this program:
```blocks
basic.forever(() => {
basic.showLeds(`
. . . . .
. # . # .
. . . . .
# . . . #
. # # # .
`)
basic.showLeds(`
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
`)
});
```
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 **Compile** to move your program to the BBC micro:bit!
Make sure to follow the instructions.
### ~button /getting-started/screen
NEXT: THE SCREEN
### ~

View File

@ -0,0 +1,81 @@
# Button A and button B
### ~avatar avatar
Buttons are great to build games!
### ~
This program will show the word **ANTEATER** on the LED
screen when you press button `A`.
```blocks
input.onButtonPressed(Button.A, () => {
basic.showString("ANTEATER");
});
```
#### ~hint
The ``showString`` block can show letters, numbers, and punctuation
on the micro:bit screen.
#### ~
Now try to unscramble these blocks in the editor so that the micro:bit
shows **BANANA** when you press button `B`.
```shuffle
input.onButtonPressed(Button.B, () => {
basic.showString("BANANA");
});
```
#### ~hint
You can find the letter `B` by clicking the letter `A` on the
``onButtonPressed`` block.
#### ~
Click **Compile** to move your program to the BBC micro:bit!
#### Your turn!
Can you combine these blocks so your program shows your real name
instead of **ANTEATER** when you press `A`, but _your secret agent
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
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.
Unscramble the blocks in the editor to show a heart when you touch
pin ``P0``.
```shuffle
input.onPinPressed(TouchPin.P0, () => {
basic.showLeds(`
. # . # .
# . # . #
# . . . #
. # . # .
. . # . .`);
});
```
Click **Compile** to move your program to the BBC micro:bit!
## ~hint
Try this experiment: find a friend and hold hands. Touch the ``GND``
pin while your friend presses the ``P0`` pin. You should see the
heart! The electric current is going through your bodies and across
your handshake to make it happen!
## ~
### ~button /getting-started/shake
NEXT: SHAKE
### ~

View File

@ -0,0 +1,78 @@
# The amazing coin flipper
### ~avatar avatar
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!
### ~
Here are the blocks to make your coin flipper. When you press button
`B`, the coin flipper will show either `H` for heads or `T` for tails
on the LED screen.
```blocks
input.onButtonPressed(Button.B, () => {
if (Math.randomBoolean()) {
basic.showString("H");
} else {
basic.showString("T");
}
});
```
### ~hint
The ``pick random true or false`` block randomly tells the ``if``
block `true` or `false`. If the ``pick`` block picked `true`, the
``if`` block shows the letter `H`. Otherwise, it shows the letter `T`.
That's it!
### ~
### Keeping score
#### ~avatar
To keep track out of how many guesses you've won,
add these blocks to your coin flipper:
#### ~
```blocks
input.onButtonPressed(Button.A, () => {
game.addScore(1);
});
input.onButtonPressed(Button.AB, () => {
basic.showNumber(game.score());
});
```
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
show your score.
When you're done, your coin flipping program should look like this:
```blocks
input.onButtonPressed(Button.B, () => {
if (Math.randomBoolean()) {
basic.showString("H");
} else {
basic.showString("T");
}
});
input.onButtonPressed(Button.A, () => {
game.addScore(1);
});
input.onButtonPressed(Button.AB, () => {
basic.showNumber(game.score());
});
```
Flip until your thumbs get tired!
### ~button /getting-started/rock-paper-scissors
NEXT: ROCK PAPER SCISSORS
### ~

View File

@ -0,0 +1,205 @@
# Rock Paper Scissors
### ~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
it with friends who are just using their hands. (The game is built
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
shake it. Try creating an ``on shake`` block so when you shake the
micro:bit, it will run part of a program.
Clear up the blocks and add the blocks below.
```blocks
input.onGesture(Gesture.Shake, () => {
})
```
Next, when you shake the micro:bit, 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,
and store the random number in the variable,
like this:
```blocks
input.onGesture(Gesture.Shake, () => {
let item = Math.random(3)
})
```
### ~hint
No one can predict random numbers. That's what makes them great for Rock Paper Scissors!
### ~
Each possible number these blocks can make (`0`, `1`, or `2`) means a different picture.
We will show the right picture for that number on the LED screen.
## Step 2: Picking paper
Put an ``if`` block after the ``let`` block that checks whether
`item` is `0`. Make sure the ``if`` block has an ``else if`` part
and an ``else`` part.
Next, add a ``show leds`` block that shows a
picture of a piece of paper:
```blocks
input.onGesture(Gesture.Shake, () => {
let item = Math.random(3)
if (item == 0) {
basic.showLeds(`
# # # # #
# . . . #
# . . . #
# . . . #
# # # # #
`)
} else if (false) {
} else {
}
})
```
## Step 3: A random rock
Now we are going to add a new picture for the micro:bit to show
when another random number comes up.
Make the ``else if`` part check if the variable `item` is `1`.
Then add a ``show leds`` block with a picture of a rock.
```blocks
input.onGesture(Gesture.Shake, () => {
let item = Math.random(3)
if (item == 0) {
basic.showLeds(`
# # # # #
# . . . #
# . . . #
# . . . #
# # # # #
`)
} else if (item == 1) {
basic.showLeds(`
. . . . .
. # # # .
. # # # .
. # # # .
. . . . .
`)
} else {
}
})
```
## Step 4: Suddenly scissors
Add a ``show leds`` block with a picture of scissors to the ``else`` part:
```blocks
input.onGesture(Gesture.Shake, () => {
let item = Math.random(3)
if (item == 0) {
basic.showLeds(`
# # # # #
# . . . #
# . . . #
# . . . #
# # # # #
`)
} else if (item == 1) {
basic.showLeds(`
. . . . .
. # # # .
. # # # .
. # # # .
. . . . .
`)
} else {
basic.showLeds(`
# # . . #
# # . # .
. . # . .
# # . # .
# # . . #
`)
}
})
```
### ~hint
You don't need to check if `item` is `2` because `2` is the only number left out of `0`, `1`, and `2`.
That's why you can use an ``else`` instead of an ``else if``.
### ~
Your game is ready!
Click **Compile** to move your program to the BBC micro:bit!
Have fun!
## Step 5: Are you the greatest?
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.
Open the ``Game`` drawer, and then add the block ``change score by 1`` to your program,
like this:
```blocks
input.onButtonPressed(Button.A, () => {
game.addScore(1)
})
```
## Step 6: Prove you're the greatest!
After your micro:bit can add `1` to the score, show how many wins you have.
```blocks
input.onButtonPressed(Button.A, () => {
game.addScore(1)
basic.showString("WINS:")
basic.showNumber(game.score())
})
```
## Step 7: Staying honest
Success! Your micro:bit can track wins!
But what about losses?
Use the ``Game`` drawer to subtract `1` from your score when you press button `B`.
Here are all the blocks you will need:
```shuffle
input.onButtonPressed(Button.B, () => {
game.addScore(-1)
basic.showString("LOSSES:")
basic.showNumber(game.score())
})
```
Click **Compile** to move your program to the BBC micro:bit!
### ~button /projects
NEXT: PROJECTS!
### ~

Some files were not shown because too many files have changed in this diff Show More