Skip to content

Commit 8f29480

Browse files
committed
start on guide
1 parent b6666c5 commit 8f29480

5 files changed

Lines changed: 84 additions & 8 deletions

File tree

.astro/content-modules.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11

22
export default new Map([
33
["src/content/docs/index.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fdocs%2Findex.mdx&astroContentModuleFlag=true")],
4-
["src/content/docs/microdata/start.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fdocs%2Fmicrodata%2Fstart.mdx&astroContentModuleFlag=true")],
5-
["src/content/docs/microdata/guide.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fdocs%2Fmicrodata%2Fguide.mdx&astroContentModuleFlag=true")],
64
["src/content/docs/getting-started/display-shields.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fdocs%2Fgetting-started%2Fdisplay-shields.mdx&astroContentModuleFlag=true")],
7-
["src/content/docs/microcode/start.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fdocs%2Fmicrocode%2Fstart.mdx&astroContentModuleFlag=true")],
8-
["src/content/docs/microcode/guide.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fdocs%2Fmicrocode%2Fguide.mdx&astroContentModuleFlag=true")],
9-
["src/content/docs/resources/display-shield-ui.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fdocs%2Fresources%2Fdisplay-shield-ui.mdx&astroContentModuleFlag=true")],
105
["src/content/docs/extensions/display-shield-ext.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fdocs%2Fextensions%2Fdisplay-shield-ext.mdx&astroContentModuleFlag=true")],
116
["src/content/docs/getting-started/intro.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fdocs%2Fgetting-started%2Fintro.mdx&astroContentModuleFlag=true")],
7+
["src/content/docs/microcode/guide.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fdocs%2Fmicrocode%2Fguide.mdx&astroContentModuleFlag=true")],
8+
["src/content/docs/microcode/start.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fdocs%2Fmicrocode%2Fstart.mdx&astroContentModuleFlag=true")],
9+
["src/content/docs/microdata/start.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fdocs%2Fmicrodata%2Fstart.mdx&astroContentModuleFlag=true")],
10+
["src/content/docs/microdata/guide.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fdocs%2Fmicrodata%2Fguide.mdx&astroContentModuleFlag=true")],
11+
["src/content/docs/resources/display-shield-ui.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fdocs%2Fresources%2Fdisplay-shield-ui.mdx&astroContentModuleFlag=true")],
1212
["src/content/docs/resources/faq.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fdocs%2Fresources%2Ffaq.mdx&astroContentModuleFlag=true")],
1313
["src/content/docs/resources/troubleshooting.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fdocs%2Fresources%2Ftroubleshooting.mdx&astroContentModuleFlag=true")]]);
1414

.astro/data-store.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/content/docs/microcode/guide.mdx

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,68 @@
22
title: MicroCode Guide
33
description: The MicroCode UI and languages
44
---
5+
6+
<CardGrid>
7+
<Card title="MicroCode home page">
8+
![microcode](../../../assets/microcode-splash.png)
9+
</Card>
10+
<Card title="Emotion badge program">
11+
![microcode](../../../assets/microcode-editor.png)
12+
</Card>
13+
</CardGrid>
14+
15+
## The emotion badge program
16+
17+
The MicroCode home page (above, left) has three selectable tiles
18+
for editing the current program, selecting from a sample of programs
19+
(including the empty program), and recovering a program previously
20+
saved in one of three slots.
21+
22+
Selecting the edit tile with the A button on the display-shield
23+
the very first time will open the sample `emotion badge` program
24+
in the MicroCode editor (above, right).
25+
26+
As both the display shield and micro:bits have A and B buttons,
27+
we will use `d-A` and `d-B` to refer to the shield's buttons
28+
and `m-A` and `m-B` to refer to the micro:bit's buttons. Note
29+
that the micro:bit buttons have triangular labels next to them.
30+
31+
### Reading the program
32+
33+
The program consists of four **When-Do** rules:
34+
35+
- the **When** section is the left side of the rule and describes an event.
36+
- the **Do** section is the right side of the rule and describes an action to perform.
37+
38+
The first two rules fire on the press of the m-A button.
39+
The second two rules fire on the press of the m-B button.
40+
The first and third rules display animations of happy and sad faces.
41+
The second and fourth rules play happy and sad sounds.
42+
43+
### Running the program
44+
45+
You can run the program in one of three ways:
46+
47+
- use the direction pad to navigate to the green play tile and press `d-A`
48+
- press either the `m-A` or `m-B` button on the micro:bit
49+
- press the `menu` button on the display shield
50+
51+
The micro:bit will indicate the program is running by a quick circular
52+
animation on the LED display.
53+
54+
### Stopping the program
55+
56+
The program will continue to run until
57+
58+
- you move to and select the stop tile (to the right of the play tile), or
59+
- you edit the program
60+
61+
### Running without the display shield
62+
63+
If you remove the micro:bit from the shield and power it via battery or
64+
USB, the last program you edited in MicroCode will begin to run.
65+
66+
## Creating your first program
67+
68+
69+
import { Card, CardGrid, LinkCard } from '@astrojs/starlight/components';

src/content/docs/microcode/start.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ description: A powerful programming environment for micro:bit
44
---
55

66
<CardGrid>
7-
<Card title="MicroCode Home Page">
7+
<Card title="MicroCode home page">
88
![microcode](../../../assets/microcode-splash.png)
99
</Card>
10-
<Card title="MicroCode Editor">
10+
<Card title="MicroCode editor">
1111
![microcode](../../../assets/microcode-editor.png)
1212
</Card>
1313
</CardGrid>

src/content/docs/resources/faq.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,14 @@
22
title: Frequently Asked Questions
33
description: Answers to common questions about micro:bit apps
44
---
5+
6+
7+
## A and B button confusion
8+
9+
It is unfortunate that the micro:bit and the display shield both have
10+
their own A and B buttons. We will distinguish the buttons in the
11+
documentation here as follows:
12+
13+
- we will use `d-A` and `d-B` to refer to the A and B buttons on the display shield
14+
- we will use `m-A` and `m-B` to refer to the A and B buttons on the micro:bit
15+

0 commit comments

Comments
 (0)