Name Date Size

..29-Nov-20194 KiB

.gitattributesH A D27-Sep-2018434

.github/ISSUE_TEMPLATE/H27-Sep-20184 KiB

.gitignoreH A D27-Sep-2018431

.travis.ymlH A D27-Sep-2018781

.vscode/H27-Sep-20184 KiB

clients/H27-Sep-20184 KiB

CONTRIBUTING.mdH A D27-Sep-20182.1 KiB

docfiles/H27-Sep-20184 KiB

docs/H27-Sep-20184 KiB

editor/H27-Sep-20184 KiB

electron/H27-Sep-20184 KiB

external/H27-Sep-20184 KiB

faviconDescription.jsonH A D27-Sep-20181.1 KiB

libs/H27-Sep-20184 KiB

LICENSE.txtH A D27-Sep-20181.1 KiB

package-lock.jsonH A D27-Sep-2018120.4 KiB

package.jsonH A D27-Sep-2018950

ptrcheck-ignoreH A D27-Sep-2018399

pxtarget.jsonH A D27-Sep-201811.6 KiB

pxtwapp/H27-Sep-20184 KiB

README.mdH A D27-Sep-20183.5 KiB

sim/H27-Sep-20184 KiB

targetconfig.jsonH A D27-Sep-20181.4 KiB

tests/H27-Sep-20184 KiB

theme/H27-Sep-20184 KiB

THIRD-PARTY-NOTICES.txtH A D27-Sep-20181.9 KiB

travis-tests.shH A D27-Sep-2018530

tslint.jsonH A D27-Sep-20181.3 KiB

webmanifest.jsonH A D27-Sep-20181.2 KiB

README.md

1# micro:bit target for PXT
2
3This target allows you to program a [BBC micro:bit](https://microbit.org/) using 
4PXT ([Microsoft Programming Experience Toolkit](https://github.com/Microsoft/pxt)).
5
6* [Try it live](https://makecode.microbit.org)
7
8[![Build Status](https://travis-ci.org/Microsoft/pxt-microbit.svg?branch=master)](https://travis-ci.org/Microsoft/pxt-microbit)
9
10## Issue tracking
11
12Please add an issue if you discover an (unreported) bug.
13
14## Local server
15
16The local server lets you to run the editor and serve the documentation from your own computer.
17
18### Setup   
19This section explains how to setup your development environment for pxt-microbit, whether that be to run a copy locally or to make source changes.    
20Note that pxt-microbit can not be run without its main depandancy, [pxt](https://github.com/Microsoft/pxt). Below explains how to setup both.      
21
22The following commands perform a one-time setup after synching the repo on your machine.
23* Note for any editing of the .cpp files, Yotta must be installed. Do do so, follow the instructions on [their site](http://docs.yottabuild.org/).
24* Install node.js 8.9.4 or higher.
25* Install requirements for [pxt](https://github.com/Microsoft/pxt). Note the v0 branch must be used for pxt-microbit (add ``sudo`` for Mac/Linux shells).
26```
27npm install -g jake
28npm install -g typings
29```
30
31* [Clone the pxt repository](https://help.github.com/articles/cloning-a-repository/) and set it to the v0 branch.
32```
33git clone https://github.com/microsoft/pxt
34cd pxt
35git checkout v0
36```
37
38* Install the pxt dependencies.
39```
40npm install
41typings install
42jake
43cd ../
44```
45
46* [Clone this repo](https://help.github.com/articles/cloning-a-repository/) to your computer.
47```
48git clone https://github.com/microsoft/pxt-microbit
49cd pxt-microbit
50```
51* install the PXT command line (add ``sudo`` for Mac/Linux shells).
52```
53npm install -g pxt
54```
55* install the dependencies
56```
57npm install
58
59```
60
61* Link pxt-microbit back to base pxt repo.
62```
63npm link ../pxt
64```
65Note the above command assumes the folder structure of   
66```
67       makecode
68          |
69  -----------------
70  |               |
71 pxt        pxt-microbit
72 ```
73
74### Running
75
76Run this command from inside pxt-microbit to open a local web server (add ``sudo`` for Mac/Linux shells)
77```
78pxt serve --cloud
79```
80If the local server opens in the wrong browser, make sure to copy the URL containing the local token. 
81Otherwise, the editor will not be able to load the projects.
82
83If you need modify the `.cpp` files (and have installed yotta), enable yotta compilation by removing the ```--cloud``` flag (add ``sudo`` for Mac/Linux shells):
84```
85pxt serve
86```
87
88### Updates
89
90To update your PXT version and make sure you're running the latest tools, run (add ``sudo`` for Mac/Linux shells):
91```
92pxt update
93```
94
95More instructions are at https://github.com/Microsoft/pxt#running-a-target-from-localhost
96
97## Repos 
98
99The pxt-microbit target depends on several other repos. The main ones are:
100- https://github.com/Microsoft/pxt, the PXT framework
101- https://github.com/lancaster-university/microbit, basic wrapper around the DAL
102- https://github.com/lancaster-university/microbit-dal
103
104## History
105
106See the [MakeCode blog](https://makecode.com/blog).
107
108## Code of Conduct
109
110This 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.
111