If you are curious about neurofeedback, I did this talk about open-source neurofeedback. I don't play with open-source much, I had to focus (pun intended) and I just use a consumer device now. But principles are the same.

https://juraj.bednar.io/en/talk-en/2018/09/08/hacking-brain-opensource-eeg-neurofeedback/