https://github.com/bindreams/pynvx
NVX wrapper for python.
https://github.com/bindreams/pynvx
Last synced: about 1 year ago
JSON representation
NVX wrapper for python.
- Host: GitHub
- URL: https://github.com/bindreams/pynvx
- Owner: bindreams
- Created: 2018-12-24T18:30:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-03-07T15:15:23.000Z (about 1 year ago)
- Last Synced: 2025-03-07T16:25:20.080Z (about 1 year ago)
- Language: Python
- Size: 1.59 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pynvx
NVX wrapper for python.
## Installation
```
git clone https://github.com/andreasxp/pynvx
pip install -e pynvx
```
## Example usage
```python
import nvx
nvx.set_emulation(True) # set emulation state, adds 1 pseudo-device
dev = nvx.Device(0) # create a device with index 0
try:
print("Collecting data. Ctrl-C to stop")
print("Showing only some of the channels:")
print("EEG channel 1|EEG channel 2|EEG channel 3|AUX channel 1|Counter")
input("Press any key to start gathering data...")
dev.start() # start collecting data
while True:
samples = dev.pull_chunk() # Get all collected data samples
for sample in samples: # While there is sample to recieve, do stuff with it
print('EEG1:{:>8}|EEG2:{:>8}|EEG3:{:>8}|AUX1:{:>8}|COUNT:{:>8}'.format(
sample.eeg_data(0),
sample.eeg_data(1),
sample.eeg_data(2),
sample.aux_data(0),
sample.counter # Counts samples
))
except KeyboardInterrupt:
pass
dev.stop()
```
## License
`pynvx` is licenced under the MIT license. It is free for personal and commercial use. Note that the files listed under `nvx/dll` belong to [Medical Computer Systems Ltd](https://mks.ru/en/index/) and are subject to their own license and copyright.