Skip to content

Commit

Permalink
Updates 19 11 20 (#102)
Browse files Browse the repository at this point in the history
* make newsletter more prominent

* Squashed 'docs/' changes from ae437c7..4cb9286

4cb9286 add community buttons to index
f14030c add error hex to hex tool page
3d71f9d Merge branch 'uhex-page'
854577a add hex format spec link
1d5265b add details of uHex tool (#213)
a1401e3 fix links
f5464d9 Rewrite community page (#203)
09c6b6a add details of uHex tool
652023b Update BLE services file location
cd87b61 Merge branch 'master' of https://github.com/microbit-foundation/dev-docs
3229f78 update feature availibility
9cf9964 Update latest-revision-main.md (#209)
a7eb1ae Update edgeconnector.md: Fix badly rendered "V2" (#208)
6afa1e6 Correct spelling mistake (#210)
1af07f4 update CODAL info
c72e636 Brand tidy up: v1 v2 > V1 V2
3f33b0f add audio expression api
8ac53a3 update BLE profile roles
38464b4 Update Soft Device SD140 > SD113 (#198)
0f1b15d add new brand guidelines info
3d3c6ed fix links
8260131 fix links
504c6df remove link to uhex spec as it 404s
bee772f remove link to python mailing list
ce75bb4 remove duplicate MakeCode
21c6a16 update table 200mA > 190mA
9cffab0 Update info on MakeCode blocks
cc01c0f Latest updates for MakeCode and DAPLink (#193)
18ff8f7 Update hex-format.md: add missing space (#190)
af73c3c Update apps-and-examples.md: add missing space (#189)
1f7d600 Spelling mistake (#186)
b24c88f Re-phrasing bluetooth section (#181)
4007b76 Rephrase "lozenge" to "rounded rectangular" (#180)
f8ca9aa Merge pull request #179 from Gadgetoid/spelling
afe3441 Spelling and consistency tweaks
7b0e132 Merge pull request #175 from Gadgetoid/doc-consistency
ac8b131 Consistent use of whitespace and Markdown formatting
670d1f1 Remove hard linebreaks and trailing whitespace (#174)
6be457a update iOS beta instructions (#173)
1b2f2ec Update DAPLink error message (#171)
955cf1a spelling

git-subtree-dir: docs
git-subtree-split: 4cb9286

* add newsletter archive

* Squashed 'docs/' changes from 4cb9286..4e786f5

4e786f5 add news archive
c7ad57d Merge branch 'master' into nov2-sprint-updates
94aff4f update APIs and editors

git-subtree-dir: docs
git-subtree-split: 4e786f5

* Squashed 'docs/' changes from 4e786f5..faa62ab

faa62ab update for Python release

git-subtree-dir: docs
git-subtree-split: faa62ab

* Squashed 'docs/' changes from faa62ab..dbe04f9

dbe04f9 update for Python release
0a4aa2e add news archive
d90d3ce add community buttons to index
a55fe95 add error hex to hex tool page
REVERT: faa62ab update for Python release
REVERT: 4e786f5 add news archive
REVERT: c7ad57d Merge branch 'master' into nov2-sprint-updates
REVERT: 4cb9286 add community buttons to index
REVERT: f14030c add error hex to hex tool page

git-subtree-dir: docs
git-subtree-split: dbe04f9

* Squashed 'docs/' changes from dbe04f9..677f242

677f242 Nov2 sprint updates (#226)
c92dd07 Update latest-revision-main.md (#223)
REVERT: dbe04f9 update for Python release
REVERT: 0a4aa2e add news archive
REVERT: d90d3ce add community buttons to index
REVERT: a55fe95 add error hex to hex tool page

git-subtree-dir: docs
git-subtree-split: 677f242
  • Loading branch information
microbit-mark authored Nov 26, 2020
1 parent 78aa3ef commit 8d7ebeb
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 58 deletions.
22 changes: 22 additions & 0 deletions community/developer-news.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
layout: page
order:
title: Developer news
heading: Join the micro:bit developer conversation
description: Sign up to and view the developer news
permalink: /community/news/
ref: news
lang: en
---

## The DAL, Editors and Devices newsletter

In addition to our regular [Micro:bit Educational Foundation newsletter](https://mailchi.mp/microbit/newsletter), our [DAL, Editors and Devices](https://microbit.us14.list-manage.com/subscribe?u=e1c30f24b90ff3d70275cfff2&id=25403c7650) newsletter is a low volume digest on the technical aspects of micro:bit. The details you provide are processed in accordance with The Foundation's [privacy policy](https://microbit.org/privacy/).

<div style="text-align: center;">
<a href="https://microbit.us14.list-manage.com/subscribe?u=e1c30f24b90ff3d70275cfff2&id=25403c7650" class="btn sm-btn" role="button" style="margin-bottom: 2rem;">Subscribe to DAL, Editors and Devices</a>
</div>

## News archive

{% include newsletter-archive.html %}
6 changes: 6 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ We hope to encourage contributions into these projects in order to broaden our e

The Micro:bit Educational Foundation aims to be a 'responsible downstream' to the many open source [software](https://tech.microbit.org/software/) projects that are used to build the micro:bit: much like a good Linux distribution collates, tests, stabilises and releases combinations of many diverse open source packages, the micro:bit Educational Foundation and the micro:bit community present micro:bit users with a stable, tested release of all the things you need to make the magical 'end-to-end' micro:bit experience.

## Latest news

For the latest news and community updates, join our mailing list and Slack group.

{% include community.html %}

## Help us build it

If you'd like to help us make the micro:bit better, then there are a number of ways that you can get involved.
Expand Down
4 changes: 2 additions & 2 deletions latest-revision/latest-revision-editors.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The exisiting API has not changed. Scripts that use features that are common to

To support all revisions of the micro:bit, you will need to ensure you use the latest release of the MicroPython binary with your editor. The simplest way to do this is to flash a program created in the latest Python Editor which will contain the latest MicroPython build.

[https://python.microbit.org/v/beta/](https://python.microbit.org/v/beta/)
[https://python.microbit.org/](https://python.microbit.org/)

## If you’re using the micro:bit profile over BLE

Expand Down Expand Up @@ -100,7 +100,7 @@ A clear indication that you are working with this format is that a compiled .hex

We have developed a [Universal Hex Creator](../../software/universal-hex-creator) tool, to easily create a .hex file that will support all micro:bit variants.

This tool is based on a [Universal Hex JavaScript Library](https://github.com/microbit-foundation/microbit-universal-hex), written to implement the format and associated detailed [specification of the Universal Hex format](https://github.com/microbit-foundation/universal-hex/). Please [get in contact](mailto:[email protected]?subject=Request%20for%20access%20to%20Universal%20hex&20spec&body=Name%3A%0D%0A%0D%0AGitHub%20ID%3A) if you require access to the specification.
This tool is based on a [Universal Hex JavaScript Library](https://github.com/microbit-foundation/microbit-universal-hex), written to implement the format and associated detailed [specification of the Universal Hex format](https://github.com/microbit-foundation/spec-universal-hex).

### Hex format compatibility

Expand Down
83 changes: 29 additions & 54 deletions latest-revision/latest-revision-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,55 +78,6 @@ In an effort to ensure the greatest degree of continuity for teachers, users wil

This means that you can use MakeCode or the online Python Editor as you always have, to use all of the features that are common to both version of the BBC micro:bit: Display, buttons, motion sensing, gestures like shake, light sensing, and even the Music blocks.

## Feature availability

These are the V2 features and whether we expect them to work as expected ✅ or not 🛑, or there are issues still to be fixed 🔶.

| **Feature** | **Codal** | **MakeCode** | **MakeCode Simulator** | **MicroPython** |
| ---------------- | --------- | ------------ | ---------------------- | --------------- |
| Microphone |||||
| Speaker ||| 🛑 ||
| Logo touch |||||
| Power management ||| 🛑 ||
| Sound emoji |||||

## Feature API availability

These are the V2 specific APIs and whether we expect them to work as expected ✅ or not 🛑, or there are issues still to be fixed 🔶.

{% include alert-info.html content="It is important that we work with the community to establish how these APIs work. As such they are subject to change as we get feedback and iterate on them.
When they are finalised, we will notify people via the [DAL, Editors and Devices](https://microbit.us14.list-manage.com/subscribe?u=e1c30f24b90ff3d70275cfff2&id=25403c7650) newsletter." %}

### MakeCode APIs

| API | Blocks | Status | GitHub Issues |
| --------------------------------------------------- | -------------------- | --------------------- | ------------- |
| On loud/quiet sound `input.onSound(SoundType.Loud)` - Triggers after a transition from quiet-loud/loud-quiet, so 'on quiet' will trigger after a loud sound but not continuously | ![on loud sound](/docs/latest-revision/assets/makecode-blocks/loudsound.png){: width="125"} || |
| Set pin touch type `pins.touchSetType(TouchTarget.P0, TouchType.Resistive)`- capacitive/resistive - Logo is capacitive, large pins are resistive by default. | ![set touch type](/docs/latest-revision/assets/makecode-blocks/pin-mode.png){: width="650"} || |
| On Logo pressed `input.onLogoPressed()` | ![logo pressed](/docs/latest-revision/assets/makecode-blocks/onLogoPressed.png){: width="125"} || |
| On logo released `input.onLogoReleased()` | ![logo released](/docs/latest-revision/assets/makecode-blocks/onLogoReleased.png){: width="125"} || |
| Logo is pressed `input.logoIsPressed()` | ![logo is pressed](/docs/latest-revision/assets/makecode-blocks/logoIsPressed.png){: width="150"} || |
| Set on-board speaker On/Off `music.setOnBoardSpeakerEnable(false)` - Edge connector will still output sound | ![speaker disabled](/docs/latest-revision/assets/makecode-blocks/speakerDisabled.png){: width="650"} || |
| Set sound threshold level `input.setSoundThreshold(SoundType.Loud, 128)` - 0-255 threshold for triggering a 'loud' or 'quiet' sound | ![sound threshold](/docs/latest-revision/assets/makecode-blocks/setSoundThreshold.png){: width="650"} || |
| Sound level - returns a filtered 'noise level' not raw microphone samples, useful for eg. 'how noisy is my classroom?' `input.soundLevel()` | ![sound level](/docs/latest-revision/assets/makecode-blocks/soundLevel.png){: width="125"} | 🔶 On battery, the 'soundLevel' reported for quiet sounds is higher than the level reported on USB. |[codal-microbit#131](https://github.com/microbit-foundation/codal-microbit/issues/131) |
| Play sound `soundExpression.giggle.play()`/`soundExpression.giggle.playUntilDone()` - Play from a selection of pre-defined sound emoji | ![play sound](/docs/latest-revision/assets/makecode-blocks/playSound.png){: width="650"} || |

### Python APIs

| API | Usage | Status | GitHub Issues |
| ------------------------------------------ | ------------ | ---------------------------- | ------------- |
| play sound expression (giggle, happy, hello, mysterious, sad, slide, soaring, spring, twinkle, yawn) | `audio.play("hello")`|| |
| Choose music/pitch output pin | `music.play(music.JUMP_UP, pin=microbit.pin_speaker, wait=True)` || |
| Stop music on pin | `music.stop(pin=microbit.pin_speaker)` || |
| Set the volume 0-255 | `microbit.set_volume(128)` || |
| Get current sound loud/quiet |`microbit.microphone.current_sound()` || |
| Check current sound == loud/quiet | `microbit.microphone.current_sound() == microbit.microphone.LOUD` || |
| Check if a loud/quiet sound occurred since the last call to was_sound() | `microbit.microphone.was_sound(microbit.microphone.LOUD)` || |
| Get history of sounds since last call to get_sounds() | `microbit.microphone.get_sounds()` || |
| Set threshold for sound 0-255 | `microbit.microphone.set_threshold(microbit.microphone.LOUD, 128)` || |
| Get current sound level in range 0-255 | `microbit.microphone.sound_level()` || |
| Logo is touched | `microbit.pin_logo.is_touched()` || |

## How do I use the new features?

The **speaker** works in the same way you would expect when you connect up your headphones or an external speaker to the micro:bit. By default, the sound output will be on both the speaker and Edge connector.
Expand All @@ -135,12 +86,12 @@ The **logo touch** is implemented in the same way as touching a pin on the edge

To access the features of the latest revision only (eg. to output sound only on the speaker and not the edge connector), you will need to add additional code to your programs. This ensures that the default editor experience continues to work for everyone, regardless of the board revision.

Features that are common to all board variants will work in the same way they always have. For example, you will be able to use the same blocks in MakeCode to use the acceleromater on any board revision.
Features that are common to all board variants will work in the same way they always have. For example, you will be able to use the same blocks in MakeCode to use the accelerometer on any board revision.

### Makecode
You can use the latest board revision in the beta editor [https://makecode.microbit.org/beta](https://makecode.microbit.org/beta) alongside the current revision.
You can use the latest board revision in the live micro:bit editor [https://makecode.microbit.org](https://makecode.microbit.org) alongside the current revision.

#### Using the new features in MakeCode beta
#### Using the new features in MakeCode

The Microphone and Logo touch features can be found in the Input menu

Expand All @@ -150,9 +101,9 @@ The Capacative/Resistive touch mode can be found in the Pins menu

### Python

You can use the latest board revision and APIs in the Python beta editor:
You can use the latest board revision and APIs in the Python editor:

[https://python.microbit.org/v/beta](https://python.microbit.org/v/beta/)
[https://python.microbit.org/](https://python.microbit.org/)

If you want to use a specific or custom build of MicroPython you can do this in [Mu](https://codewith.mu/).

Expand All @@ -161,6 +112,30 @@ You can use the latest board revision and APIs in the Python beta editor:

![Copy main.py](/docs/latest-revision/assets/copy-main-py-mu.gif){: width="600"}

#### Using the new features in Python

We are currently working on updates to MicroPython documentation, but you can find Python APIs by searching via the REPL for example:

```Python
import microbit
dir(microbit)
```
### Python APIs

| API | Usage |
|--------------------------------------------|--------------|
| play sound expression (GIGGLE, HAPPY, HELLO, MYSTERIOUS, SAD, SLIDE, SOARING, SPRING, TWINKLE, YAWN) | `audio.play(microbit.Sound.HELLO)`|
| Choose music/pitch output pin | `music.play(music.JUMP_UP, pin=microbit.pin_speaker, wait=True)` |
| Stop music on pin | `music.stop(pin=microbit.pin_speaker)` |
| Set the volume 0-255 | `microbit.set_volume(128)` |
| Get current sound loud/quiet |`microbit.microphone.current_sound()` |
| Check current sound == loud/quiet | `microbit.microphone.current_sound() == microbit.microphone.LOUD` |
| Check if a loud/quiet sound occurred since the last call to was_sound() | `microbit.microphone.was_sound(microbit.microphone.LOUD)` |
| Get history of sounds since last call to get_sounds() | `microbit.microphone.get_sounds()` |
| Set threshold for sound 0-255 | `microbit.microphone.set_threshold(microbit.microphone.LOUD, 128)` |
| Get current sound level in range 0-255 | `microbit.microphone.sound_level()` |
| Logo is touched | `microbit.pin_logo.is_touched()` |

## Universal Hex Format

The editors and apps are compatible with and will let you download and flash a file to any micro:bit revision. This is called a **Universal Hex** file. A clear indication that you are working with this format is that a compiled .hex file will be ~1.8Mb as opposed to ~700Kb in size.
Expand Down
14 changes: 13 additions & 1 deletion software/hex-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,19 @@ The latest board revision introduces a superset of the Intel-Hex format that ena
A **Universal Hex** hex file will work on a V1 or V2 board.
A clear indication that you are working with this format is that a compiled .hex file will be ~1.8Mb as opposed to ~700Kb in size.

A [Universal Hex JavaScript Library](https://github.com/microbit-foundation/microbit-universal-hex) has been written to implement the format and associated detailed [specification of the Universal Hex format](https://github.com/microbit-foundation/universal-hex/).
A [Universal Hex JavaScript Library](https://github.com/microbit-foundation/microbit-universal-hex) has been written to implement the format and associated detailed [specification of the Universal Hex format]https://github.com/microbit-foundation/spec-universal-hex).

## Universal Hex Creator

We have created a [Universal Hex Creator](../universal-hex-creator) tool, to easily create a .hex file that will support all micro:bit variants.

This tool is based on the [Universal Hex JavaScript Library](https://github.com/microbit-foundation/microbit-universal-hex).

## Universal Hex Creator

We have created a [Universal Hex Creator](../universal-hex-creator) tool, to easily create a .hex file that will support all micro:bit variants.

This tool is based on the [Universal Hex JavaScript Library](https://github.com/microbit-foundation/microbit-universal-hex).

## Universal Hex Creator

Expand Down
6 changes: 5 additions & 1 deletion software/universal-hex-tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ review-with: carlospa

The Universal Hex Creator lets you combine a hex file created for a micro:bit V1 device and a hex file created for a V2 device, resulting in a Universal Hex format that is compatible with all revisions of the micro:bit.

DAPLink will process the Universal Hex and only write data to the relevant board revision; V1 or V2. More information is available on our [Hex format](../hex-format) page and the [Javascript/Typescript libary](https://github.com/microbit-foundation/microbit-universal-hex) on which the Universal Hex Creator tool is based.
DAPLink will process the Universal Hex and only write data to the relevant board revision; V1 or V2. More information is available on our [Hex format](../hex-format), the [Javascript/Typescript libary](https://github.com/microbit-foundation/microbit-universal-hex) on which the Universal Hex Creator tool is based and the associated [Universal Hex specification](https://github.com/microbit-foundation/spec-universal-hex).

To support [cross-device compatibility](../hex-format/#cross-device-compatibility), we have created a [standalone error hex](/docs/software/assets/stand-alone-error-v1.hex) that can be combined with a V2 only hex in this tool to produce a Hex that will work on a V2 board, but error if used on a V1.

[Download standalone error hex](/docs/software/assets/stand-alone-error-v1.hex){: .btn.sm-btn download}

{% include uhex-tool.html %}

0 comments on commit 8d7ebeb

Please sign in to comment.