docs: Add initial draft documentation for the WiPy.
This makes all common files "port-aware" using the .. only directive.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
.. _quickref:
|
||||
.. only:: port_pyboard
|
||||
|
||||
.. _quickref:
|
||||
|
||||
Quick reference for the pyboard
|
||||
===============================
|
||||
|
||||
@@ -53,8 +53,8 @@ For example::
|
||||
dac.write_timed(buf, 400 * len(buf), mode=DAC.CIRCULAR)
|
||||
|
||||
You can also play WAV files using the Python ``wave`` module. You can get
|
||||
the wave module `here <http://micropython.org/resources/examples/wave.py>`_ and you will also need
|
||||
the chunk module available `here <http://micropython.org/resources/examples/chunk.py>`_. Put these
|
||||
the wave module `here <http://micropython.org/resources/examples/wave.py>`__ and you will also need
|
||||
the chunk module available `here <http://micropython.org/resources/examples/chunk.py>`__. Put these
|
||||
on your pyboard (either on the flash or the SD card in the top-level directory). You will need an
|
||||
8-bit WAV file to play, such as `this one <http://micropython.org/resources/examples/test.wav>`_,
|
||||
or to convert any file you have with the command::
|
||||
|
||||
@@ -60,7 +60,7 @@ enables the 4 touch sensors. The third line reads the touch
|
||||
status and the ``touch`` variable holds the state of the 4 touch
|
||||
buttons (A, B, X, Y).
|
||||
|
||||
There is a simple driver `here <http://micropython.org/resources/examples/mpr121.py>`_
|
||||
There is a simple driver `here <http://micropython.org/resources/examples/mpr121.py>`__
|
||||
which allows you to set the threshold and debounce parameters, and
|
||||
easily read the touch status and electrode voltage levels. Copy
|
||||
this script to your pyboard (either flash or SD card, in the top
|
||||
@@ -83,4 +83,4 @@ initialise the I2C bus using::
|
||||
>>> m = mpr121.MPR121(pyb.I2C(2, pyb.I2C.MASTER))
|
||||
|
||||
There is also a demo which uses the LCD and the touch sensors together,
|
||||
and can be found `here <http://micropython.org/resources/examples/lcddemo.py>`_.
|
||||
and can be found `here <http://micropython.org/resources/examples/lcddemo.py>`__.
|
||||
|
||||
Reference in New Issue
Block a user