Skip to main content

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

Project description

Introduction

Documentation Status Discord Build Status Code Style: Ruff

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

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Demos may require libraries not listed here.

Usage Example

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

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()

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adafruit_circuitpython_clue-3.2.5.tar.gz (17.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adafruit_circuitpython_clue-3.2.5-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file adafruit_circuitpython_clue-3.2.5.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_clue-3.2.5.tar.gz
Algorithm Hash digest
SHA256 7ecaa649683ef500da31df360b6ad617a64bef598df31256a0dc0bd1e16a98c7
MD5 433c4942f416fb5987939a7549137a8c
BLAKE2b-256 e83a72dcda93a7e82d72da698fb014e74ccdf11e8bd910c198e4c86653359c0c

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_clue-3.2.5-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_clue-3.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 667507211f1447e7522ffe994e641ca992b6f3abb2c42712620fea1ac3cce71c
MD5 b910b5c1b7ec14a13f20835ffaf6c5ec
BLAKE2b-256 888bd66573dbc0a624794f579fc00d517e737abc0d6fdf04c4bac79faaf30df0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page