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
File details
Details for the file adafruit-circuitpython-itertools-2.0.0.tar.gz
.
File metadata
- Download URL: adafruit-circuitpython-itertools-2.0.0.tar.gz
- Upload date:
- Size: 35.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 836435ad9c9bfb65693818f63966717ff2a65d812370bbfdfdaec287f1f61eae |
|
MD5 | cb5c5837fd2c85b4723fcaf6d9319653 |
|
BLAKE2b-256 | 3d45d7cabbe7c83b578a5300abc85ff7da079ab7246668f2c5909df67be08bb4 |