Here are the steps for setting up and running the demos, in no specific order.
- Set up PATH and PYTHONPATH for PySignalFlow and the necessary libraries
- Install python demo dependencies
NOTE The demos are only designed to work with python 3.10.
PySignalFlow is a python module that allows the user to configure and receive data from Novelda signalprocessing algorithms from python. We need to tell python where to import it from. We will do this by adding the path to PYTHONPATH.
For the Windows SDK, PySignalFlow and other libraries are in the <Novelda_SDK_Root>/bin directory. Using powershell you can temporarily add them like so.
$Env:PYTHONPATH += ";<path-to-sdk>/bin"
$Env:PYTHONPATH += ";<path-to-novelda-uwb-demos-repo>/Nodes/Python/Novelda"
$Env:PATH += ";<path-to-sdk>/bin"
Or add them permanently in settings. Just search for "env" in Windows and it will show up as "Edit the system environment variables", then click "Environment Variables". There you can add new variables.
If you prefer installing python packages in a virtual environment instead of your global environment perform this step before pip install.
cd Demos
python -m venv .demos
.\.demos\Scripts\activate
This will create a new virtual environment in 'Demos' named '.demos' and activate it. To deactivate it, just run the command 'deactivate'.
Now you can run
pip install -r <path-to-novelda-uwb-demos-repo>/Demos/requirements.txt
The requirements.txt file will be in the 'Demos' directory.
Start python3.10 interpreter and you should be able to do:
>>> import PySignalFlow
If this works without errors you have successfully setup the necessary path to be able to run the demos.
And that's it, now you should be able to run the demos.