An Interactive EEG tutorial that teaches EEG and BCI basics.
- Teaches what EEG is, where signals come from, how devices work, and how to work with EEG data
- Streams data from the Muse with LibMuse Java API
- Built with React Native for Android
- Completely free, open-source, and available for use/adaption in any project
- Data collection (saving to csv)
- Bandpass filtering
- Dynamic artefact removal
- General-purpose brain state classifier (Naive Bayes)
- Advanced lesson content (Riemannian Potato)
Our goal with EEG 101 was to create a flexible base for EEG and BCI mobile development that novice programmers could build on top of, and could be adapted to work on multiple platforms with different EEG devices. To satisfy those concerns, we've built the app in React Native, which allows for fast, straight-forward front-end development and the promise of an easy port to iOS in the future (hopefully).
EEG 101 is split right down the middle between Java and React. If you're interested in how we communicate with the Muse, process EEG data, and plot the results in real time, check out the graph and signal classes in the android source folders. Our implementations are all (for the most part) typical Android components written in Java.
If you'd like to use EEG 101 as a base for your own React Native app, take a look at how we've written the tutorial in the src folder. Connecting to a Muse and plotting real-time EEG data is as simple as using one of the React components we have already defined.
- Install and setup React Native from the Source website. We recommend setting up the Gradle Daemon as well
- Import android folder as a new project into Android Studio
- Install yarn and run
yarn install
. npm might work as well. - Connect an Android device with USB debug mode enabled. There can be issues running this app on a virtual device and we recommend real hardware.
- run
react-native start
to start React packager - In new terminal,
adb reverse tcp:8081 tcp:8081
to ensure debug server is connected to the device andreact-native run-android
to install
- Gradle build error: Attribute "title" has already been defined
- Solution: Make sure build tools is using latest version in in app/build.gradle (ie. 25.0.1) [http://stackoverflow.com/questions/39184283/attribute-title-has-already-been-define-when-have-android-plot-dependencies-1]
- INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.eeg_project signatures do not match the previously installed version; ignoring!
- Solution: Uninstall any pre-existing versions of the app on your device
- Could not connect to development server
- Solution: Make sure that the device is connected, run
adb reverse tcp:8081 tcp:8081
, and restart the React packager (react-native-start
)
- Could not get BatchedBridge
- Solution: Run
adb reverse tcp:8081 tcp:8081
again and reload