Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brianpugh/magnetometer
CLI Magnetometer using a CircuitPython board + Belay
https://github.com/brianpugh/magnetometer
belay circuitpython magnetometer micropython textual tui
Last synced: 2 months ago
JSON representation
CLI Magnetometer using a CircuitPython board + Belay
- Host: GitHub
- URL: https://github.com/brianpugh/magnetometer
- Owner: BrianPugh
- License: apache-2.0
- Created: 2022-08-28T00:39:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-06T15:56:32.000Z (6 months ago)
- Last Synced: 2024-10-01T14:31:03.292Z (3 months ago)
- Topics: belay, circuitpython, magnetometer, micropython, textual, tui
- Language: Python
- Homepage:
- Size: 236 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Magnetometer
This is a [magnetometer](https://en.wikipedia.org/wiki/Magnetometer) command-line tool that reads from physical magnetic sensors via
[Belay](https://github.com/BrianPugh/belay).
# Installation
Install Magnetometer through pip:```
pip install magnetometer
```# Usage
To start the program, invoke `magnetometer` along with the port your
CircuitPython board is connected to.```
magnetometer DEVICE_PORT --sensor SENSOR_TYPE
```You can use the debugging sensor `sin` without any physical hardware interactions.
CircuitPython must be installed on-device and [must be configured with rw storage](https://belay.readthedocs.io/en/latest/CircuitPython.html).
Magnetometer will automatically upload all necessary code to device.
Run `magnetometer --help` to see more options.
### Supported Sensors
* [LIS3MDL](https://www.adafruit.com/product/4479) - Up to ±1,600μT
* [MMC5603](https://www.adafruit.com/product/5579) - Up to ±3,000μT
* [LIS2MDL](https://www.adafruit.com/product/4488) - Up to ±5,000μT
* [TLV493D](https://www.adafruit.com/product/4366) - Up to ±130,000μTWant to support another sensor? Open an issue (or even a PR) on Github and we
can try to add it!# Acknowledgements
This tool uses many awesome libraries that keep the implementation terse and the outputs beautiful:
* [Belay](https://github.com/BrianPugh/belay) - Seameless python/hardware interactions. Used for all hardware interactions.
* [AutoRegistry](https://github.com/BrianPugh/autoregistry) - Automatic registry design-pattern library for mapping names to functionality. Used to manage sensor hardware abstraction layer.
* [Textual](https://github.com/Textualize/textual) - Text User Interface framework for Python inspired by modern web development. Used for dynamic user input.
* [Rich](https://github.com/Textualize/rich) - Python library for rich text and beautiful formatting in the terminal. Used for general UI text rendering.
* [AsciiChartPy](https://github.com/kroitor/asciichart) - Nice-looking lightweight console ASCII line charts. Used for chart plotting. Modified to be `rich`-compatible.
* [CircuitPython Bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle) - A bundle of useful CircuitPython libraries ready to use from the filesystem.