/2Sense

Primary LanguagePython

Our project is about perturbing different senses, particularly those associated with balance and what we can learn about a patient and the brain as a whole by analysing how these stimuli affect where the senses are processed in the brain (parietal cortex). We chose to write in python because the libraries available make it a good common ground between the various technologies we used; we controlled an arduino via pyfirmata which, in turn. controlled a vibration motor at the ankle that is activated by a pressure sensor on the bottom of the foot to only register when a footstep is taken. We used python's tkinter to make an animation for visual stimulation. We collected eeg data using openBCI's Ganglion which we processed using brainflow's api (and numpy!). UI for the data collection program was mainly done in tkinter with some functionality being rounded out with similar libraries, pygame and turtle. The class to collect data from the Ganglion board is based on brainflow.readthedocs.io/en/stable/Examples.html#python-get-data-from-a-board; other than this example all code is original. Our data analysis consists of background noise reduction via notch filter then removal of outliers with a bandpass filter, followed by division into segments following when the touch stimulation was activated which were vertically translated to normalise background activity then finally averaged across multiple trials. The project on GitHub can be run from UI.py when our arduino prototype as well as a Ganglion board are connected.