Skip to content

Commit 6af2283

Browse files
committed
Merge branch 'main' of https://github.com/microbit-apps/microcode-v2 into newDocs
2 parents d473b50 + 0347eee commit 6af2283

File tree

59 files changed

+44444
-1035748
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+44444
-1035748
lines changed

.github/workflows/codeql.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
2+
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["main"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
# Build job
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
- name: Setup Pages
32+
uses: actions/configure-pages@v5
33+
- name: Build with Jekyll
34+
uses: actions/jekyll-build-pages@v1
35+
with:
36+
source: ./
37+
destination: ./_site
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v3
40+
41+
# Deployment job
42+
deploy:
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
runs-on: ubuntu-latest
47+
needs: build
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

.github/workflows/makecode-release.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
contents: write
1212
strategy:
1313
matrix:
14-
node-version: [16.x]
14+
node-version: [18.x]
1515
steps:
1616
- uses: actions/checkout@v4
1717
with:
@@ -21,33 +21,25 @@ jobs:
2121
with:
2222
node-version: ${{ matrix.node-version }}
2323
- name: Cache npm and makecode
24-
uses: actions/cache@v2
24+
uses: actions/cache@v3
2525
with:
2626
path: |
2727
~/.npm
2828
~/.pxt/mkc-cache
2929
key: ${{ runner.os }}-${{ hashFiles('pxt.json') }}-${{ hashFiles('mkc*json') }}
3030
restore-keys: |
3131
${{ runner.os }}-
32-
- name: npm install makecode@0.34.5
32+
- name: npm install makecode@1.3.4
3333
run: |
34-
npm install -g makecode@0.34.5
35-
- name: build js
34+
npm install -g makecode@1.3.4
35+
- name: build hex file
3636
run: |
37-
makecode --java-script -u
38-
- name: build hardware N3
39-
run: |
40-
makecode --hw N3
37+
makecode
4138
- name: copy files
4239
run: |
43-
cp ./built/binary.js ./assets/js/binary.js
44-
cp ./built/n3/binary.hex ./assets/firmware.hex
45-
- name: build localized hex files
46-
run: |
47-
yarn install --frozen-lockfile
48-
node ./scripts/lochex.mjs
40+
cp ./built/binary.hex ./assets/microcode.hex
4941
- name: upload modified assets
5042
uses: stefanzweifel/git-auto-commit-action@v4
5143
with:
52-
file_pattern: "assets/* _includes/*"
44+
file_pattern: "assets/*"
5345
branch: main

.github/workflows/makecode.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
node-version: [16.x]
15+
node-version: [18.x]
1616

1717
steps:
1818
- uses: actions/checkout@v4
@@ -23,20 +23,17 @@ jobs:
2323
with:
2424
node-version: ${{ matrix.node-version }}
2525
- name: Cache npm and makecode
26-
uses: actions/cache@v2
26+
uses: actions/cache@v3
2727
with:
2828
path: |
2929
~/.npm
3030
~/.pxt/mkc-cache
3131
key: ${{ runner.os }}-${{ hashFiles('pxt.json') }}-${{ hashFiles('mkc*json') }}
3232
restore-keys: |
3333
${{ runner.os }}-
34-
- name: npm install makecode@0.34.5
34+
- name: npm install makecode@1.3.4
3535
run: |
36-
npm install -g makecode@0.34.5
37-
- name: build js
36+
npm install -g makecode@1.3.4
37+
- name: build hex file
3838
run: |
39-
makecode --java-script
40-
- name: build hardware N3
41-
run: |
42-
makecode --hw N3
39+
makecode

README.md

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,53 @@
1-
## Microsoft MicroCode [https://aka.ms/microcode](https://aka.ms/microcode)
1+
## MicroCode (version 2)
22

3-
Microsoft MicroCode is an icon-based programming language and editor for young learners to code with the [BBC micro:bit V2](https://microbit.org). MicroCode allows you to program the micro:bit V2 with only an [Arcade shield accessory](#arcade-shields-for-microbit-v2) - _no other computer is required!_ If you prefer the web browser, there's also a MicroCode web app that connects to your micro:bit V2 over WebUSB.
3+
MicroCode is an icon-based programming language and editor for young learners to code with the [BBC micro:bit V2](https://microbit.org). MicroCode allows you to program the micro:bit V2 with only an [display shield accessory](https://makecode.microbit.org/pkg/microbit-apps/display-shield) - _no other computer is required!_
44

5-
Here's the classic micro:bit _Happy-A-button/Sad-B-button_ program in MicroCode:
5+
## Getting started with MicroCode
66

7-
![Happy sad program in microcode](./docs/images/generated/sample_smiley_buttons.png)
7+
### With hardware
88

9-
## Getting started
9+
To use MicroCode, you will need to:
1010

11-
- **Read the [MicroCode user guide](https://microsoft.github.io/microcode/docs/manual)**
12-
- [try it now!](https://microsoft.github.io/microcode/)
11+
1. Get a micro:bit (v2) and one of the [display shields](https://makecode.microbit.org/pkg/microbit-apps/display-shield).
12+
2. Download the [microcode hex file](./assets/microcode-v2.hex) and copy it your micro:bit.
13+
3. Insert the micro:bit into the display shield, and make sure the combination is powered.
1314

14-
## [Arcade shields](https://microsoft.github.io/microcode/docs/manual#arcade-shield) for micro:bit V2
15+
With the above hardware, in addition to the freely-available MicroCode software, you also
16+
can use these other free programming environments:
1517

16-
There are various [Arcade shields](https://microsoft.github.io/microcode/docs/manual#arcade-shield) available on the market today, as shown below.
18+
- create your own graphics with [MakeCode for micro:bit](https://makecode.microbit.org) and the [display shield extension](https://makecode.microbit.org/pkg/microbit-apps/display-shield)
19+
- develop retro arcade games with [MakeCode Arcade](https://arcade.makecode.com)
1720

18-
<img style="width: 40%" src="https://microsoft.github.io/microcode/assets/newbit-shield.png"></img>
21+
### With simulators (no hardware required)
1922

20-
## Robot
23+
You can load this repo into [https://makecode.microbit.org/beta](https://makecode.microbit.org/beta) using the import button on the right-hand side of the home page via "Import URL". Enter [https://github.com/microbit-apps/microcode-v2](https://github.com/microbit-apps/microcode-v2) as the URL.
2124

22-
MicroCode can also be used to [program and control a 2 wheeled rover robot](https://microsoft.github.io/microcode/docs/robot).
25+
## What's New?
2326

24-
![robot line following](https://microsoft.github.io/microcode/docs/images/generated/sample_robot_line_follow.png){:class="sample"}
27+
- MicroCode is built using [MakeCode for the micro:bit](https://makecode.microbit.org/beta), which
28+
provides direct access to all the micro:bit APIs available through MakeCode
2529

26-
<img style="width: 40%" src="https://microsoft.github.io/microcode/docs/images/cutebot.jpeg"></img>
30+
- Decimal notation (instead of the 1-5 dots in MicroCode-classic)
31+
32+
- Math (+, -, \*, /) and comparison (=, !=, <, >) operators
33+
34+
- Uniform support for sensors
35+
36+
- Lots of changes to improve reliability
37+
38+
## What happened to MicroCode-classic and its features?
39+
40+
While we soon will retire the [MicroCode-classic](https://aka.ms/microcode) web site, we plan to bring back the following features from MicroCode-classic:
41+
42+
- Option to use 1-5 dots, instead of decimal notation, for beginners.
43+
- Jacdac services
44+
- Robot cars
45+
- Localization
2746

2847
## Development
2948

30-
To contribute to MicroCode, please read about [MicroCode development](./docs/develop.md).
49+
See [https://github.com/microbit-apps](https://github.com/microbit-apps) for more information on developing micro:bit apps such as MicroCode.
3150

3251
## Contributing
3352

34-
This project welcomes contributions and suggestions.
53+
[This project](https://github.com/microbit-apps/microcode-v2) welcomes contributions and suggestions.

0 commit comments

Comments
 (0)