# NeuroSky MindWave Mobile 2 and M5Stack Core2 connection - Semester work for subject ZPI at the faculty of applied sciences at the University of West Bohemia. Winter semester 2022. - **M1**: main controller that connects to the EEG headset, parse data and output them to Serial and to the second controller M2 through UART - ```/M1/M1/M1.ino``` - main, actual version - ```/M1/M1/icons.cpp``` - icons in bitmap for GUI - ```/M1/other_versions/2_threads``` - verison with 2 threads and loop but not working properly - ```/M1/other_versions/without_multithreading``` - older verison just with loop, it doesn't have all features - **M2**: second controller that send request to M1 for data (```0-4```) and output them on the screen - ```/M2/M2.ino``` - main, actual version - ```/M2/icons.cpp``` - icons in bitmap for GUI - **M2Ext**: second controller that send request to M1 for data (```0-4```) and output them on the screen and MQTT broker - ```/M2Ext/M2Ext.ino``` - main, actual version - ```/M2Ext/icons.cpp``` - icons in bitmap for GUI - ```/M2Ext/flows.json``` - Node-red flow exported via json. Uses Node-red Dashboard extension - **Documentation**: https://docs.google.com/document/d/14M0UXB10LWmCGuYbZptHsV5nLe2JfVq7LQR3fZIQFcA/edit?usp=sharing ## DEVICES - 2x M5Stack Core2 (https://shop.m5stack.com/products/m5stack-core2-esp32-iot-development-kit) - NeuroSky MindWave Mobile 2 (https://store.neurosky.com/pages/mindwave) - MAC Address of our headset: ```98:07:2d:7f:ea:15``` ## FEATURES - **M1**: bluetooth recovery (after disconnecting) - **M1**: paring with device that has specific MAC address (declared in the beginning of code) - **M1**: battery status icon (4 levels and charging icon) - **M1**: signal quality icon (how poor the signal measured by the headset is) - **M1**: screen mode button (light mode / dark mode switch) - **M1**: brightness button (4 levels of brightness) - **M1**: saving screen mode and brightness into the memory of microcontroller (then it boots up with last settings) ## CONTACTS - **Vojtěch Pour** - pourv@gapps.zcu.cz (M1) - **Sebastián Hájek** - sebhajek@gapps.zcu.cz (M2) - **Tomáš Hrbek** - tomhrbek@gapps.zcu.cz (M2Ext and Documentation) ## SOURCES - NeuroSky MindWave official documentation: http://developer.neurosky.com/docs/doku.php?id=thinkgear_communications_protocol - NeuroSky MindWave quick start guide: http://download.neurosky.com/public/Products/MindWave%20Mobile%202/MindWave%20Mobile%202%20Quick%20Start%20Guide.pdf - Bluetooth library: https://github.com/espressif/arduino-esp32/tree/master/libraries/BluetoothSerial