Python's itertools for CircuitPython
Project description
Introduction
Python’s itertools for CircuitPython
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.
Usage Example
import time
import board
import busio
import adafruit_si7021
from adafruit_itertools.adafruit_itertools import count
from adafruit_itertools.adafruit_itertools_extras import repeatfunc
i2c = busio.I2C(board.SCL, board.SDA)
sensor = adafruit_si7021.SI7021(i2c)
def read_temperature():
return sensor.temperature
def now():
return time.monotonic()
datapoints = zip(count(1), repeatfunc(now), map(int, repeatfunc(read_temperature)))
while True:
print(next(datapoints))
time.sleep(20.0)
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file adafruit-circuitpython-itertools-2.0.2.tar.gz
.
File metadata
- Download URL: adafruit-circuitpython-itertools-2.0.2.tar.gz
- Upload date:
- Size: 35.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 531337f86100ffdd34f6e2cd3767bc1a08bb8e045ad818aa4e641fd0b80b8775 |
|
MD5 | ba11c73e144fd1a387018b8cac03dcd9 |
|
BLAKE2b-256 | c1ba8bee593b06b7b13b0c09107702647febd7397e22600c8cfe6686b6a81d63 |
File details
Details for the file adafruit_circuitpython_itertools-2.0.2-py3-none-any.whl
.
File metadata
- Download URL: adafruit_circuitpython_itertools-2.0.2-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0fea46c4d626c258aeef8a5ecb0abdb675ad42ec1af45b80c0b35fdb5d7eb09 |
|
MD5 | e4aa60b20c0fc538074e54e98f59785c |
|
BLAKE2b-256 | 1ea98d43c8e272c5e8a26258c57e0e64b4e654777b9935efb02855cf9a77d789 |