From 729a32f630f1511c46e867877754de6a619c3be1 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Fri, 23 Feb 2018 21:05:23 -0600 Subject: [PATCH 1/6] renamed examples --- examples/{acceleration.py => acceleration_simpletest.py} | 0 examples/{pixels.py => pixels_simpletest.py} | 0 examples/{shake.py => shake_simpletest.py} | 0 examples/{tapdetect.py => tapdetect_simpletest.py} | 0 examples/{tapdetectsimple.py => tapdetectsimple_simpletest.py} | 0 examples/{tone.py => tone_simpletest.py} | 0 examples/{touched.py => touched_simpletest.py} | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename examples/{acceleration.py => acceleration_simpletest.py} (100%) rename examples/{pixels.py => pixels_simpletest.py} (100%) rename examples/{shake.py => shake_simpletest.py} (100%) rename examples/{tapdetect.py => tapdetect_simpletest.py} (100%) rename examples/{tapdetectsimple.py => tapdetectsimple_simpletest.py} (100%) rename examples/{tone.py => tone_simpletest.py} (100%) rename examples/{touched.py => touched_simpletest.py} (100%) diff --git a/examples/acceleration.py b/examples/acceleration_simpletest.py similarity index 100% rename from examples/acceleration.py rename to examples/acceleration_simpletest.py diff --git a/examples/pixels.py b/examples/pixels_simpletest.py similarity index 100% rename from examples/pixels.py rename to examples/pixels_simpletest.py diff --git a/examples/shake.py b/examples/shake_simpletest.py similarity index 100% rename from examples/shake.py rename to examples/shake_simpletest.py diff --git a/examples/tapdetect.py b/examples/tapdetect_simpletest.py similarity index 100% rename from examples/tapdetect.py rename to examples/tapdetect_simpletest.py diff --git a/examples/tapdetectsimple.py b/examples/tapdetectsimple_simpletest.py similarity index 100% rename from examples/tapdetectsimple.py rename to examples/tapdetectsimple_simpletest.py diff --git a/examples/tone.py b/examples/tone_simpletest.py similarity index 100% rename from examples/tone.py rename to examples/tone_simpletest.py diff --git a/examples/touched.py b/examples/touched_simpletest.py similarity index 100% rename from examples/touched.py rename to examples/touched_simpletest.py From 3332883846ed150a0561215c5ae781051a2b8dc2 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Fri, 23 Feb 2018 21:13:13 -0600 Subject: [PATCH 2/6] setup docs folder --- adafruit_circuitplayground/index.rst | 9 ---- {_static => docs/_static}/accelerometer.jpg | Bin {_static => docs/_static}/button_a.jpg | Bin {_static => docs/_static}/button_b.jpg | Bin .../_static}/capacitive_touch_pad_A1.jpg | Bin .../_static}/capacitive_touch_pad_A2.jpg | Bin .../_static}/capacitive_touch_pad_A3.jpg | Bin .../_static}/capacitive_touch_pad_A4.jpg | Bin .../_static}/capacitive_touch_pad_A5.jpg | Bin .../_static}/capacitive_touch_pad_A6.jpg | Bin .../_static}/capacitive_touch_pad_A7.jpg | Bin .../_static}/capacitive_touch_pads.jpg | Bin .../_static}/circuitplayground_express.jpg | Bin docs/_static/favicon.ico | Bin 0 -> 4414 bytes {_static => docs/_static}/light_sensor.jpg | Bin .../_static}/neopixel_numbering.jpg | Bin {_static => docs/_static}/red_led.jpg | Bin {_static => docs/_static}/slide_switch.jpg | Bin {_static => docs/_static}/speaker.jpg | Bin {_static => docs/_static}/thermistor.jpg | Bin docs/api.rst | 5 ++ conf.py => docs/conf.py | 15 ++++-- docs/examples.rst | 32 ++++++++++++ docs/index.rst | 47 ++++++++++++++++++ 24 files changed, 96 insertions(+), 12 deletions(-) delete mode 100644 adafruit_circuitplayground/index.rst rename {_static => docs/_static}/accelerometer.jpg (100%) rename {_static => docs/_static}/button_a.jpg (100%) rename {_static => docs/_static}/button_b.jpg (100%) rename {_static => docs/_static}/capacitive_touch_pad_A1.jpg (100%) rename {_static => docs/_static}/capacitive_touch_pad_A2.jpg (100%) rename {_static => docs/_static}/capacitive_touch_pad_A3.jpg (100%) rename {_static => docs/_static}/capacitive_touch_pad_A4.jpg (100%) rename {_static => docs/_static}/capacitive_touch_pad_A5.jpg (100%) rename {_static => docs/_static}/capacitive_touch_pad_A6.jpg (100%) rename {_static => docs/_static}/capacitive_touch_pad_A7.jpg (100%) rename {_static => docs/_static}/capacitive_touch_pads.jpg (100%) rename {_static => docs/_static}/circuitplayground_express.jpg (100%) create mode 100644 docs/_static/favicon.ico rename {_static => docs/_static}/light_sensor.jpg (100%) rename {_static => docs/_static}/neopixel_numbering.jpg (100%) rename {_static => docs/_static}/red_led.jpg (100%) rename {_static => docs/_static}/slide_switch.jpg (100%) rename {_static => docs/_static}/speaker.jpg (100%) rename {_static => docs/_static}/thermistor.jpg (100%) create mode 100644 docs/api.rst rename conf.py => docs/conf.py (91%) create mode 100644 docs/examples.rst create mode 100644 docs/index.rst diff --git a/adafruit_circuitplayground/index.rst b/adafruit_circuitplayground/index.rst deleted file mode 100644 index 6ab6b84..0000000 --- a/adafruit_circuitplayground/index.rst +++ /dev/null @@ -1,9 +0,0 @@ - -CircuitPlayground APIs -=========================================== - -`express` - CircuitPlayground Express (CPX for short) ------------------------------------------------------ - -.. automodule:: adafruit_circuitplayground.express - :members: diff --git a/_static/accelerometer.jpg b/docs/_static/accelerometer.jpg similarity index 100% rename from _static/accelerometer.jpg rename to docs/_static/accelerometer.jpg diff --git a/_static/button_a.jpg b/docs/_static/button_a.jpg similarity index 100% rename from _static/button_a.jpg rename to docs/_static/button_a.jpg diff --git a/_static/button_b.jpg b/docs/_static/button_b.jpg similarity index 100% rename from _static/button_b.jpg rename to docs/_static/button_b.jpg diff --git a/_static/capacitive_touch_pad_A1.jpg b/docs/_static/capacitive_touch_pad_A1.jpg similarity index 100% rename from _static/capacitive_touch_pad_A1.jpg rename to docs/_static/capacitive_touch_pad_A1.jpg diff --git a/_static/capacitive_touch_pad_A2.jpg b/docs/_static/capacitive_touch_pad_A2.jpg similarity index 100% rename from _static/capacitive_touch_pad_A2.jpg rename to docs/_static/capacitive_touch_pad_A2.jpg diff --git a/_static/capacitive_touch_pad_A3.jpg b/docs/_static/capacitive_touch_pad_A3.jpg similarity index 100% rename from _static/capacitive_touch_pad_A3.jpg rename to docs/_static/capacitive_touch_pad_A3.jpg diff --git a/_static/capacitive_touch_pad_A4.jpg b/docs/_static/capacitive_touch_pad_A4.jpg similarity index 100% rename from _static/capacitive_touch_pad_A4.jpg rename to docs/_static/capacitive_touch_pad_A4.jpg diff --git a/_static/capacitive_touch_pad_A5.jpg b/docs/_static/capacitive_touch_pad_A5.jpg similarity index 100% rename from _static/capacitive_touch_pad_A5.jpg rename to docs/_static/capacitive_touch_pad_A5.jpg diff --git a/_static/capacitive_touch_pad_A6.jpg b/docs/_static/capacitive_touch_pad_A6.jpg similarity index 100% rename from _static/capacitive_touch_pad_A6.jpg rename to docs/_static/capacitive_touch_pad_A6.jpg diff --git a/_static/capacitive_touch_pad_A7.jpg b/docs/_static/capacitive_touch_pad_A7.jpg similarity index 100% rename from _static/capacitive_touch_pad_A7.jpg rename to docs/_static/capacitive_touch_pad_A7.jpg diff --git a/_static/capacitive_touch_pads.jpg b/docs/_static/capacitive_touch_pads.jpg similarity index 100% rename from _static/capacitive_touch_pads.jpg rename to docs/_static/capacitive_touch_pads.jpg diff --git a/_static/circuitplayground_express.jpg b/docs/_static/circuitplayground_express.jpg similarity index 100% rename from _static/circuitplayground_express.jpg rename to docs/_static/circuitplayground_express.jpg diff --git a/docs/_static/favicon.ico b/docs/_static/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..5aca98376a1f7e593ebd9cf41a808512c2135635 GIT binary patch literal 4414 zcmd^BX;4#F6n=SG-XmlONeGrD5E6J{RVh+e928U#MG!$jWvO+UsvWh`x&VqGNx*en zx=qox7Dqv{kPwo%fZC$dDwVpRtz{HzTkSs8QhG0)%Y=-3@Kt!4ag|JcIo?$-F|?bXVS9UDUyev>MVZQ(H8K4#;BQW-t2CPorj8^KJrMX}QK zp+e<;4ldpXz~=)2GxNy811&)gt-}Q*yVQpsxr@VMoA##{)$1~=bZ1MmjeFw?uT(`8 z^g=09<=zW%r%buwN%iHtuKSg|+r7HkT0PYN*_u9k1;^Ss-Z!RBfJ?Un4w(awqp2b3 z%+myoFis_lTlCrGx2z$0BQdh+7?!JK#9K9@Z!VrG zNj6gK5r(b4?YDOLw|DPRoN7bdP{(>GEG41YcN~4r_SUHU2hgVtUwZG@s%edC;k7Sn zC)RvEnlq~raE2mY2ko64^m1KQL}3riixh?#J{o)IT+K-RdHae2eRX91-+g!y`8^># z-zI0ir>P%Xon)!@xp-BK2bDYUB9k613NRrY6%lVjbFcQc*pRqiK~8xtkNPLxt}e?&QsTB}^!39t_%Qb)~Ukn0O%iC;zt z<&A-y;3h++)>c1br`5VFM~5(83!HKx$L+my8sW_c#@x*|*vB1yU)_dt3vH;2hqPWx zAl^6@?ipx&U7pf`a*>Yq6C85nb+B=Fnn+(id$W#WB^uHAcZVG`qg;rWB}ubvi(Y>D z$ei>REw$#xp0SHAd^|1hq&9HJ=jKK8^zTH~nk)G?yUcmTh9vUM6Y0LMw4(gYVY$D$ zGl&WY&H<)BbJ&3sYbKjx1j^=3-0Q#f^}(aP1?8^`&FUWMp|rmtpK)bLQ1Zo?^s4jqK=Lfg*9&geMGVQ z#^-*!V`fG@;H&{M9S8%+;|h&Qrxym0Ar>WT4BCVLR8cGXF=JmEYN(sNT(9vl+S|%g z8r7nXQ(95i^`=+XHo|){$vf2$?=`F$^&wFlYXyXg$B{a>$-Fp+V}+D;9k=~Xl~?C4 zAB-;RKXdUzBJE{V&d&%R>aEfFe;vxqI$0@hwVM}gFeQR@j}a>DDxR+n+-*6|_)k%% z*mSpDV|=5I9!&VC&9tD%fcVygWZV!iIo2qFtm#!*(s|@ZT33*Ad;+<|3^+yrp*;oH zBSYLV(H1zTU?2WjrCQoQW)Z>J2a=dTriuvezBmu16`tM2fm7Q@d4^iqII-xFpwHGI zn9CL}QE*1vdj2PX{PIuqOe5dracsciH6OlAZATvE8rj6ykqdIjal2 z0S0S~PwHb-5?OQ-tU-^KTG@XNrEVSvo|HIP?H;7ZhYeZkhSqh-{reE!5di;1zk$#Y zCe7rOnlzFYJ6Z#Hm$GoidKB=2HBCwm`BbZVeZY4ukmG%1uz7p2URs6c9j-Gjj^oQV zsdDb3@k2e`C$1I5ML5U0Qs0C1GAp^?!*`=|Nm(vWz3j*j*8ucum2;r0^-6Aca=Gv) zc%}&;!+_*S2tlnnJnz0EKeRmw-Y!@9ob!XQBwiv}^u9MkaXHvM=!<3YX;+2#5Cj5pp?FEK750S3BgeSDtaE^ zXUM@xoV6yBFKfzvY20V&Lr0yC + +.. toctree:: + :caption: Other Links + + Download + CircuitPython Reference Documentation + CircuitPython Support Forum + Discord Chat + Adafruit Learning System + Adafruit Blog + Adafruit Store + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` From cbdd1620ba3bc7a2e61d387f194b7b71d8da61ac Mon Sep 17 00:00:00 2001 From: sommersoft Date: Fri, 23 Feb 2018 21:14:59 -0600 Subject: [PATCH 3/6] updated .travis & .readthedocs yml --- readthedocs.yml => .readthedocs.yml | 0 .travis.yml | 5 +++-- 2 files changed, 3 insertions(+), 2 deletions(-) rename readthedocs.yml => .readthedocs.yml (100%) diff --git a/readthedocs.yml b/.readthedocs.yml similarity index 100% rename from readthedocs.yml rename to .readthedocs.yml diff --git a/.travis.yml b/.travis.yml index 8084f64..dd88629 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,15 +16,16 @@ deploy: provider: releases api_key: $GITHUB_TOKEN file_glob: true - file: bundles/* + file: $TRAVIS_BUILD_DIR/bundles/* skip_cleanup: true on: tags: true install: - - pip install pylint circuitpython-build-tools + - pip install pylint circuitpython-build-tools Sphinx sphinx-rtd-theme script: - pylint adafruit_circuitplayground/*.py - ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name examples/*.py) - circuitpython-build-bundles --filename_prefix adafruit-circuitpython-circuitplayground --library_location . + - cd docs && sphinx-build -E -W -b html . _build/html From 3414690d8359b0dff09370b186cf835c36934761 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Fri, 23 Feb 2018 21:16:26 -0600 Subject: [PATCH 4/6] updated README --- README.rst | 54 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/README.rst b/README.rst index e3a0220..6693199 100644 --- a/README.rst +++ b/README.rst @@ -6,10 +6,6 @@ Introduction :target: https://circuitpython.readthedocs.io/projects/circuitplayground/en/latest/ :alt: Documentation Status -.. image :: https://badges.gitter.im/adafruit/circuitpython.svg - :target: https://gitter.im/adafruit/circuitpython?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge - :alt: Gitter - .. image :: https://img.shields.io/discord/327254708534116352.svg :target: https://adafru.it/discord :alt: Discord @@ -46,10 +42,50 @@ Contributions are welcome! Please read our `Code of Conduct `_ before contributing to help this project stay welcoming. -API Reference -============= +Building locally +================ + +To build this library locally you'll need to install the +`circuitpython-build-tools `_ package. + +.. code-block:: shell + + python3 -m venv .env + source .env/bin/activate + pip install circuitpython-build-tools + +Once installed, make sure you are in the virtual environment: + +.. code-block:: shell + + source .env/bin/activate + +Then run the build: + +.. code-block:: shell + + circuitpython-build-bundles --filename_prefix adafruit-circuitpython-circuitplayground --library_location . + +Sphinx documentation +----------------------- + +Sphinx is used to build the documentation based on rST files and comments in the code. First, +install dependencies (feel free to reuse the virtual environment from above): + +.. code-block:: shell + + python3 -m venv .env + source .env/bin/activate + pip install Sphinx sphinx-rtd-theme + +Now, once you have the virtual environment activated: + +.. code-block:: shell + + cd docs + sphinx-build -E -W -b html . _build/html -.. toctree:: - :maxdepth: 2 +This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to +view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to +locally verify it will pass. - adafruit_circuitplayground/index From 5ae4ab80389464abca55f261a2541d8a21ba1080 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Fri, 23 Feb 2018 21:20:16 -0600 Subject: [PATCH 5/6] updated doc strings --- adafruit_circuitplayground/express.py | 46 +++++++++++++-------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/adafruit_circuitplayground/express.py b/adafruit_circuitplayground/express.py index 21ffe1f..782cd71 100755 --- a/adafruit_circuitplayground/express.py +++ b/adafruit_circuitplayground/express.py @@ -131,7 +131,7 @@ def detect_taps(self): """Configure what type of tap is detected by ``cpx.tapped``. Use ``1`` for single-tap detection and ``2`` for double-tap detection. This does nothing without ``cpx.tapped``. - .. image :: /_static/accelerometer.jpg + .. image :: /docs/_static/accelerometer.jpg :alt: Accelerometer .. code-block:: python @@ -160,7 +160,7 @@ def detect_taps(self, value): def tapped(self): """True once after a detecting a tap. Requires ``cpx.detect_taps``. - .. image :: /_static/accelerometer.jpg + .. image :: /docs/_static/accelerometer.jpg :alt: Accelerometer Tap the CPX once for a single-tap, or quickly tap twice for a double-tap. @@ -215,7 +215,7 @@ def tapped(self): def acceleration(self): """Obtain data from the x, y and z axes. - .. image :: /_static/accelerometer.jpg + .. image :: /docs/_static/accelerometer.jpg :alt: Accelerometer This example prints the values. Try moving the board to see how the @@ -236,7 +236,7 @@ def shake(self, shake_threshold=30): :param int shake_threshold: The threshold shake must exceed to return true (Default: 30) - .. image :: /_static/accelerometer.jpg + .. image :: /docs/_static/accelerometer.jpg :alt: Accelerometer .. code-block:: python @@ -271,7 +271,7 @@ def shake(self, shake_threshold=30): def touch_A1(self): # pylint: disable=invalid-name """Detect touch on capacitive touch pad A1. - .. image :: /_static/capacitive_touch_pad_A1.jpg + .. image :: /docs/_static/capacitive_touch_pad_A1.jpg :alt: Capacitive touch pad A1 .. code-block:: python @@ -291,7 +291,7 @@ def touch_A1(self): # pylint: disable=invalid-name def touch_A2(self): # pylint: disable=invalid-name """Detect touch on capacitive touch pad A2. - .. image :: /_static/capacitive_touch_pad_A2.jpg + .. image :: /docs/_static/capacitive_touch_pad_A2.jpg :alt: Capacitive touch pad A2 .. code-block:: python @@ -311,7 +311,7 @@ def touch_A2(self): # pylint: disable=invalid-name def touch_A3(self): # pylint: disable=invalid-name """Detect touch on capacitive touch pad A3. - .. image :: /_static/capacitive_touch_pad_A3.jpg + .. image :: /docs/_static/capacitive_touch_pad_A3.jpg :alt: Capacitive touch pad A3 .. code-block:: python @@ -331,7 +331,7 @@ def touch_A3(self): # pylint: disable=invalid-name def touch_A4(self): # pylint: disable=invalid-name """Detect touch on capacitive touch pad A4. - .. image :: /_static/capacitive_touch_pad_A4.jpg + .. image :: /docs/_static/capacitive_touch_pad_A4.jpg :alt: Capacitive touch pad A4 .. code-block:: python @@ -351,7 +351,7 @@ def touch_A4(self): # pylint: disable=invalid-name def touch_A5(self): # pylint: disable=invalid-name """Detect touch on capacitive touch pad A5. - .. image :: /_static/capacitive_touch_pad_A5.jpg + .. image :: /docs/_static/capacitive_touch_pad_A5.jpg :alt: Capacitive touch pad A5 .. code-block:: python @@ -371,7 +371,7 @@ def touch_A5(self): # pylint: disable=invalid-name def touch_A6(self): # pylint: disable=invalid-name """Detect touch on capacitive touch pad A6. - .. image :: /_static/capacitive_touch_pad_A6.jpg + .. image :: /docs/_static/capacitive_touch_pad_A6.jpg :alt: Capacitive touch pad A6 .. code-block:: python @@ -391,7 +391,7 @@ def touch_A6(self): # pylint: disable=invalid-name def touch_A7(self): # pylint: disable=invalid-name """Detect touch on capacitive touch pad A7. - .. image :: /_static/capacitive_touch_pad_A7.jpg + .. image :: /docs/_static/capacitive_touch_pad_A7.jpg :alt: Capacitive touch pad A7 .. code-block:: python @@ -413,7 +413,7 @@ def adjust_touch_threshold(self, adjustment): :param int adjustment: The desired threshold increase - .. image :: /_static/capacitive_touch_pads.jpg + .. image :: /docs/_static/capacitive_touch_pads.jpg :alt: Capacitive touch pads .. code-block:: python @@ -443,7 +443,7 @@ def pixels(self): See `neopixel.NeoPixel` for more info. - .. image :: /_static/neopixel_numbering.jpg + .. image :: /docs/_static/neopixel_numbering.jpg :alt: NeoPixel order diagram Here is an example that sets the first pixel green and the second red. @@ -466,7 +466,7 @@ def pixels(self): def button_a(self): """``True`` when Button A is pressed. ``False`` if not. - .. image :: /_static/button_a.jpg + .. image :: /docs/_static/button_a.jpg :alt: Button A .. code-block:: python @@ -483,7 +483,7 @@ def button_a(self): def button_b(self): """``True`` when Button B is pressed. ``False`` if not. - .. image :: /_static/button_b.jpg + .. image :: /docs/_static/button_b.jpg :alt: Button B .. code-block:: python @@ -502,7 +502,7 @@ def switch(self): ``True`` when the switch is to the left next to the music notes. ``False`` when it is to the right towards the ear. - .. image :: ../_static/slide_switch.jpg + .. image :: /docs/_static/slide_switch.jpg :alt: Slide switch .. code-block:: python @@ -520,7 +520,7 @@ def switch(self): def temperature(self): """The temperature of the CircuitPlayground in Celsius. - .. image :: /_static/thermistor.jpg + .. image :: /docs/_static/thermistor.jpg :alt: Temperature sensor Converting this to Farenheit is easy! @@ -543,7 +543,7 @@ def temperature(self): def light(self): """The brightness of the CircuitPlayground in approximate Lux. - .. image :: /_static/light_sensor.jpg + .. image :: /docs/_static/light_sensor.jpg :alt: Light sensor Try covering the sensor next to the eye to see it change. @@ -563,7 +563,7 @@ def light(self): def red_led(self): """The red led next to the USB plug marked D13. - .. image :: /_static/red_led.jpg + .. image :: /docs/_static/red_led.jpg :alt: D13 LED .. code-block:: python @@ -604,7 +604,7 @@ def play_tone(self, frequency, duration): :param int frequency: The frequency of the tone in Hz :param float duration: The duration of the tone in seconds - .. image :: /_static/speaker.jpg + .. image :: /docs/_static/speaker.jpg :alt: Onboard speaker .. code-block:: python @@ -624,7 +624,7 @@ def start_tone(self, frequency): :param int frequency: The frequency of the tone in Hz - .. image :: /_static/speaker.jpg + .. image :: /docs/_static/speaker.jpg :alt: Onboard speaker .. code-block:: python @@ -649,7 +649,7 @@ def start_tone(self, frequency): def stop_tone(self): """ Use with start_tone to stop the tone produced. - .. image :: /_static/speaker.jpg + .. image :: /docs/_static/speaker.jpg :alt: Onboard speaker .. code-block:: python @@ -674,7 +674,7 @@ def play_file(self, file_name): :param file_name: The name of your .wav file in quotation marks including .wav - .. image :: /_static/speaker.jpg + .. image :: /docs/_static/speaker.jpg :alt: Onboard speaker .. code-block:: python From 46919d9d95cf4f61dd0508970ab654167b41e2a6 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Fri, 23 Feb 2018 21:28:04 -0600 Subject: [PATCH 6/6] sphinx fix; image file paths --- adafruit_circuitplayground/express.py | 46 +++++++++++++-------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/adafruit_circuitplayground/express.py b/adafruit_circuitplayground/express.py index 782cd71..827bb0e 100755 --- a/adafruit_circuitplayground/express.py +++ b/adafruit_circuitplayground/express.py @@ -131,7 +131,7 @@ def detect_taps(self): """Configure what type of tap is detected by ``cpx.tapped``. Use ``1`` for single-tap detection and ``2`` for double-tap detection. This does nothing without ``cpx.tapped``. - .. image :: /docs/_static/accelerometer.jpg + .. image :: ../docs/_static/accelerometer.jpg :alt: Accelerometer .. code-block:: python @@ -160,7 +160,7 @@ def detect_taps(self, value): def tapped(self): """True once after a detecting a tap. Requires ``cpx.detect_taps``. - .. image :: /docs/_static/accelerometer.jpg + .. image :: ../docs/_static/accelerometer.jpg :alt: Accelerometer Tap the CPX once for a single-tap, or quickly tap twice for a double-tap. @@ -215,7 +215,7 @@ def tapped(self): def acceleration(self): """Obtain data from the x, y and z axes. - .. image :: /docs/_static/accelerometer.jpg + .. image :: ../docs/_static/accelerometer.jpg :alt: Accelerometer This example prints the values. Try moving the board to see how the @@ -236,7 +236,7 @@ def shake(self, shake_threshold=30): :param int shake_threshold: The threshold shake must exceed to return true (Default: 30) - .. image :: /docs/_static/accelerometer.jpg + .. image :: ../docs/_static/accelerometer.jpg :alt: Accelerometer .. code-block:: python @@ -271,7 +271,7 @@ def shake(self, shake_threshold=30): def touch_A1(self): # pylint: disable=invalid-name """Detect touch on capacitive touch pad A1. - .. image :: /docs/_static/capacitive_touch_pad_A1.jpg + .. image :: ../docs/_static/capacitive_touch_pad_A1.jpg :alt: Capacitive touch pad A1 .. code-block:: python @@ -291,7 +291,7 @@ def touch_A1(self): # pylint: disable=invalid-name def touch_A2(self): # pylint: disable=invalid-name """Detect touch on capacitive touch pad A2. - .. image :: /docs/_static/capacitive_touch_pad_A2.jpg + .. image :: ../docs/_static/capacitive_touch_pad_A2.jpg :alt: Capacitive touch pad A2 .. code-block:: python @@ -311,7 +311,7 @@ def touch_A2(self): # pylint: disable=invalid-name def touch_A3(self): # pylint: disable=invalid-name """Detect touch on capacitive touch pad A3. - .. image :: /docs/_static/capacitive_touch_pad_A3.jpg + .. image :: ../docs/_static/capacitive_touch_pad_A3.jpg :alt: Capacitive touch pad A3 .. code-block:: python @@ -331,7 +331,7 @@ def touch_A3(self): # pylint: disable=invalid-name def touch_A4(self): # pylint: disable=invalid-name """Detect touch on capacitive touch pad A4. - .. image :: /docs/_static/capacitive_touch_pad_A4.jpg + .. image :: ../docs/_static/capacitive_touch_pad_A4.jpg :alt: Capacitive touch pad A4 .. code-block:: python @@ -351,7 +351,7 @@ def touch_A4(self): # pylint: disable=invalid-name def touch_A5(self): # pylint: disable=invalid-name """Detect touch on capacitive touch pad A5. - .. image :: /docs/_static/capacitive_touch_pad_A5.jpg + .. image :: ../docs/_static/capacitive_touch_pad_A5.jpg :alt: Capacitive touch pad A5 .. code-block:: python @@ -371,7 +371,7 @@ def touch_A5(self): # pylint: disable=invalid-name def touch_A6(self): # pylint: disable=invalid-name """Detect touch on capacitive touch pad A6. - .. image :: /docs/_static/capacitive_touch_pad_A6.jpg + .. image :: ../docs/_static/capacitive_touch_pad_A6.jpg :alt: Capacitive touch pad A6 .. code-block:: python @@ -391,7 +391,7 @@ def touch_A6(self): # pylint: disable=invalid-name def touch_A7(self): # pylint: disable=invalid-name """Detect touch on capacitive touch pad A7. - .. image :: /docs/_static/capacitive_touch_pad_A7.jpg + .. image :: ../docs/_static/capacitive_touch_pad_A7.jpg :alt: Capacitive touch pad A7 .. code-block:: python @@ -413,7 +413,7 @@ def adjust_touch_threshold(self, adjustment): :param int adjustment: The desired threshold increase - .. image :: /docs/_static/capacitive_touch_pads.jpg + .. image :: ../docs/_static/capacitive_touch_pads.jpg :alt: Capacitive touch pads .. code-block:: python @@ -443,7 +443,7 @@ def pixels(self): See `neopixel.NeoPixel` for more info. - .. image :: /docs/_static/neopixel_numbering.jpg + .. image :: ../docs/_static/neopixel_numbering.jpg :alt: NeoPixel order diagram Here is an example that sets the first pixel green and the second red. @@ -466,7 +466,7 @@ def pixels(self): def button_a(self): """``True`` when Button A is pressed. ``False`` if not. - .. image :: /docs/_static/button_a.jpg + .. image :: ../docs/_static/button_a.jpg :alt: Button A .. code-block:: python @@ -483,7 +483,7 @@ def button_a(self): def button_b(self): """``True`` when Button B is pressed. ``False`` if not. - .. image :: /docs/_static/button_b.jpg + .. image :: ../docs/_static/button_b.jpg :alt: Button B .. code-block:: python @@ -502,7 +502,7 @@ def switch(self): ``True`` when the switch is to the left next to the music notes. ``False`` when it is to the right towards the ear. - .. image :: /docs/_static/slide_switch.jpg + .. image :: ../docs/_static/slide_switch.jpg :alt: Slide switch .. code-block:: python @@ -520,7 +520,7 @@ def switch(self): def temperature(self): """The temperature of the CircuitPlayground in Celsius. - .. image :: /docs/_static/thermistor.jpg + .. image :: ../docs/_static/thermistor.jpg :alt: Temperature sensor Converting this to Farenheit is easy! @@ -543,7 +543,7 @@ def temperature(self): def light(self): """The brightness of the CircuitPlayground in approximate Lux. - .. image :: /docs/_static/light_sensor.jpg + .. image :: ../docs/_static/light_sensor.jpg :alt: Light sensor Try covering the sensor next to the eye to see it change. @@ -563,7 +563,7 @@ def light(self): def red_led(self): """The red led next to the USB plug marked D13. - .. image :: /docs/_static/red_led.jpg + .. image :: ../docs/_static/red_led.jpg :alt: D13 LED .. code-block:: python @@ -604,7 +604,7 @@ def play_tone(self, frequency, duration): :param int frequency: The frequency of the tone in Hz :param float duration: The duration of the tone in seconds - .. image :: /docs/_static/speaker.jpg + .. image :: ../docs/_static/speaker.jpg :alt: Onboard speaker .. code-block:: python @@ -624,7 +624,7 @@ def start_tone(self, frequency): :param int frequency: The frequency of the tone in Hz - .. image :: /docs/_static/speaker.jpg + .. image :: ../docs/_static/speaker.jpg :alt: Onboard speaker .. code-block:: python @@ -649,7 +649,7 @@ def start_tone(self, frequency): def stop_tone(self): """ Use with start_tone to stop the tone produced. - .. image :: /docs/_static/speaker.jpg + .. image :: ../docs/_static/speaker.jpg :alt: Onboard speaker .. code-block:: python @@ -674,7 +674,7 @@ def play_file(self, file_name): :param file_name: The name of your .wav file in quotation marks including .wav - .. image :: /docs/_static/speaker.jpg + .. image :: ../docs/_static/speaker.jpg :alt: Onboard speaker .. code-block:: python