Pico Register
Micropython library that provides a convenient and efficient way to interact with registers and individual bits of devices connected to the Serial Peripheral Interface (SPI).
Access and control the values of registers, perform read and write operations, and manipulate specific bits within a register.
The library abstracts the low-level details of SPI communication, allowing users to focus on working with registers and bits.
Key Features
- Simple and intuitive API
- Read and write operations on registers
- Bit-level manipulation and access within registers
Installation
pip install pico-register
## Usage
from register import Register, Bits
# Address of the register as specified in the device datasheet
WHO_AM_I = 0x0F
CTRL_REG = 0x10
PRESS_OUT_LSB = 0x28
PRESS_OUT_MSB = 0x29
# Create the registers objects
reg_device_id = Register(WHO_AM_I)
reg_pressure = Register(PRESS_OUT_LSB, 2)
# or the bits
data_ready = Bits(CTRL_REG, 0)
low_pass_filter = Bits(CTRL_REG, 3, 2)
# write values
low_pass_filter = 3
# Read the values
if data_ready:
print(reg_pressure)
Contributing
Contributions to this project are welcome. If you find any issues, have suggestions for improvements, or want to add new features, feel free to open an issue or submit a pull request.
License
This project is licensed under the MIT License. Feel free to use, modify, and distribute the code in accordance with the terms of the license.
Metadata
Release files for pico-register 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pico-register-0.1.0.tar.gz | 3.6 kB | Without provenance | Details for pico-register-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pico_register-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pico_register-0.1.0-py3-none-any.whl |
Total release size: 7.7 kB
Release files / pico-register-0.1.0.tar.gz
| Download URL | pico-register-0.1.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00dc0059e6d6e6219cf6bf9334e2ee633c3b6e5cd5786c640db0a6f4b55f2ea9
|
|
BLAKE2b-256 checksum How to use checksums |
298314830d5a37ba5b01b3464e6510522e61892d1443cf1aa74414e028b81909
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Release files / pico_register-0.1.0-py3-none-any.whl
| Download URL | pico_register-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02ea6a7ff0e45ff87cbca917169e01c9e5bec91804a07a62249abfac0aa96e66
|
|
BLAKE2b-256 checksum How to use checksums |
3d8f7f8e4b92f240a3d06cd9f14c54b41a2278b2ae1e45016f45a01d17e660cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Security for pico-register 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.