Skip to content

Latest updates for MakeCode and DAPLink #193

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

Merged
merged 2 commits into from
Oct 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 16 additions & 12 deletions latest-revision/latest-revision-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ These are the V2 features and whether we expect them to work as expected ✅ or

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

Expand All @@ -106,15 +106,15 @@ When they are finalised, we will notify people via the [DAL, Editors and Devices
| 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"} | ✅ | |
| Enable/Disable speaker `music.setOnBoardSpeakerEnable(false)` - Edge connector will still output sound | ![speaker enabled](/docs/latest-revision/assets/makecode-blocks/speakerEnabled.png){: width="650"} | ✅ | |
| 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) |
| Volume `music.volume` returns current volume | ![volume](/docs/latest-revision/assets/makecode-blocks/volume.png){: width="90"} | ✅ | |
| 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 |
| ------------------------------------------ | ------------ | ------------------------------ | ------------- |
| ------------------------------------------ | ------------ | ---------------------------- | ------------- |
| 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)` | ✅ | |
Expand All @@ -138,21 +138,20 @@ Features that are common to all board variants will work in the same way they al

### MakeCode

You can use the latest board revision in the beta editor [https://makecode.microbit.org/beta](https://makecode.microbit.org/beta)
### 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. This editor does not yet have support for V2 features.

#### Using the new features in MakeCode

An extension has been developed to include the microphone and logo touch features currently available. [https://github.com/microbit-foundation/pxt-microbit-v2-extension](https://github.com/microbit-foundation/pxt-microbit-v2-extension)

1. Open [https://makecode.microbit.org/beta](https://makecode.microbit.org/beta)
2. Select Advanced > Add Extension and paste [https://github.com/microbit-foundation/pxt-microbit-v2-extension](https://github.com/microbit-foundation/pxt-microbit-v2-extension) into the search box.
3. Click on the extension to add it to the toolbox.
An alpha version of the MakeCode editor that includes the latest V2 feature blocks is available at [https://makecode.microbit.org/v3.1](https://makecode.microbit.org/v3.1)

#### V2 MakeCode APIs

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

The Speaker features can be found in the music menu
The Speaker features can be found in the Music menu

The Capacative/Resistive touch mode can be found in the Pins menu

### Python

Expand Down Expand Up @@ -191,6 +190,11 @@ If you attempt to use an old .hex file without updating it, the micro:bit will d

If you haven’t already received a device, but would like one in order to test/develop an accessory or editor please contact us at [support@microbit.org](mailto:support@microbit.org?subject=Request%20for%20the%20latest%20micro%3Abit&body=Name%3A%0D%0A%0D%0AAddress%3A%0D%0A%0D%0AContact%20number%3A)

## How do I update the firmware for the latest micro:bit?
The latest micro:bit will ship with the latest DAPLink firmware at version 0255. If you have been testing the latest board or need to re-flash the firmware, it is linked here, but you can also find details about this on our [DAPLink](../software/daplink-interface/) page.

[Download 0255 firmware for V2](https://cdn.sanity.io/files/ajwvhvgo/production/2cfe581e01f533513276485375adec3f00153af5.hex?dl){: .btn.sm-btn download}

## How do I find out more about the hardware and software updates?

Our [DAL, Devices and Editors mailing list](http://eepurl.com/dyRx-v) provides up to date information about the any technical changes regarding the micro:bit.
Expand Down
Loading