No description
Find a file
2020-07-09 12:19:15 -04:00
.github/workflows build.yml: add black formatting check 2020-04-07 16:11:30 -05:00
docs Black reformatting with Python 3 target. 2020-04-08 13:18:10 -04:00
examples Should fix pylint failure 2020-07-09 12:19:15 -04:00
.gitignore Initial commit for CLUE. 2020-02-04 12:27:38 -05:00
.pylintrc update pylintrc for black 2020-03-08 19:11:35 -05:00
.readthedocs.yml Initial commit for CLUE. 2020-02-04 12:27:38 -05:00
adafruit_clue.py Ran black, updated to pylint 2.x 2020-03-20 12:16:43 -04:00
CODE_OF_CONDUCT.md update code of coduct: discord moderation contact section 2020-03-15 18:25:29 -05:00
LICENSE Initial commit for CLUE. 2020-02-04 12:27:38 -05:00
README.rst Fixed discord invite link 2020-07-08 16:49:04 -04:00
requirements.txt Update units in example, requirements fix. 2020-02-04 15:07:42 -05:00
setup.py.disabled Add setup.py.disabled, update README 2020-04-14 11:20:54 -04:00

Introduction
============

.. image:: https://readthedocs.org/projects/adafruit-circuitpython-clue/badge/?version=latest
    :target: https://circuitpython.readthedocs.io/projects/clue/en/latest/
    :alt: Documentation Status

.. image:: https://img.shields.io/discord/327254708534116352.svg
    :target: https://adafru.it/discord
    :alt: Discord

.. image:: https://github.com/adafruit/Adafruit_CircuitPython_CLUE/workflows/Build%20CI/badge.svg
    :target: https://github.com/adafruit/Adafruit_CircuitPython_CLUE/actions
    :alt: Build Status

A high level library representing all the features of the Adafruit CLUE.


Dependencies
=============
This driver depends on:

* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_
* `Register <https://github.com/adafruit/Adafruit_CircuitPython_Register>`_
* `Adafruit LSM6DS <https://github.com/adafruit/Adafruit_CircuitPython_LSM6DS>`_
* `Adafruit LIS3MDL <https://github.com/adafruit/Adafruit_CircuitPython_LIS3MDL>`_
* `Adafruit APDS9960 <https://github.com/adafruit/Adafruit_CircuitPython_APDS9960>`_
* `Adafruit BMP280 <https://github.com/adafruit/Adafruit_CircuitPython_BMP280>`_
* `Adafruit SHT31D <https://github.com/adafruit/Adafruit_CircuitPython_SHT31D>`_
* `Adafruit NeoPixel <https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel>`_
* `Adafruit Display Text <https://github.com/adafruit/Adafruit_CircuitPython_Display_Text>`_

Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_.

Demos may require libraries not listed here.

Usage Example
=============
This example displays sensor and input data on the CLUE display.

.. code-block:: python

    from adafruit_clue import clue

    clue.sea_level_pressure = 1020

    clue_data = clue.simple_text_display(title="CLUE Sensor Data!", title_scale=2, num_lines=15)

    while True:
        clue_data[0].text = "Acceleration: {:.2f} {:.2f} {:.2f}".format(*clue.acceleration)
        clue_data[1].text = "Gyro: {:.2f} {:.2f} {:.2f}".format(*clue.gyro)
        clue_data[2].text = "Magnetic: {:.3f} {:.3f} {:.3f}".format(*clue.magnetic)
        clue_data[3].text = "Pressure: {:.3f}hPa".format(clue.pressure)
        clue_data[4].text = "Altitude: {:.1f}m".format(clue.altitude)
        clue_data[5].text = "Temperature: {:.1f}C".format(clue.temperature)
        clue_data[6].text = "Humidity: {:.1f}%".format(clue.humidity)
        clue_data[7].text = "Proximity: {}".format(clue.proximity)
        clue_data[8].text = "Gesture: {}".format(clue.gesture)
        clue_data[9].text = "Color: R: {} G: {} B: {} C: {}".format(*clue.color)
        clue_data[10].text = "Button A: {}".format(clue.button_a)
        clue_data[11].text = "Button B: {}".format(clue.button_b)
        clue_data[12].text = "Touch 0: {}".format(clue.touch_0)
        clue_data[13].text = "Touch 1: {}".format(clue.touch_1)
        clue_data[14].text = "Touch 2: {}".format(clue.touch_2)
        clue_data.show()


Contributing
============

Contributions are welcome! Please read our `Code of Conduct
<https://github.com/adafruit/Adafruit_CircuitPython_CLUE/blob/master/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.

Documentation
=============

For information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.