An embellished version of https://gist.github.com/electronut/5641933 (forked to https://gist.github.com/tatzelbrumm/8035173) , for use with https://github.com/OpenElectronicsLab/eeg-mouse