Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.

Commit d054376

Browse files
tballmsftCopilot
andauthored
More messaging (#528)
* more changes * update readme * Update docs/samples.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * full links --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 90c0fd9 commit d054376

12 files changed

Lines changed: 18 additions & 1134 deletions

File tree

README.md

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,6 @@
1-
## Microsoft MicroCode [https://aka.ms/microcode](https://aka.ms/microcode)
1+
## Microsoft MicroCode
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.
4-
5-
Here's the classic micro:bit _Happy-A-button/Sad-B-button_ program in MicroCode:
6-
7-
![Happy sad program in microcode](./docs/images/generated/sample_smiley_buttons.png)
8-
9-
## Getting started
10-
11-
- **Read the [MicroCode user guide](https://microsoft.github.io/microcode/docs/manual)**
12-
- [try it now!](https://microsoft.github.io/microcode/)
13-
14-
## [Arcade shields](https://microsoft.github.io/microcode/docs/manual#arcade-shield) for micro:bit V2
15-
16-
There are various [Arcade shields](https://microsoft.github.io/microcode/docs/manual#arcade-shield) available on the market today, as shown below.
17-
18-
<img style="width: 40%" src="https://microsoft.github.io/microcode/assets/newbit-shield.png"></img>
19-
20-
## Robot
21-
22-
MicroCode can also be used to [program and control a 2 wheeled rover robot](https://microsoft.github.io/microcode/docs/robot).
23-
24-
![robot line following](https://microsoft.github.io/microcode/docs/images/generated/sample_robot_line_follow.png){:class="sample"}
25-
26-
<img style="width: 40%" src="https://microsoft.github.io/microcode/docs/images/cutebot.jpeg"></img>
27-
28-
## Development
29-
30-
To contribute to MicroCode, please read about [MicroCode development](./docs/develop.md).
3+
> NOTE: MicroCode has moved to [https://github.com/microbit-apps/microcode](https://github.com/microbit-apps/microcode).
314
325
## Contributing
336

_includes/editor.html

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -228,23 +228,12 @@
228228
</head>
229229

230230
<body id="root" data-build="{{ site.github.build_revision }}">
231-
<div id="loader" class="lds-ripple">
232-
<div></div>
233-
<div></div>
234-
<img
235-
alt="MicroCode Logo"
236-
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAAAWCAYAAAAvrxV9AAAAAXNSR0IArs4c6QAABARJREFUaEPlWttx3DAMlHpwAy4i1cQf5z7iyWScPnwfdjUpwg24B2VACzIE4bEkpbm7JB9JThJIEFwuFpDGYRiGaZom+lf/GcdxtK6jNnrcaDxvnlu57sWQ/M/WPd3fL/Ef39+XmOvr8jfHhZ/ne9Jexu6ovRh54LffZ3OvHp4eNyBCbLxnrPFuBSSWn3JjvBiS3fcfJxdIZfNPd5/Dnz8GAsHqGoHw559x+vXtE2jnj4GfL9cNews82r899qIAKFo4OSInysAzP0+sNljjPjw9lkN5y6Bh35FY6HWaB1IwUAkOA2g21qxCgPGYiu01gI7aCwhADCI0YASSfx1AaCysg6JBlDEQscwKEBaAFINdHYCYhjO2+h8YqAc8vLErVpcMdLr7SleUqgwWshhIaqENYzlZZo9sADNQTcphx16fX1bifL5+0ylsD/DwIeNUvmibWessKZI1j3FdshLZ82/5f5lqL57CWgA02+gKzxXl1hxeBRNVFfJeSyVZEO5UoIhmRGMVFSg1sbAEs7ZHAVRbTR7KQFnp2FrBRBWedW+jOUTboqZyQthHsOzw+vwSYkmmkNZYaEFPvxGZsWHBxpgcBiD2xysdkc3wKpiIBahcdk5bYb6j5hUbskrROo3LNTGAenxqXZMEUM/8IYBogdYp8q4LgZhWYS2pQAYcPWXSJ8pMR80b6TsLRPL5Hp8YQLXx0ACqtee9SAFEQZcB4IV7ZTo7FpXxHjsh2oHSUWvAj5wXqGisbn/ayI1iwrGoSVuaAYNMsTzqpWKaHwKQIYZTuwxAgagr0wVOZ+y2sc9Aj+iWqLel9YTedEuYskj3DkOvTz32Fpt6LJoCwesaRyyQNRItcCFOg0CQVZ489eZakXkzVhVpsuq1j8emvT5p+wik3kEnLZlVcjTPtQHIesWxaQMkpzZ8AWyI+pXo9TRFxkAWiDJx6o1ppUNrzah9C4BAOXHdAPLaAJcCkNaDXpDl6Y3EKQqAWlBrAB4BIGa5q2GgOU18fcowqzurDbAngCrmLUzVIuAtoAHpGIlFpAdX9p7mTORERkRVIno12N4aiAfPTm+mr6I3/Vn/iH3IurZRbyeLuEh1KSB7YkGD99ijn3pchIHQVKA3Azi1Gz2jx2jZfFTUVoJn8bXXpxZ7WTl69paQ1q94LgagllSQNRKBXkzpRLc2zY4CY69PLfYSQLX2kp0uBiBaQM3JQTq3CIB65rUYpnUNPWDcixFlvBrWUTRW+StrtXvUnNmBn3NM0UtH2RCT+gYcO8oqTfM6A+41Vu84ob303QIhvSoEXwAv2PGabjwX8ump2aIXzqafc8zPmh/2z/c8P9CxQyAFN5H1S/OWNVjT944T2cv50LhqHxe7v+PVXF6WP+4hAAAAAElFTkSuQmCC"
237-
/>
238-
</div>
239-
<div>
240-
<iframe
241-
id="simframe"
242-
title="MicroCode editor"
243-
allowfullscreen="allowfullscreen"
244-
sandbox="allow-popups allow-forms allow-scripts allow-same-origin"
245-
>
246-
</iframe>
247-
</div>
231+
<p>
232+
MicroCode has moved:
233+
<a href="https://microbit-apps.github.io/microcode-classic/docs/manual">
234+
https://microbit-apps.github.io/microcode-classic/docs/manual
235+
</a>
236+
</p>
248237
{% include footer.html %} {% include dialogs.html %}
249238
</body>
250239
</html>

docs/develop.md

Lines changed: 1 addition & 224 deletions
Original file line numberDiff line numberDiff line change
@@ -3,227 +3,4 @@ title: Developer Docs
33
image: ./docs/images/generated/sample_smiley_buttons.png
44
---
55

6-
MicroCode is open source at https://github.com/microsoft/microcode and welcomes contributions.
7-
The easiest way to get started is to open this repository in a GitHub Codespace and everything will be ready for you.
8-
9-
We recommend using [Visual Studio Code](https://code.visualstudio.com/) as it provides excellent support
10-
for MakeCode editing, Git, and Codespaces.
11-
12-
## Codespaces setup
13-
14-
- open [https://github.com/microsoft/microcode](https://github.com/microsoft/microcode)
15-
- click on `Code` drop down and select `Create Codespace on main`
16-
- you can do your editing from VS Code online or click on `Codespaces` in lower left and select `Open in VS Code` to use the desktop version (must be installed on your machine)
17-
- press "Ctrl + `" to open a terminal and you're ready to go!
18-
19-
In the future, click again on `Code` to find previously created Codespaces.
20-
21-
## Local Install (skip in Codespaces)
22-
23-
- install [Node.js](https://nodejs.org/en/)
24-
- install the MakeCode command line tools (`mkc` for short)
25-
26-
```bash
27-
npm install -g -u makecode
28-
```
29-
30-
- clone this repo
31-
32-
```bash
33-
git clone https://github.com/microsoft/microcode
34-
```
35-
36-
- setup MakeCode project structure (one time only)
37-
38-
```bash
39-
cd microcode
40-
mkc init
41-
```
42-
43-
## Build
44-
45-
Note that you can open terminals directly from VS Code by pressing "Ctrl + `".
46-
47-
- start a compilation server that will automatically compile and reload
48-
a compile web version of the editor
49-
50-
```bash
51-
sh serve.sh
52-
```
53-
54-
- open to web editor at http://127.0.0.1:7001/
55-
56-
To flash a micro:bit,
57-
58-
- build a micro:bit Hex file and deploy
59-
60-
```bash
61-
mkc build --hw n3 -d
62-
```
63-
64-
If you are running in Codespaces, the `-d` option won't work. Instead, right click on `built/binary.hex` in the explorer and select `Download...` to download the hex file to your micro:bit.
65-
66-
## With Jacdac devtools
67-
68-
To load the local editor in a Jacdac devtools page, click on the **sim** link at the bottom
69-
of the local server on http://127.0.0.1:7001/. Or,
70-
71-
https://microsoft.github.io/jacdac-docs/clients/javascript/devtools?jacscript=1&simulators=microbitmicrocode#http://127.0.0.1:7001/index.html?usb=0
72-
73-
## Creating artwork
74-
75-
To preview all artwork, click on the `art` icon at the bottom right of the local editor (and wait...). Use `save` to download all artwork on the `images/generated` folder.
76-
77-
If you want to create/edit new sprites, you should import this web site into https://arcade.makecode.com, using the following directions:
78-
79-
- create 16 x 16 sprite in assets.ts (contains all the artwork for MicroCode)
80-
- copy the code from the JavaScript view of https://arcade.makecode.com
81-
- paste code into assets.ts into VS Code
82-
- make sure it works locally
83-
- git commit and push
84-
85-
You might also be able to commit and push directly from the web site, but we find that this isn't very reliable.
86-
87-
Some art images are precomputed, you will need to load scripts/renderart.ts in MakeCode Arcade and copy the console output back into the project.
88-
89-
## Updating sample
90-
91-
- Browse to http://127.0.0.1:7001/index.html?compress=0
92-
- Once your sample is ready, copy the string after `#` and copy it into `samples.ts`
93-
94-
## Updating GitHub pages
95-
96-
To bump and refresh the github pages javascript and pre-built .hex file, run this script
97-
98-
```bash
99-
sh ./bump.sh
100-
```
101-
102-
A GitHub Action will trigger and update the web site within a few minutes.
103-
104-
## Running Jekyll locally
105-
106-
It is easiest to launch a codespace to get the right setup to run Jekyll (Ruby). Run the Jekyll setup script
107-
108-
```bash
109-
sh scripts/setup-jekyll.sh
110-
```
111-
112-
then launch jekyll
113-
114-
```bash
115-
bundle exec jekyll serve --incremental
116-
```
117-
118-
and nav to http://localhost:4000
119-
120-
## Re-building library
121-
122-
There is library of LED animations etc in `scripts/lib/lib.js`. To rebuild, make sure you have `jacscript` checked out
123-
parallel to `microcode` and run:
124-
125-
```bash
126-
cd scripts
127-
./genlib.sh
128-
```
129-
130-
## Localization
131-
132-
- [ ] `locales/tooltips.json` contains the tooltips displayed on the micro:bit screen
133-
- [ ] `_includes/dialogs.html` contains the webusb dialogs
134-
135-
### Adding tooltips in source code
136-
137-
- add new tooltip to `locales/tooltips.json`
138-
- refresh tooltips.ts
139-
140-
```bash
141-
node scripts/lochex.mjs en
142-
```
143-
144-
### Updating crowdin
145-
146-
- Go to https://crowdin.com/project/makecode/content/files
147-
- click on `Update` for `microcode/tooltips.json` and load `locales/tooltips.json`.
148-
149-
### Refreshing translations
150-
151-
- go to https://crowdin.com/project/makecode/tools/content-delivery
152-
- click `Release` on the microcode distribution
153-
- bump repo
154-
155-
## Dependencies
156-
157-
This app is built with [MakeCode Arcade](https://arcade.makecode.com/), specifically targeting the NRF52833 MCU of the micro:bit V2 (for now). There are a number of repos containing the C++ of the underlying CODAL runtime:
158-
159-
- https://github.com/microsoft/codal-jacdac: an add-on to CODAL that provides Jacdac runtime, virtual machine, and services representing micro:bit features
160-
- https://github.com/microsoft/pxt-arcade: the MakeCode Arcade editor, with support for NFR52833, the MCU of the micro:bit V2, which depends on
161-
- https://github.com/mmoskal/codal-nrf52833-dk: micro:bit device drivers
162-
- https://github.com/lancaster-university/codal-nrf52: CODAL runtime for NRF52 class MCUs
163-
- https://github.com/lancaster-university/codal-core: CODAL runtime
164-
165-
## Build setup for C++ runtime dev
166-
167-
- clone https://github.com/microsoft/pxt-arcade repo at the same level as `microcode`
168-
- run:
169-
170-
```bash
171-
npm install -g pxt-core
172-
cd pxt-arcade
173-
yarn install
174-
mkdir projects
175-
cd projects
176-
mkdir microcode
177-
cd microcode
178-
export PXT_ASMDEBUG=1
179-
export PXT_COMPILE_SWITCHES=size
180-
export PXT_FORCE_LOCAL=yes
181-
export PXT_NODOCKER=yes
182-
export PXT_RUNTIME_DEV=yes
183-
```
184-
185-
- you may use `npm` instead of `yarn`
186-
- you may skip `PXT_NODOCKER` if you don't have locally installed `arm-none-eabi-gcc`
187-
- in `projects/microcode` create `pxt.json` file with the following contents:
188-
189-
```json
190-
{
191-
"additionalFilePath": "../../../microcode",
192-
"dependencies": {
193-
"game---light": "file:../../libs/game---light",
194-
"hw---n3": "file:../../libs/hw---n3",
195-
"device": "file:../../libs/device",
196-
"codal-jacdac-pxt": "file:../../../microcode/codal-jacdac-pxt"
197-
}
198-
}
199-
```
200-
201-
- run `pxt` - it will compile an deploy
202-
- run `code built/codal/libraries/codal-*`
203-
- checkout `main` or `master` in all `codal-*` repos and in `jacdac-c`
204-
205-
Make sure not to delete `projects/microcode/built` since it contains your sources.
206-
If possible, you can move `built/codal/libraries` folder somewhere else, and symlink it inside `built/codal`
207-
to avoid accidentally deleting it.
208-
209-
## Contributing
210-
211-
This project welcomes contributions and suggestions. Most contributions require you to agree to a
212-
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
213-
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
214-
215-
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
216-
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
217-
provided by the bot. You will only need to do this once across all repos using our CLA.
218-
219-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
220-
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
221-
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
222-
223-
## Trademarks
224-
225-
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
226-
trademarks or logos is subject to and must follow
227-
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
228-
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
229-
Any use of third-party trademarks or logos are subject to those third-party's policies.
6+
MicroCode has moved to [https://microbit-apps.github.io/microcode-classic/docs/develop](https://microbit-apps.github.io/microcode-classic/docs/develop)

docs/faq.md

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,4 @@ title: Frequently Asked Questions
33
image: ./docs/images/generated/sample_smiley_buttons.png
44
---
55

6-
![emoji hello](./images/generated/icon_M19hello.png){:class="icon-sample"}
7-
8-
## How do I share my program?
9-
10-
From the web editor, copy the URL... it contains your whole program.
11-
12-
## How do I print my program?
13-
14-
Click the `screenshot` button at the bottom to get a rendered image of your program that you can share and print.
15-
16-
## How do I translate MicroCode?
17-
18-
Checkout the [localization](./localization) to see how you can help or use a localized build of MicroCode.
19-
20-
## My micro:bit froze and is showing a number
21-
22-
This typically means that MicroCode had a bug and crashed. Here are a few common error codes that are scrolled on the screen:
23-
24-
- **540**: The .hex download was interrupted or failed. Try downloading the .hex file again.
25-
- **020**: Out of memory! Your program is so big that it does not fit in memory anymore... or we have a memory leak somewhere. Try resetting the micro:bit.
26-
27-
Other error codes are [documented in MakeCode](https://makecode.microbit.org/device/error-codes).
28-
29-
## How do I add support for my robot?
30-
31-
If your robot is not [listed](./robots-supported), follow the [instructions](./robots-supported#new-robot) to get it added to the list.
32-
33-
## Can I help?
34-
35-
Yes! MicroCode is open source at https://github.com/microsoft/microcode.
6+
MicroCode has moved here [https://microbit-apps.github.io/microcode-classic/docs/faq](here)

docs/jacdac.md

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,4 @@ title: Jacdac
33
image: ./docs/images/generated/sample_railroad_crossing.png
44
---
55

6-
# Jacdac
7-
8-
![Smiley Button MicroCode program](./images/generated/sample_railroad_crossing.png){:class="screenshot"}
9-
10-
MicroCode will detect [Jacdac](https://aka.ms/jacdac) modules and automatically display tiles for some of them. Tiles are available for all modules in [Kittenbot Jacdac Kit A](https://microsoft.github.io/jacdac-docs/devices/kittenbot/jacdacstarterkitawithjacdaptorformicrobitv2v10/),
11-
as as well as the [Forward Education Climate Kit](https://microsoft.github.io/jacdac-docs/devices/forward-education/climateactionkitv10/). Many of the modules in [Kittenbot Jacdac Kit B](https://microsoft.github.io/jacdac-docs/devices/kittenbot/jacdacdeveloperstoolelectronicmodulekitbv10/) also are supported.
12-
13-
Programming tiles for Jacdac modules appear in the user interface when the modules are connected to the shield. The Jacdac tiles have a small yellow square in the lower-right corner.
14-
15-
### WHEN modules
16-
17-
#### Sensors
18-
19-
- ![magnet sensor](./images/generated/icon_S10.png){:class="icon"} `magnet sensor` detects the presence of a magnet (levels 1 - 5, where 1 means no magnet present and 5 means strong presence of magnetic field)
20-
- ![light sensor](./images/generated/icon_S5.png){:class="icon"} `light sensor` measures the amount of light (levels 1 - 5, where 1 means little light present and 5 means a lot of light present)
21-
- ![moisture sensor](./images/generated/icon_S16.png){:class="icon"}
22-
measures the amount of moisture (levels 1 - 5, where 1 means very dry and 5 means very wet)
23-
- ![distance sensor](./images/generated/icon_S17.png){:class="icon"} `distance sensor` measures the distance to an object (levels 1 - 5, where 1 means very close and 5 means far away)
24-
- ![line sensor](./images/generated/icon_S18.png){:class="icon"} `line sensor` detects
25-
whether the surface under the sensor is dark or light
26-
27-
#### User inputs
28-
29-
- ![slider](./images/generated/icon_S11.png){:class="icon"} `slider` measures the position of a physical slider (1-5, where 1 is minimum position and 5 is maximum position)
30-
- ![dial](./images/generated/icon_S12.png){:class="icon"} `dial` has two associated events: turn left ![turn left](./images/generated/icon_F21L.png){:class="icon"} and turn right ![turn right](./images/generated/icon_F21R.png){:class="icon"}
31-
- ![key](./images/generated/icon_F5.png){:class="icon"} `key` is available in the press/release event.
32-
33-
### DO modules
34-
35-
- ![LED](./images/generated/icon_A8.png){:class="icon"} `LED` set a color animation on a programmable LED strip
36-
- ![relay tile](./images/generated/icon_A22.png){:class="icon"} `relay` controls a relay switch (turning it on or off)
37-
- ![servo power tile](./images/generated/icon_A23.png){:class="icon"} `servo power` controls the power to a servo motor (turning it on or off)
38-
- ![servo set angle tile](./images/generated/icon_A21_.png){:class="icon"} `set servo angle` controls the orientation of a servo motor arm. The ![servo set angle tile](./images/generated/icon_A21_.png){:class="icon"} `servo` arm orientation is mapped to the wall clock hours: `0` (or `12`) is on rotated 90 degree from the resting position to the left, `6` is rotated 90 degree right from the rest position. This operation depends on the servo being powered on.
39-
40-
### Jacdac samples
41-
42-
See the [following programs](./samples.md#jacdac) for examples of how to use Jacdac modules with MicroCode.
6+
MicroCode has moved here [https://microbit-apps.github.io/microcode-classic/docs/jacdac](here)

0 commit comments

Comments
 (0)