Python scripts that interact with and simulate the behaviour of the Neblina Motion Capture module.
- python3
- pyserial
- Windows or Linux
Start by cloning the git repository onto your computer:
git clone https://github.com/Motsai/neblina-python.git
Install the dependencies:
pip3 install pyserial
To be able to run interaction scripts, you must first instantiate the pyslip submodule:
git submodule init
git submodule update
Make sure to add the directory of the cloned repository as well as its referenced submodules to your Python path:
On Linux
export PYTHONPATH="${PYTHONPATH}:/path/to/the/repo/neblina-python"
export PYTHONPATH="${PYTHONPATH}:/path/to/the/repo/neblina-python/pyslip"
Note: it is recommended to add the lines to the .bashrc to not have to execute the command every time you open a shell:
Connect the Neblina module to your computer through the Serial COM port. On the ProMotion board, there is a serial USB-COM already provided. Once the module is connected, take note of the COM port name. On Windows, the name would be COMx. On Linux, it would be /dev/ttyACMx.
Execute the interaction shell (Linux):
cd examples
python3 streammenu.py
On the execution of the shell script, the program will ask you for the name of the COM port to connect to. Type the name of the COM port associated with the module and press 'Enter'.
#Running the unit tests The unit tests allow for the validation of the decoding and encoding process of the packets. Make sure the pyslip submodule has been cloned and then you can now run the unit tests by executing the designated bash script:
./runNeblinaDataTests.sh