A Blocks / JavaScript code editor for the micro:bit built on Microsoft MakeCode
Перейти к файлу
Peli de Halleux e3914308c0 updated tutorial 2018-10-29 23:37:26 -07:00
.github/ISSUE_TEMPLATE
.vscode
clients removed chrome extension code 2018-10-01 19:31:35 -07:00
docfiles
docs updated tutorial 2018-10-29 23:37:26 -07:00
editor [UWP] Fix infinite spin when downloading without device plugged (#1500) 2018-10-23 12:40:24 -04:00
electron
external
fieldeditors
libs pipe led.plotbargraph through console.log (#1557) 2018-10-29 22:09:28 -07:00
pxtwapp
resources Updating hero banner (#1524) 2018-10-25 15:55:33 -04:00
sim BLE HF2 log service (#1549) 2018-10-29 21:12:09 -07:00
tests
theme Center hero banner (#1526) 2018-10-25 16:09:10 -04:00
.clang-format
.gitattributes
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE.txt
README.md Servo library support (#1343) 2018-10-05 11:09:08 -07:00
THIRD-PARTY-NOTICES.txt enfore v0 sounds (#1231) 2018-09-13 11:03:46 -07:00
faviconDescription.json
package-lock.json 1.2.2 2018-10-29 22:09:53 -07:00
package.json 1.2.2 2018-10-29 22:09:53 -07:00
ptrcheck-ignore
pxtarget.json Remove feedback link (#1542) 2018-10-26 15:46:34 -04:00
targetconfig.json sparkfun and robobit pacakges (#1551) 2018-10-28 21:42:44 -07:00
travis-tests.sh
tslint.json
webmanifest.json

README.md

micro:bit target for PXT

Build Status

This README is for pxt-microbit v1.x, which is currently in beta.

pxt-microbit is a Microsoft Programming Experience Toolkit (PXT) target that allows you to program a BBC micro:bit. pxt-microbit v1.x requires pxt v3.x, which is currently in the master branch of pxt.

Issue tracking

Please add an issue if you discover an (unreported) bug.

Local server

The local server lets you to run the editor and serve the documentation from your own computer.

Setup

  1. Install Node.js 8.9.4 or higher.
  2. Install Yotta if you are going to edit any .cpp files.
  3. Clone the pxt repository.
git clone https://github.com/microsoft/pxt
cd pxt
  1. Install the dependencies of pxt and build it
npm install
npm run build
cd ..
  1. Clone the pxt-common-packages repository
git clone https://github.com/microsoft/pxt-common-packages
cd pxt-common-packages
npm install
cd ..
  1. Clone the v1 branch of this repository.
git clone https://github.com/microsoft/pxt-microbit --branch v1
cd pxt-microbit
  1. Install the PXT command line (add sudo for Mac/Linux shells).
npm install -g pxt
  1. Install the pxt-microbit dependencies.
npm install
  1. Link pxt-microbit back to base pxt repo (add sudo for Mac/Linux shells).
npm link ../pxt
npm link ../pxt-common-packages

Note the above command assumes the folder structure of

       makecode
          |
  ----------------------------------
  |       |                        |
 pxt      pxt-common-packages  pxt-microbit

Running

Run this command from inside pxt-microbit to open a local web server

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 to modify the .cpp files (and have installed yotta), enable yotta compilation using the --localbuild flag:

pxt serve --localbuild

Updates

Make sure to pull changes from all repos regularly. More instructions are at https://github.com/Microsoft/pxt#running-a-target-from-localhost

Repos

The pxt-microbit target depends on several other repos. The main ones are:

History

See the MakeCode blog.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.