New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect sensor type #8
Comments
Hey, To get the sensors connected, you simply have to call the .getSensors() on your instance. For example if you use the sample code provided, your instance should be something like this: device = NewDevice(address), and to get the sensors just call device.getSensors() (P.S. This method only works with devices that have the biosignals 3.7 and up firmware) Best regards |
Hi Daniel, |
Here is the output of lddb:
|
The API in this rep for macOS is for the 3.7 Python, but we tested using the built in (non Anaconda) version (sometimes there are weird behaviors when using it). |
The built-in version I have is 3.8.2, and it does not work with it either. |
Eager to test, but the macOS lib has disappeared from the repo ;) |
Done. I changed the folder structure and forgot to do the add command |
Thanks, it works! |
Glad to hear it works. The key in the return dictionary is the port to which the sensor is connected. The properties you listed are as follow: The clas is what I think you want. You can implement the following list to convert the number to the sensor type sensorClasses = ['UNKNOWN', 'EMG', 'ECG', 'LUX', 'EDA', 'BVP', 'RESP', 'XYZ', 'SYNC', 'EEG', 'SYNC_ADAP', 'SYNC_LED', 'SYNC_SW', 'USB', 'FORCE', 'TEMP', 'VPROBE', 'BREAKOUT', 'SpO2', 'GONI', 'ACT', 'EOG', 'EGG'] To map the color (the colored sleeve on the sensor), sensorColors = ['unknown', 'black', 'gray', 'white', 'dark_blue', 'light_blue', 'red', 'green', 'yellow', 'orange', 'light_green', 'brown'] The characteristics and measurCalib (measured calibration) are sensor specific. Some sensors have variants (present in the characteristics dict) and can be mapped using sensorVariants = { 'SpO2': {'H': 'hSpO2', 'F': 'fSpO2', 'L': 'SpO2'}, 'FORCE': {'1': 'FSRI', '2': 'FSRII', '3': 'FSRIII', '4': 'FSRIV', '5': 'LOADCELL', '6': 'FORCEPLATFORM'} } |
Perfect, thanks a lot. |
Opensignals is able to detect the sensor type for each channel (EDA, ECG, etc.)
I do not see anything in the API documentation that would allow me to do the same.
Is this possible with the Python API?
The text was updated successfully, but these errors were encountered: