Native Python implementation for Unicorn wireless EEG data

This page is part on a series on the Unicorn EEG system, see also the other posts.

The Unicorn EEG system is a low-cost wireless 8-channel EEG system including an IMU and the “naked” version lends itself well to making your own 3d-printed enclosure as I demonstrated here. Most important for me is that it “just works”.

As the software that comes with only works on Windows and I prefer macOS, I made a platform-independent native Python implementation for real-time data streaming. My example streams the data to LSL, but can also be used as a starting point for real-time processing. See the gist of unicorn2lsl.py on GitHub.

4 thoughts on “Native Python implementation for Unicorn wireless EEG data

  1. June Kang

    I prefer MacOS too, and always want to connect the device directly (without blackbox .dll or .so api).
    The code works great, and thanks again for sharing it.

    By the way, the LSL connection shows seriously faster battery drain, compare to window app. Didn’t you experience super fast (<20min recording) battery drain?
    I guess that maybe the baudrate (115200) or blocksize affected it.

    Reply
    1. Robert Post author

      Hi June

      Thanks for the feedback!

      I have personally not noticed the battery drain to be any different with the Python app compared to the Windows app. Recently we did a performance/demonstration in the Techniska Museum in Stockholm, that was pretty much a whole-day session during which the Unicorn was switched on for most of the time. The Unicorn must have been running continuously for hours with the Python implementation, only with some time to charge over the lunch break, and it did not empty the battery. Although, I realize that was with the https://github.com/eegsynth/eegsynth/tree/master/module/unicorn2ft Python application, not the unicorn2lsl.py that I posted on my homepage. But I would not expect those two to act very different. Soon I’ll be testing/experimenting with two Unicorns at the same time; I will use that opportunity to try and do a comparison between the Python and Windows app.

      best regards,
      Robert

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *