You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: latest-revision/latest-revision-main.md
+27-52Lines changed: 27 additions & 52 deletions
Original file line number
Diff line number
Diff line change
@@ -78,55 +78,6 @@ In an effort to ensure the greatest degree of continuity for teachers, users wil
78
78
79
79
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.
80
80
81
-
## Feature availability
82
-
83
-
These are the V2 features and whether we expect them to work as expected ✅ or not 🛑, or there are issues still to be fixed 🔶.
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 🔶.
96
-
97
-
{% 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.
98
-
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." %}
| 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 |{: width="125"} | ✅ ||
105
-
| Set pin touch type `pins.touchSetType(TouchTarget.P0, TouchType.Resistive)`- capacitive/resistive - Logo is capacitive, large pins are resistive by default. |{: width="650"} | ✅ ||
106
-
| On Logo pressed `input.onLogoPressed()`|{: width="125"} | ✅ ||
107
-
| On logo released `input.onLogoReleased()`|{: width="125"} | ✅ ||
108
-
| Logo is pressed `input.logoIsPressed()`|{: width="150"} | ✅ ||
109
-
| Set on-board speaker On/Off `music.setOnBoardSpeakerEnable(false)` - Edge connector will still output sound |{: width="650"} | ✅ ||
110
-
| Set sound threshold level `input.setSoundThreshold(SoundType.Loud, 128)` - 0-255 threshold for triggering a 'loud' or 'quiet' sound |{: width="650"} | ✅ ||
111
-
| Sound level - returns a filtered 'noise level' not raw microphone samples, useful for eg. 'how noisy is my classroom?' `input.soundLevel()`|{: 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)|
112
-
| Play sound `soundExpression.giggle.play()`/`soundExpression.giggle.playUntilDone()` - Play from a selection of pre-defined sound emoji |{: width="650"} | ✅ ||
| Check if a loud/quiet sound occurred since the last call to was_sound() |`microbit.microphone.was_sound(microbit.microphone.LOUD)`| ✅ ||
125
-
| Get history of sounds since last call to get_sounds() |`microbit.microphone.get_sounds()`| ✅ ||
126
-
| Set threshold for sound 0-255 |`microbit.microphone.set_threshold(microbit.microphone.LOUD, 128)`| ✅ ||
127
-
| Get current sound level in range 0-255 |`microbit.microphone.sound_level()`| ✅ ||
128
-
| Logo is touched |`microbit.pin_logo.is_touched()`| ✅ ||
129
-
130
81
## How do I use the new features?
131
82
132
83
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.
@@ -135,12 +86,12 @@ The **logo touch** is implemented in the same way as touching a pin on the edge
135
86
136
87
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.
137
88
138
-
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.
89
+
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.
139
90
140
91
### Makecode
141
-
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.
92
+
You can use the latest board revision in the live micro:biteditor [https://makecode.microbit.org](https://makecode.microbit.org) alongside the current revision.
142
93
143
-
#### Using the new features in MakeCode beta
94
+
#### Using the new features in MakeCode
144
95
145
96
The Microphone and Logo touch features can be found in the Input menu
146
97
@@ -161,6 +112,30 @@ You can use the latest board revision and APIs in the Python beta editor:
| Stop music on pin |`music.stop(pin=microbit.pin_speaker)`|
130
+
| Set the volume 0-255 |`microbit.set_volume(128)`|
131
+
| Get current sound loud/quiet |`microbit.microphone.current_sound()`|
132
+
| Check current sound == loud/quiet |`microbit.microphone.current_sound() == microbit.microphone.LOUD`|
133
+
| Check if a loud/quiet sound occurred since the last call to was_sound() |`microbit.microphone.was_sound(microbit.microphone.LOUD)`|
134
+
| Get history of sounds since last call to get_sounds() |`microbit.microphone.get_sounds()`|
135
+
| Set threshold for sound 0-255 |`microbit.microphone.set_threshold(microbit.microphone.LOUD, 128)`|
136
+
| Get current sound level in range 0-255 |`microbit.microphone.sound_level()`|
137
+
| Logo is touched |`microbit.pin_logo.is_touched()`|
138
+
164
139
## Universal Hex Format
165
140
166
141
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.
0 commit comments