From 9669470d73287472015a9083432014bb8747bb09 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Wed, 13 Feb 2019 19:00:18 -0600 Subject: [PATCH 1/9] add docs folder --- docs/_static/favicon.ico | Bin 0 -> 4414 bytes docs/conf.py | 164 +++++++++++++++++++++++++++++++++++++++ docs/index.rst | 32 ++++++++ 3 files changed, 196 insertions(+) create mode 100644 docs/_static/favicon.ico create mode 100644 docs/conf.py create mode 100644 docs/index.rst 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 + 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 1ded2bb27f4c11fe103acdd0e5beae8a4bd3e00c Mon Sep 17 00:00:00 2001 From: sommersoft Date: Wed, 13 Feb 2019 19:04:37 -0600 Subject: [PATCH 2/9] add .readthedocs.yml --- .readthedocs.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .readthedocs.yml diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 00000000..8b77f690 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,2 @@ +python: + version: 3 From 909eb8d9467d78fcf1baeeb0683b0eb111ff28c0 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Wed, 13 Feb 2019 19:07:45 -0600 Subject: [PATCH 3/9] inital add of drivers.rst --- docs/drivers.rst | 252 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 252 insertions(+) create mode 100644 docs/drivers.rst diff --git a/docs/drivers.rst b/docs/drivers.rst new file mode 100644 index 00000000..148db804 --- /dev/null +++ b/docs/drivers.rst @@ -0,0 +1,252 @@ +.. _adafruit-libndrivers: + +Additional Adafruit Libraries and Drivers on GitHub +=================================================== + +These are libraries and drivers available in separate GitHub repos. They are +designed for use with CircuitPython and may or may not work with +`MicroPython `_. + +.. _bundle_installation: + +Bundle +------ + +We provide a bundle of all our libraries to ease installation of drivers and +their dependencies. The bundle is primarily geared to the Adafruit Express line +of boards which feature a relatively large external flash. With Express boards, +its easy to copy them all onto the filesystem. However, if you don't have +enough space simply copy things over as they are needed. + +The bundles are available `on GitHub `_. + +To install them: + +#. `Download `_ + and unzip the latest zip that's not a source zip. +#. Copy the ``lib`` folder to the ``CIRCUITPY`` or ``MICROPYTHON``. + +Foundational +------------ + +These libraries provide critical functionality to many of the drivers below. It +is recommended to always have them installed onto the CircuitPython file system in +the ``lib/`` directory. Some drivers may not work without them. + +.. toctree:: + + Register Library + BusDevice Library + +Board-specific Helpers +---------------------- + +These libraries tie lower-level libraries together to provide an easy, out-of-box experience for +specific boards. + +.. toctree:: + + Adafruit CircuitPlayground Express + Adafruit FeatherWings + +Helper Libraries +----------------- + +These libraries build on top of the low level APIs to simplify common tasks. + +.. toctree:: + + USB Human Interface Device (Keyboard and Mouse) + Waveform Generation + OneWire + Ring Tone Text Transfer Language (RTTTL) + InfraRed Remote + Fancy LED (similar to FastLED) + SimpleIO + AVR programming + DC Motor and Servo + SD Card + Image Load + miniQR Non-hardware QR code generator + Slideshow + LED Animation + Bluetooth Low Energy (BLE) + Bluefruit LE Connect App + +Blinky +-------- + +Multi-color led drivers. + +.. toctree:: + + NeoPixel + DotStar + WS2801 + Pixie + +Displays +------------- + +Drivers used to display information. Either pixel or segment based. + +.. toctree:: + + RGB Displays + Character LCD + HT16K33 LED Matrices and Segment Displays + IS31FL3731 Charlieplexed LED Matrix + MAX7219 LED Matrix + SSD1306 OLED Driver + E-Paper Display + +Real-time clocks +----------------- + +Chips that keep current calendar time with a backup battery. The current date and time is available +through ``datetime``. + +.. toctree:: + + DS1307 Real-time Clock (5V RTC Breakout) + DS3231 Real-time Clock (Precision RTC) + PCF8523 Real-time Clock (Adalogger RTC) + +Motion Sensors +---------------- + +Motion relating sensing including ``acceleration``, ``magnetic``, ``gyro``, and ``orientation``. + +.. toctree:: + + ADXL34x 3 Axis Accelerometer + BNO055 Accelerometer, Magnetometer, Gyroscope and Absolution Orientation + FXAS21002C Gyroscope + FXOS8700 Accelerometer + GPS Global Position + L3GD20 Gyroscope + LIS3DH Accelerometer + LSM303 Accelerometer and Magnetometer + LSM9DS0 Accelerometer, Magnetometer, Gyroscope and Temperature + LSM9DS1 Accelerometer, Magnetometer, Gyroscope and Temperature + MLX90390 3 Axis Mangetometer + MMA8451 3 axis accelerometer + +Environmental Sensors +---------------------- + +Sense attributes of the environment including ``temperature``, ``relative_humidity``, ``pressure``, +equivalent carbon dioxide (``eco2`` / ``eCO2``), and total volatile organic compounds (``tvoc`` / +``TVOC``). + +.. toctree:: + + AM2320 Temperature and Humidity + BME280 Temperature, Humidity and Pressure + BME680 Temperature, Humidity, Pressure and Gas + BMP280 Barometric Pressure and Altitude + BMP3xx Barometric Pressure and Altimeter + CCS811 Air Quality + DHT Temperature and Humidity + DS18x20 Temperature + HTU21D Temperature and Humidity + MAX31865 Thermocouple Amplifier, Temperature + MAX31855 Thermocouple Amplifier, Temperature + MAX31856 Thermocouple Amplifier, Temperature + MCP9808 Temperature + MP115A2 Barometric Pressure, Temperature + MPL3115A2 Barometric Pressure, Altitude and Temperature Sensor + MPRLS Ported Absolute Pressure + SGP30 Air Quality + SHT31-D Temperature and Humidity + Si7021 Temperature and Humidity + Thermistor Temperature + TMP007 Contactless Temperature + MLX90614 Contactless Temperature + +Light Sensors +--------------- + +These sensors detect light related attributes such as ``color``, ``light`` (unit-less), and +``lux`` (light in SI lux). + +.. toctree:: + + APDS9960 Proximity, Light, RGB, and Gesture + AS726x Color Spectrum Sensor + TCS34725 Color Sensor + TSL2561 Light Sensor + TSL2591 High Dynamic Range Light Sensor + VCNL4010 Proximity and Light + VEML6070 UV Index + VEML6075 UV Index + +Distance Sensors +------------------ + +These sensors measure the ``distance`` to another object and may also measure light level (``light`` and ``lux``). + +.. toctree:: + + Garmin LIDARLite I2C + TFmini IR Time of Flight ~30cm - 12m + VL6180x 5 - 100 mm + VL53L0x ~30 - 1000 mm + HC-SR04 Ultrasonic Range Sensors + +Radio +-------- + +These chips communicate to other's over radio. + +.. toctree:: + + Adafruit Bluefruit LE SPI Friend + RFM9x LoRa + RFM69 Packet Radio + PN532 NFC/RFID + +IO Expansion +-------------- + +These provide functionality similar to `analogio`, `digitalio`, `pulseio`, and `touchio`. + +.. toctree:: + + Adafruit SeeSaw + ADS1x15 Analog-to-Digital Converter + Crickit Robotics Boards + DS2413 OneWire GPIO Expander + FocalTech Capacitive Touch + MCP230xx GPIO Expander + MCP4725 Digital-to-Analog Converter + PCA9685 16 x 12-bit PWM Driver + TLC5947 24 x 12-bit PWM Driver + TLC59711 12 x 16-bit PWM Driver + MPR121 Capacitive Touch Sensor + TCA9548 I2C Multiplexer + MCP3xxx SPI ADC + +Miscellaneous +---------------- + +.. toctree:: + + CAP1188 8-Key Capacitive Touch + Si4713 Stereo FM Transmitter + AMG88xx Grid-Eye IR Camera + Trellis 4x4 Keypad + NeoTrellis 4x4 Keypad + NeoTrellis M4 4x8 Keypad + DRV2605 Haptic Motor Controller + MAX9744 Audio Amplifier + Si5351 Clock Generator + Thermal Printer + VC0706 TTL Camera + INA219 High Side Current + Fingerprint + STMPE610 Resistive Touchscreen + Matrix Keypad + VS1053 Audio Codec + FRAM Non-Volatile Memory + 74HC595 Shift Register From 1c6d1037b6bc6694eab5283666ef1b844e93ef73 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Wed, 13 Feb 2019 19:15:12 -0600 Subject: [PATCH 4/9] add drivers to index.rst --- docs/index.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index b82297bf..d5814b3d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,8 +10,10 @@ Table of Contents self .. toctree:: + :maxdepth: 4 + :caption: Drivers - Drivers + drivers .. toctree:: :caption: Other Links From 9344bbfbdd86133cade90f0e3ce6ba0ab48a27fc Mon Sep 17 00:00:00 2001 From: sommersoft Date: Wed, 13 Feb 2019 19:18:31 -0600 Subject: [PATCH 5/9] add Sphinx and sphinx-rtd-theme to requirements.txt --- requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements.txt b/requirements.txt index 5bef2946..4bef26cf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,3 @@ circuitpython-build-tools +Sphinx +sphinx-rtd-theme From 8698d1e46d8a5d7ce2c73aa3d14cf781d5c78416 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Wed, 13 Feb 2019 19:40:01 -0600 Subject: [PATCH 6/9] add sphinx build to travis --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8a3ce6a5..1bac5f86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,4 +19,6 @@ deploy: on: tags: true -script: circuitpython-build-bundles --filename_prefix adafruit-circuitpython-bundle --library_location libraries --library_depth 2 +script: +- circuitpython-build-bundles --filename_prefix adafruit-circuitpython-bundle --library_location libraries --library_depth 2 +- cd docs && sphinx-build -E -W -b html . _build/html && cd .. From f6d11782126762945d99f4eabbb5716986e6f8d4 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Wed, 13 Feb 2019 19:48:44 -0600 Subject: [PATCH 7/9] remove bus_device, register, and CP from intersphinx mapping --- docs/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 1e4b1a24..71ff1fac 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,11 +23,11 @@ # autodoc_mock_imports = ["digitalio", "busio"] -intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None), - 'BusDevice': ('https://circuitpython.readthedocs.io/projects/busdevice/en/latest/', None), +intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None)} + """'BusDevice': ('https://circuitpython.readthedocs.io/projects/busdevice/en/latest/', None), 'Register': ('https://circuitpython.readthedocs.io/projects/register/en/latest/', None), 'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None) - } + }""" # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] From 3a7961b1d16c45deb7a6fe257e2b6875554805ea Mon Sep 17 00:00:00 2001 From: sommersoft Date: Wed, 13 Feb 2019 21:22:26 -0600 Subject: [PATCH 8/9] rename & reformat README.md to README.rst --- README.md | 64 ----------------------------------- README.rst | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 64 deletions(-) delete mode 100644 README.md create mode 100644 README.rst diff --git a/README.md b/README.md deleted file mode 100644 index 0ec3f6ec..00000000 --- a/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# Adafruit CircuitPython Library Bundle - -[![Doc Status](https://readthedocs.org/projects/circuitpython/badge/?version=latest)](https://circuitpython.readthedocs.io/en/latest/docs/drivers.html) -[![Discord](https://img.shields.io/discord/327254708534116352.svg)](https://discord.gg/nBQh6qu) - -This repo bundles a bunch of useful CircuitPython libraries into an easy to -download zip file. CircuitPython boards can ship with the contents of the zip to -make it easy to provide a lot of libraries by default. - -# Use -To use the bundle download the zip (not source zip) from the -[latest release](https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/latest), -unzip it and copy over the subfolders, such as `lib`, into the root of your -CircuitPython device. Make sure to indicate that it should be merged with the -existing folder when it exists. - -## CPython -**DO NOT** use this to install libraries on a Linux computer, such as the Raspberry Pi, with regular Python (aka CPython). Instead, use the python3 version of `pip` to install the libraries you want to use. It will automatically install dependencies for you. For example: - -`pip3 install adafruit-circuitpython-lis3dh` - -# Development - -After you clone this repository you must run `git submodule init` -and then `git submodule update`. - -## Updating libraries -To update the libraries run `update-submodules.sh`. The script will fetch the -latest code and update to the newest tag (not master). - -To find libraries with commits that haven't been included in a release do: - - git submodule foreach "git log --oneline HEAD...origin/master" - -## Adding a library -Determine the best location within `libraries` (`libraries/drivers/` or -`libraries/helpers/`)for the new library and then run: - - git submodule add libraries/ - -The target directory should omit any CircuitPython specific prefixes such as -`adafruit-circuitpython` to simplify the listing. - -## Removing a library -Only do this if you are replacing the module with an equivalent: - - git submodule deinit libraries/ - git rm libraries/ - -## Building the bundle -To build this bundle locally you'll need to install the -`circuitpython-build-tools `_ package. - - python3 -m venv .env - source .env/bin/activate - pip install circuitpython-build-tools - -Once installed, make sure you are in the virtual environment: - - source .env/bin/activate - -Then run the build: - - circuitpython-build-bundles --filename_prefix adafruit-circuitpython-bundle --library_location libraries --library_depth 2 diff --git a/README.rst b/README.rst new file mode 100644 index 00000000..5270d18e --- /dev/null +++ b/README.rst @@ -0,0 +1,97 @@ +Adafruit CircuitPython Library Bundle +======================================= + +.. image:: https://readthedocs.org/projects/adafruit-circuitpython-bundle/badge/?version=latest + :target: https://circuitpython.readthedocs.io/projects/bundle/en/latest/ + :alt: Documentation Status + +.. image:: https://img.shields.io/discord/327254708534116352.svg + :target: https://discord.gg/nBQh6qu + :alt: Discord + +.. image:: https://travis-ci.com/adafruit/Adafruit_CircuitPython_Bundle.svg?branch=master + :target: https://travis-ci.com/adafruit/Adafruit_CircuitPython_Bundle + :alt: Build Status + +This repo bundles a bunch of useful CircuitPython libraries into an easy to +download zip file. CircuitPython boards can ship with the contents of the zip to +make it easy to provide a lot of libraries by default. + +Use +===== +To use the bundle download the zip (not source zip) from the +`latest release `_, +unzip it and copy over the subfolders, such as ``lib``, into the root of your +CircuitPython device. Make sure to indicate that it should be merged with the +existing folder when it exists. + +CPython +-------- +**DO NOT** use this to install libraries on a Linux computer, such as the Raspberry Pi, +with regular Python (aka CPython). Instead, use the python3 version of ``pip`` to install +the libraries you want to use. It will automatically install dependencies for you. For example: + +.. code:: + + pip3 install adafruit-circuitpython-lis3dh + +Development +============ + +After you clone this repository you must run ``git submodule init`` +and then ``git submodule update``. + +Updating libraries +------------------- +To update the libraries run ``update-submodules.sh``. The script will fetch the +latest code and update to the newest tag (not master). + +To find libraries with commits that haven't been included in a release do: + +.. code:: + + git submodule foreach "git log --oneline HEAD...origin/master" + +Adding a library +----------------- +Determine the best location within ``libraries`` (``libraries/drivers/`` or +``libraries/helpers/``)for the new library and then run: + +.. code:: + + git submodule add libraries/ + +The target directory should omit any CircuitPython specific prefixes such as +``adafruit-circuitpython`` to simplify the listing. + +Removing a library +------------------- +Only do this if you are replacing the module with an equivalent: + +.. code:: + + git submodule deinit libraries/ + git rm libraries/ + +Building the bundle +-------------------- +To build this bundle locally you'll need to install the +`circuitpython-build-tools `_ package. + +.. code:: + + python3 -m venv .env + source .env/bin/activate + pip install circuitpython-build-tools + +Once installed, make sure you are in the virtual environment: + +.. code:: + + source .env/bin/activate + +Then run the build: + +.. code:: + + circuitpython-build-bundles --filename_prefix adafruit-circuitpython-bundle --library_location libraries --library_depth 2 From 0538a6b15c96d0df3b7006979905daa8a3a3eb72 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Wed, 13 Feb 2019 21:23:08 -0600 Subject: [PATCH 9/9] working version; Sphinx builds locally --- docs/conf.py | 4 ---- docs/drivers.rst | 23 ++--------------------- docs/index.rst | 2 +- 3 files changed, 3 insertions(+), 26 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 71ff1fac..c5d33677 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -24,10 +24,6 @@ intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None)} - """'BusDevice': ('https://circuitpython.readthedocs.io/projects/busdevice/en/latest/', None), - 'Register': ('https://circuitpython.readthedocs.io/projects/register/en/latest/', None), - 'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None) - }""" # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/docs/drivers.rst b/docs/drivers.rst index 148db804..395a191e 100644 --- a/docs/drivers.rst +++ b/docs/drivers.rst @@ -1,31 +1,12 @@ .. _adafruit-libndrivers: -Additional Adafruit Libraries and Drivers on GitHub +Adafruit Sponsored Libraries and Drivers on GitHub =================================================== These are libraries and drivers available in separate GitHub repos. They are designed for use with CircuitPython and may or may not work with `MicroPython `_. -.. _bundle_installation: - -Bundle ------- - -We provide a bundle of all our libraries to ease installation of drivers and -their dependencies. The bundle is primarily geared to the Adafruit Express line -of boards which feature a relatively large external flash. With Express boards, -its easy to copy them all onto the filesystem. However, if you don't have -enough space simply copy things over as they are needed. - -The bundles are available `on GitHub `_. - -To install them: - -#. `Download `_ - and unzip the latest zip that's not a source zip. -#. Copy the ``lib`` folder to the ``CIRCUITPY`` or ``MICROPYTHON``. - Foundational ------------ @@ -209,7 +190,7 @@ These chips communicate to other's over radio. IO Expansion -------------- -These provide functionality similar to `analogio`, `digitalio`, `pulseio`, and `touchio`. +These provide functionality similar to ``analogio``, ``digitalio``, ``pulseio``, and ``touchio``. .. toctree:: diff --git a/docs/index.rst b/docs/index.rst index d5814b3d..ed31013b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -11,7 +11,7 @@ Table of Contents .. toctree:: :maxdepth: 4 - :caption: Drivers + :caption: Drivers & Helpers drivers