Skip to content

Commit 2caf5ef

Browse files
docs: Backport multiple minor V2 changes to V1 docs.
1 parent 60d7463 commit 2caf5ef

File tree

4 files changed

+25
-24
lines changed

4 files changed

+25
-24
lines changed

docs/microbit_micropython_api.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ These are both objects and have the following methods::
4949
# returns the running total of button presses, and resets this counter to zero
5050
button.get_presses()
5151

52-
The LED display
53-
---------------
52+
Display
53+
-------
5454

5555
The LED display is exposed via the `display` object::
5656

@@ -212,8 +212,8 @@ Images API::
212212
Image.ALL_CLOCKS
213213
Image.ALL_ARROWS
214214

215-
The accelerometer
216-
-----------------
215+
Accelerometer
216+
-------------
217217

218218
The accelerometer is accessed via the ``accelerometer`` object::
219219

@@ -238,8 +238,8 @@ The accelerometer is accessed via the ``accelerometer`` object::
238238
The recognised gestures are: ``up``, ``down``, ``left``, ``right``, ``face up``, ``face down``, ``freefall``, ``3g``, ``6g``, ``8g``, ``shake``.
239239

240240

241-
The compass
242-
-----------
241+
Compass
242+
-------
243243

244244
The compass is accessed via the `compass` object::
245245

docs/speech.rst

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
Speech
22
******
33

4-
.. warning::
5-
6-
WARNING! This is still work in progress; we reserve the right to change this API as development continues.
7-
8-
The quality of the speech is not great, merely "good enough". Given the
9-
constraints of the device you may encounter memory errors and / or
10-
unexpected extra sounds during playback. It's early days and we're
11-
improving the code for the speech synthesiser all the time. Bug reports
12-
and pull requests are most welcome.
13-
14-
154
.. py:module:: speech
165
176
This module makes microbit talk, sing and make other speech like sounds

docs/tutorials/music.rst

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,23 @@ Music
22
-----
33

44
MicroPython on the BBC micro:bit comes with a powerful music and sound module.
5-
It's very easy to generate bleeps and bloops from the device *if you attach a
6-
speaker or passive piezo buzzer*. Use crocodile clips to attach pin 0 and GND
7-
to the positive and negative inputs on the speaker/buzzer - it doesn't matter
8-
which way round they are connected to a speaker, but a piezo buzzer may be
9-
polarized (check for a "+" marking the positive terminal).
5+
It's very easy to generate bleeps and bloops from the device by attaching a
6+
speaker or set of wired headphones.
7+
8+
If you are attaching a speaker, a passive piezo buzzer, or headphones, you can
9+
use crocodile clips to attach pin 0 and GND to the positive and negative inputs.
10+
It doesn't matter which way round they are connected to a speaker, but a piezo
11+
buzzer may be polarized (check for a "+" marking the positive terminal).
1012

1113
.. image:: pin0-gnd.png
14+
:width: 250px
15+
:align: center
16+
:alt: piezo connected to pin0 and GND
1217

1318
.. note::
1419

15-
Do not attempt this with an active Piezo buzzer - such buzzers are only able to
16-
play a single tone.
20+
Do not attempt this with an active Piezo buzzer - such buzzers are only
21+
able to play a single tone.
1722

1823
Let's play some music::
1924

examples/speech.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
"""
2+
speech.py
3+
~~~~~~~~
4+
Simple speech example to make the micro:bit say, pronounce and sing
5+
something. This example requires a speaker/buzzer/headphones connected
6+
to P0 and GND,or the latest micro:bit device with built-in speaker.
7+
"""
18
import speech
29
from microbit import sleep
310

0 commit comments

Comments
 (0)