SMWiredPy
Sensemore - Wired vibration sensor Python interface
Installing the library
- Using pip
$ pip install SMWired
- Build from source
#Inside the library folder
$ pip install .
Requirements
- pybind11
- pyserial
- SMComPy (pip install SMComPy or see SMComPy)
Example usage
import SMWiredPy
wired_network = SMWiredPy.SMWired(port = "/dev/ttyUSB0", configure_network='auto', max_device_number=2)
#Dump the list of found available devices
print("Found available devices:",wired_network.get_available_devices())
devices = wired_network.get_available_devices()
#Print the version of the devices
for device in devices:
print("Version of '%s' is %s"%(device,wired_network.get_version(device)))
#Take measurement from a specific device in the network
mac = 'CA:B8:31:00:00:55'
accelerometer_range = "16G"
sampling_frequency = 6400
sample_size = 200
#wired_network.firmware_update(mac,'Wiredv1_0_13.bin')
measurement_result = wired_network.measure(mac,accelerometer_range,sampling_frequency,sample_size)
#Measurement results are native python lists
result_acc_x = measurement_result[0]
result_acc_y = measurement_result[1]
result_acc_z = measurement_result[2]
print("Acc-X:",result_acc_x)
print("Acc-Y:",result_acc_y)
print("Acc-Z:",result_acc_z)
"""
Also there are telemetries calculated in wired, we can also take it by calling get_all_telemetry
"""
telemetries = wired_network.get_all_telemetry(mac)
print(telemetries)
Available sampling frequencies
- 800 Hz
- 1600 Hz
- 3200 Hz
- 6400 Hz
- 12800 Hz
Available accelerometer ranges
- 2G
- 4G
- 8G
- 16G
Available sample size range
- Up to 1 million sample is supported
Command line interface
- Updating the wired device via CLI
python -m sensemore.SMWiredPy update --port=/dev/ttyUSB0 --file=Wiredv1_0_13.bin --mac=CA:B8:31:00:00:3C
- Fast measurement via cli
python -m sensemore.SMWiredPy measure --port=/dev/ttyUSB0 --mac=CA:B8:31:00:00:3C --sample=1000 --freq=12800 -acc=16G -t
Metadata
Release files for SMWiredPy 1.0.4
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 |
|---|---|---|---|---|
| SMWiredPy-1.0.4.tar.gz | 13.4 kB | Without provenance | Details for SMWiredPy-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| SMWiredPy-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for SMWiredPy-1.0.4-py3-none-any.whl |
Total release size: 27.0 kB
Release files / SMWiredPy-1.0.4.tar.gz
| Download URL | SMWiredPy-1.0.4.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e51202bb63ae531f618f9c01f2847ed00e09365571ae6bd27be8844a14b0b089
|
|
BLAKE2b-256 checksum How to use checksums |
1032de062b2b2a8fda977aa546cab4c929da32950bd22d0acaf453b1028bbe38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.10
|
Release files / SMWiredPy-1.0.4-py3-none-any.whl
| Download URL | SMWiredPy-1.0.4-py3-none-any.whl |
|---|---|
| Size | 13.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
95d49eb2c1f0ee7d5ce99d28b5314fbb56ff119bdca12eecf0adc3a149048028
|
|
BLAKE2b-256 checksum How to use checksums |
8a0785491cdad4e3ae3dbe4f024273891e1e685534e27618b1bc29b58790ffca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.10
|
Security for SMWiredPy 1.0.4
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.