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: Black

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.0.12.tar.gz (17.7 MB view details)

Uploaded Source

Built Distribution

File details

Details for the file adafruit-circuitpython-clue-3.0.12.tar.gz.

File metadata

File hashes

Hashes for adafruit-circuitpython-clue-3.0.12.tar.gz
Algorithm Hash digest
SHA256 98aae7861bc8fa085c1ec8a0e9fb25f4a40dcb6291196153d5d72c0ad12cc500
MD5 e57c0d83e39159d4976afee7cf16cea9
BLAKE2b-256 4f86c1c7c7afcb7fb060b1f621b14f86b9abfb2321c2ad2a1adea992a32c826e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_clue-3.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 d2d84da56a6795fc5d62f2e8580356548f4413b2681c0ef095d271d51cc4561b
MD5 4ecb7bfca42ed864032e5fa95fd3097c
BLAKE2b-256 e7f08518549498dbbd3187390be19c59f4893e0640c227bc622ba15f05973c54

See more details on using hashes here.

Supported by

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