https://github.com/ctoth/pygmc
Python library to communicate with GQ Electronics GMC Geiger Counters
https://github.com/ctoth/pygmc
geiger radiation
Last synced: 4 months ago
JSON representation
Python library to communicate with GQ Electronics GMC Geiger Counters
- Host: GitHub
- URL: https://github.com/ctoth/pygmc
- Owner: ctoth
- Created: 2022-02-05T22:10:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-24T23:41:34.000Z (over 2 years ago)
- Last Synced: 2026-01-14T18:27:40.058Z (5 months ago)
- Topics: geiger, radiation
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PyGMC
PyGMC is a Python library for interfacing with the GQ Electronics GMC 500, 500+, 600, and 600+ Geiger-Muller Counters using the device's custom protocol. It implements all documented commands and provides an easy-to-use interface for accessing and updating the device configuration.
## Installation
```bash
pip install pygmc
```
## Usage
```python
from pygmc import GMCConnection, GMCGeigerCounter
# Establish a connection
connection = GMCConnection(port='COM4')
# Create a Geiger counter instance
geiger = GMCGeigerCounter(connection=connection)
# Fetch the current CPM (Counts Per Minute)
cpm = geiger.get_CPM()
# Print the CPM
print(cpm)
```
## Documentation
Detailed documentation for each method is provided in the source code itself. The following are a few key methods and what they do:
* `GMCGeigerCounter.get_CPM()`: Fetches the current CPM (Counts Per Minute) from the device.
* `GMCGeigerCounter.get_battery_voltage()`: Fetches the battery voltage from the device.
* `GMCGeigerCounter.get_config()`: Fetches the current device configuration.
* `GMCGeigerCounter.set_config(config)`: Sets the device configuration. The `config` parameter should be a dictionary matching the structure defined in the `config_format` constant.
* `GMCGeigerCounter.reboot()`: Reboots the device.
* `GMCGeigerCounter.factory_reset()`: Resets the device to factory settings.
You can find the complete list of methods and their description in the `GMCGeigerCounter` class in the code.
## Contributing
We welcome contributions from the community! If you have suggestions for improvements, please open an issue to discuss your ideas or feel free to submit a pull request.