https://github.com/numat/baratron
Python driver and command line tool for MKS eBaratron capacitance manometers.
https://github.com/numat/baratron
Last synced: 6 months ago
JSON representation
Python driver and command line tool for MKS eBaratron capacitance manometers.
- Host: GitHub
- URL: https://github.com/numat/baratron
- Owner: numat
- License: gpl-2.0
- Created: 2015-06-23T14:59:56.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2021-10-01T22:14:28.000Z (almost 5 years ago)
- Last Synced: 2025-09-27T07:27:16.654Z (9 months ago)
- Language: Python
- Homepage:
- Size: 24.4 KB
- Stars: 1
- Watchers: 8
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
baratron
========
Python driver and command line tool for ToolWeb-enabled [MKS eBaratron capacitance manometers](http://www.mksinst.com/product/category.aspx?CategoryID=72).
Installation
============
```
pip install baratron
```
If you want to use the older python2/tornado implementation, use `pip install baratron==0.1.2`.
Usage
=====
### Command Line
To test your connection and stream real-time data, use the command-line
interface. You can read the device with:
```
$ baratron 192.168.1.100
{
"drift": 0.00164,
"full-scale pressure": 1000.0,
"led color": "green",
"pressure": 3.78864,
"pressure units": "torr",
"run hours": 17517.763055555555,
"system status": "e-Baratron Zeroing Recommended",
"wait hours": 0.0
}
```
### Python
This uses Python ≥3.5's async/await syntax to asynchronously communicate with
the device. For example:
```python
import asyncio
import baratron
async def get():
async with baratron.CapacitanceManometer('the-baratron-ip-address') as sensor:
print(await sensor.get())
asyncio.run(get())
```