Skip to main content

Python library to communicate with STM32 for loading FPGA and camera sensors (OpenMOTION).

Project description

Overview

This repository contains the code used to interface with an OpenMotion sensor module and OpenMotion Console. The sensor module runs the code contained in the motion-sensor-fw repository on an STM32H7 processor. The programs here communicates with the modules over a USB serial connection.

A library called omotion is imported in many of the python scripts listed here to aid communication with the Sensor Module.

Getting started

  1. Install requirements.txt (pip install -r requirements.txt)
  2. Install libusb for your system requires libusb to be installed, for windows install the dll to c:\windows\system32, download the correct dll from github libusb Releases
  3. Plug in your aggregator module. Please wait 10 seconds for it to boot up before continuing.
  4. Run python multicam_setup.py - this will flash each camera sensor one by one. Alternatively, you may flash just a single camera sensor by usising python flash_camera.py 1 - this will flash just camera 1
  5. Run python monitor.py 1 - this will flash the camera with a few parameters (test modes, exposure times, gain settings, etc), start the camera streaming, start the frame sync generating, and then put the cameras into streaming mode. It will then recieve the histogram data for the defined number of seconds then close down. Modify the parameters at the top of this file if you want to adjust the gain, exposure time, etc. Change the number in the command line arguments to change the camera you'd like to interrogate. Cameras are numbered 1-8 and correspond to J1-J8 on the aggregator board.

from repo root rebuild and install

python -m pip install --upgrade build twine python -m build # creates wheel + sdist under dist/ python -m pip install --force-reinstall dist/openmotion_sdk-1.3.3-py3-none-any.whl

quick runtime check (on Windows box with your device bound to WinUSB/libusbK)

python -c "import usb, omotion.usb_backend as ub; print(ub.get_libusb1_backend())"

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

openmotion_sdk-1.6.3.tar.gz (40.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openmotion_sdk-1.6.3-py3-none-any.whl (6.8 MB view details)

Uploaded Python 3

File details

Details for the file openmotion_sdk-1.6.3.tar.gz.

File metadata

  • Download URL: openmotion_sdk-1.6.3.tar.gz
  • Upload date:
  • Size: 40.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openmotion_sdk-1.6.3.tar.gz
Algorithm Hash digest
SHA256 5bcc43ed0efe2c2b45b23dc65ea4106253257ec46fd0fb02dfed2a96cd7bad05
MD5 9e7ef50620be3ccc95eacf84f58f732d
BLAKE2b-256 743916ee37c44fb112a305d97d7e07fe6029f600a624c5e7a3e742ec979313e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openmotion_sdk-1.6.3.tar.gz:

Publisher: publish-pypi.yml on OpenwaterHealth/openmotion-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openmotion_sdk-1.6.3-py3-none-any.whl.

File metadata

  • Download URL: openmotion_sdk-1.6.3-py3-none-any.whl
  • Upload date:
  • Size: 6.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openmotion_sdk-1.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 64d6b18a2964c89ba8d2e92faeeefd3abd0b72896cc1c370d76d6bc19138c0d1
MD5 c8fd649d926541825e649b54440ec650
BLAKE2b-256 82c0b7eff0090b45606ffda757258ccadf79387b58002218604e885806c8ff32

See more details on using hashes here.

Provenance

The following attestation bundles were made for openmotion_sdk-1.6.3-py3-none-any.whl:

Publisher: publish-pypi.yml on OpenwaterHealth/openmotion-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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