Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 404, Document other Microbit Versions #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 24 additions & 5 deletions src/hardware/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ What does this board contain? For full details see the [microbit hardware page][
[microbit]: http://tech.microbit.org/hardware

- A Nordic nRF51822 microcontroller. This microcontroller has

- A single core ARM Cortex-M0 processor with a maximum clock frequency of 16 MHz.

- 256 KB of flash memory. (1 KB = 10**24** bytes)
Expand All @@ -28,9 +28,9 @@ What does this board contain? For full details see the [microbit hardware page][

- A 5x5 array of user LEDs.

- A configureable 23-pin edge connector
- A configurable 23-pin edge connector

- A 2.4GHz radio transciever with support for [bluetooth low energy][ble] (BLE).
- A 2.4GHz radio transceiver with support for [bluetooth low energy][ble] (BLE).

[ble]: https://en.wikipedia.org/wiki/Bluetooth_Low_Energy

Expand All @@ -45,17 +45,36 @@ What does this board contain? For full details see the [microbit hardware page][
[magnetometer]: https://en.wikipedia.org/wiki/Magnetometer

- A second microcontroller: NXP/Freescale KL26Z. This microcontroller handles the USB interface,
communication between your computer and the main microcontroller,
communication between your computer and the main microcontroller,
and converting the USB's input voltage from 5V to 3.3V.

## Versions

At the time of writing there are (soon to be) 3 released versions.
The Microbit foundation goes to herculean lengths to make this detail unimportant to you.
Here documents what you might want to know or how to find out.

- 1.3B [schematics][schematics1.3], The initial release
- 1.5 [schematics][schematics1.5], Combined the compass and accelerometer chips. [All Changes][1.3to1.5]
- 2 [new][2news], Announced new hex format, nRF52833, speaker, microphone.
- For full details see the [microbit hardware page][microbit]

If you're wondering where the other numbers are they'll be developer iterations you won't find in the wild.

[hwgithub]: https://github.com/bbcmicrobit/hardware
[schematics1.3]: https://github.com/bbcmicrobit/hardware/blob/08876867dc77a7e3af026d6db3c021f05116e10f/V1.3B/SCH_BBC-Microbit_V1.3B.pdf
[schematics1.5]: https://github.com/bbcmicrobit/hardware/blob/08876867dc77a7e3af026d6db3c021f05116e10f/V1.5/SCH_BBC-Microbit_V1.5.PDF
[1.3to1.5]: https://support.microbit.org/support/solutions/articles/19000087020-micro-bit-motion-sensor-hardware-change
[2news]: https://tech.microbit.org/latest-revision/announcement/

## Micro-USB Cable

This comes with your microbit but can be any generic cable,
and is used to connect the microbit to your computer.

## External battery pack

The external battery pack that comes with the microbit will not be used explicitly as part of this guide,
The external battery pack that comes with the microbit will not be used explicitly as part of this guide,
but feel free to use it to test your software without being tethered to a computer.

## Plugging it in
Expand Down
15 changes: 6 additions & 9 deletions src/hello-world/03.00.LED.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
> GPIO: General purpose input-output

The GPIO is a block of pins found on nearly all microcontrollers.
As the name implies, they are general-purpose, configureable, analog or digital, input or output, electrical pins.
As the name implies, they are general-purpose, configurable, analog or digital, input or output, electrical pins.
Exactly what features each pin has on a given microcontroller will require looking at a datasheet.

> Analog vs Digital: Analog signals carry data in their amplitude as they continuously vary over time,
Expand All @@ -17,7 +17,7 @@ Exactly what features each pin has on a given microcontroller will require looki

Let us now turn on an LED! But how?

Many integrated periperals like LEDs and buttons are already connected to certain GPIO pins,
Many integrated peripherals like LEDs and buttons are already connected to certain GPIO pins,
so lighting up an LED can be as simple as configuring a GPIO pin to be a digital output.

First we should look at the [documentation of our crate][microbit],
Expand All @@ -26,7 +26,7 @@ and set individual pins high and low:

[microbit]: https://docs.rs/microbit/0.5.1/microbit/

``` rust
```rust
// This takes singleton ownership of the micro:bit's peripherals
if let Some(p) = microbit::Peripherals::take() {
// Take the micro:bit's GPIO
Expand All @@ -39,12 +39,12 @@ if let Some(p) = microbit::Peripherals::take() {
```

Next we need to see how these pins are hooked up,
for that we need [the micro:bit schematics][schematics] linked to at the bottom of [the hardware overview][hw].
for that we need [the micro:bit schematics (1.3B)](https://github.com/bbcmicrobit/hardware/blob/08876867dc77a7e3af026d6db3c021f05116e10f/V1.3B/SCH_BBC-Microbit_V1.3B.pdf), [All Versions](src\hardware\README.md#versions).
On the first sheet you should find a diagram with a grid of numbered LEDs.

> If you do not know much about electronics:
> Each row and column (labelled ROW and COL) represent a GPIO output pin.
> The components labelled are LEDs.
> Each row and column (labeled ROW and COL) represent a GPIO output pin.
> The components labeled are LEDs.
> LEDs only let current flow one way, and only emit light when current is flowing.
> If a row is set high, high voltage, and a column is set low, low voltage,
> the LED at the point that they cross will have a potential difference across it;
Expand All @@ -58,7 +58,4 @@ This is usually done to make the circuit design easier.

The fifth sheet shows how each row and column correspond to each GPIO pin.

[hw]: http://tech.microbit.org/hardware/
[schematics]: https://github.com/bbcmicrobit/hardware/blob/master/SCH_BBC-Microbit_V1.3B.pdf

You should now have enough information to try and turn on an LED.