Skip to content

Commit

Permalink
docs: Backport last V2 changes to V1 docs. (#748)
Browse files Browse the repository at this point in the history
The main change is removing the Installation page, as I forgot to
remove the file in PR #745

Took the opportunity to add a few very minor formatting changes
from the v2-docs branch, which wil reduce the diff with the
main branch.
  • Loading branch information
microbit-carlos committed Jun 17, 2022
1 parent a41ec63 commit fe0e8dd
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 128 deletions.
118 changes: 0 additions & 118 deletions docs/devguide/installation.rst

This file was deleted.

7 changes: 4 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ BBC micro:bit MicroPython documentation

Welcome!

The BBC micro:bit is a small computing device for children. One of the
languages it understands is the popular Python programming language. The
version of Python that runs on the BBC micro:bit is called MicroPython.
The `BBC micro:bit <https://microbit.org>`_ is a small computing device for
children. One of the languages it understands is the popular Python programming
language. The version of Python that runs on the BBC micro:bit is called
MicroPython.

This documentation includes lessons for teachers
and API documentation for developers (check out the index on the left). We hope
Expand Down
10 changes: 7 additions & 3 deletions docs/microbit_micropython_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,12 @@ The LED display is exposed via the `display` object::
Pins
----

Provide digital and analog input and output functionality, for the pins in the connector. Some pins are connected internally to the I/O that drives the LED matrix and the buttons.
Provide digital and analog input and output functionality, for the pins in the
connector. Some pins are connected
internally to the I/O that drives the LED matrix and the buttons.

Each pin is provided as an object directly in the ``microbit`` module. This keeps the API relatively flat, making it very easy to use:
Each pin is provided as an object directly in the ``microbit`` module. This
keeps the API relatively flat, making it very easy to use:

* pin0
* pin1
Expand All @@ -102,7 +105,8 @@ Each of these pins are instances of the ``MicroBitPin`` class, which offers the
# sets the period of the PWM output of the pin in microseconds
# (see https://en.wikipedia.org/wiki/Pulse-width_modulation)
pin.set_analog_period_microseconds(int)
# returns boolean
# Only available for touch pins 0, 1, and 2. Returns boolean if the pin
# is touched
pin.is_touched()

Images
Expand Down
8 changes: 4 additions & 4 deletions docs/music.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ Functions

If ``wait`` is set to ``True``, this function is blocking.

If ``duration`` is negative the pitch is played continuously until either the
blocking call is interrupted or, in the case of a background call, a new
frequency is set or ``stop`` is called (see below).
If ``duration`` is negative the pitch is played continuously until either
the blocking call is interrupted or, in the case of a background call, a
new frequency is set or ``stop`` is called (see below).

.. py:function:: stop(pin=pin0)
Stops all music playback on a given pin, eg. ``music.stop(pin1)``.
If no pin is given, eg. ``music.stop()`` pin0 is assumed.

Expand Down

0 comments on commit fe0e8dd

Please sign in to comment.