Skip to main content

Sensemore Wired Python Interface

Project description

SMWiredPy

Sensemore - Wired vibration sensor Python interface

sm

Wired

Installing the library

  • Using pip
	$ pip install SMWired
  • Build from source
	#Inside the library folder
	$ pip install .

Requirements

  • pybind11
  • pyserial
  • SMComPy (pip install SMComPy)

Example usage

from sensemore 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 = 12800
sample_size = 100

measurement_result = wired_network.measure(mac,accelerometer_range,sampling_frequency,sample_size)

result_acc_x = measurement_result[0]
result_acc_y = measurement_result[1]
result_acc_z = measurement_result[2]

"""
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

Command line interface

  • Updating the wired device via cli
python -m sensemore.SMWiredPy update --port=/dev/ttyUSB0 --mac=CA:B8:31:00:00:3C --file=Wiredv1_0_13.bin 
  • 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

SMWiredPy-1.0.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

SMWiredPy-1.0.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file SMWiredPy-1.0.0.tar.gz.

File metadata

  • Download URL: SMWiredPy-1.0.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for SMWiredPy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d61ffb17ad55e01653effd39fb76eb6785e2ebda557ddd55a9ee79e40c84f04b
MD5 7701aea6b645ee12b72f5964db9628e8
BLAKE2b-256 c6722b6ae6b182c4310845bda682a1690e21a4c6148fc1c67f1db2b9e9838279

See more details on using hashes here.

File details

Details for the file SMWiredPy-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: SMWiredPy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for SMWiredPy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22847a759f6dc457cf5122c04a615edf40fba0321d7cc20c2d57a371e1e93dde
MD5 ace005d6c144fe17d9ccbac6efdd389d
BLAKE2b-256 afe62709f505c0b8fb232956640d3e589a51d15c07f99b0dab9347d221f4bd9b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page