See our devpost FocusBoost Check out the demo on youtube FocusBoost
FocusBoost
FocusBoost is a real-time focus detection tool that uses the BioAmp EXG Pill and Arduino to capture brain signals and notify the user when they are focused in an Electron-based application that monitors your focus levels in real-time using data from an Arduino. The application provides notifications and motivational alerts to help you maintain focus and productivity and over a chromium software (for practical example like watching a youtube short).
- Brain wave monitoring Detects brain waves using BioAmp EXG Pill
- Filtering for stress Filters EXG signals into brain wave frequency region (0-50 Hz)
- Notifications when filtered signals exit beta frequency range (14-40 Hz).
- Sound alerts for real-time focus warnings.
- Daksh and Hasan
- Started laying the groundwork for the project
- Hasan
- Implemented barebones feature of the youtube selenium script to autoskip videos (Next step is to implement exg pill data for the skipping
- Daksh
- Set up the electron app by creating the renderer files: index(html/js), preload.js, styles.css. Also updated the package.json file and cleaned up other files
- Dealt with troubleshooting and refinements, fixed GPU crashes through disabling GPU rendering. Debugged other issues so that the window would open properly. Resolved through developing a gitignore file.
- Tested window using mock data, used to test real-time visualization of the app. Refined the chart code for better visuals.
- Improved other aspects of the project like helping with the arduino data processing, communicating aspects with teamates, cleaned and set up README.md with better setup instructions, and developed how to prompt notifications.
- Avery
- Connected BioAmp EXG Pill to Arduino to begin gathering brainwave signals. Wrote required code in Arduino IDE to begin the aquisition of data from the EXG Pill.
- Used byb spike recorder to test methods of recording signals to detect focus/stress. Decided on using the EXG as an EEG by connecting it to the forehead, targeting the frontal lobe. ECG data was simple to work with but not necessarily indicitave of focus/stress.
- Began serial plotting raw EEG data in Arduino IDE to visualize and confirm accuracy.
- Wrote code to transfer raw EEG data to python stress_monitor.py using pyserial module.
-
Hasan <<<<<<< HEAD
- Implemented reading EXG pill data to display notifications on chromium, decided by being focused or unfocused, and closing the page if the person remains unfocused
- Implemented focus features into youtube shorts and tiktok videos to show an example of our notification feature/data analysis
-
Avery
- Continued work on backend in stress_monitor.py by filtering raw EEG data by changing data into frequency domain and using scipy module to implement a bandpass filter for beta waves (14-30 Hz).
- Made a function to check if the incoming signals are in the beta range based on the beta wave power.
- If 10% or more of the incoming signals, over the course of a minute, are OUTSIDE of the beta range, the subject is UNFOCUSED. Otherwise they are FOCUSED.
- stress_monitor.py prints if the subject is FOCUSED or UNFOCUSED as well as the percentage of how UNFOCUSED the subject is. Example output: Is Unfocused: False (True Percentage: 2.79%).
- Tested and adjusted frequency ranges to accurately describe the subjects focus ranges.
-
Daksh
- Set up push notifications and sound alerts in the Electron app. Implemented a system to dynamically display notifications for focus/unfocus states and integrated motivational quotes for repeated unfocused instances.
- Refined notification aesthetics to match a neutral theme with a bright pink tone for alerts, ensuring a visually cohesive interface.
- Enhanced the renderer functionality, modifying it to dynamically display the current state (e.g., "Current State: Focused/Unfocused") alongside real-time updates.
- Debugged file read operations to ensure smooth integration with file.txt for displaying state changes accurately.
- Improved the styles.css file to align the app's visual theme with a modern, neutral mode-inspired look while fine-tuning animations for notifications. Integrated video background functionality for a visually appealing application interface.
- Reverted multiple files to resolve issues during testing and switched the frontend framework from JavaScript to React, paving the way for a more modular and scalable codebase. But then reverted back into HTML, CSS, and JavaScript for a better connection with backend.
- Connected the frontend to the backend, establishing seamless communication between the Electron app and the Arduino hardware for real-time data visualization and monitoring. Worked on integrating transitions between focus states.
- Designed better error-handling mechanisms for seamless data flow between hardware and software.
- Tested the Arduino integration, focusing on how it receives and processes signals for seamless communication with the Electron app.
- Updated and cleaned up README.md, adding contributions, software dependencies, and enhanced setup instructions.
- Refined and Advanced the UI enhancements.
- Developed and dine-tuned the connection between the Electron app and Arduino to minimize latency in real-time updates
- Incorporated a dynamic notification system that includes motivational quotes by David Goggins for repeated unfocused states, creating an engaging user experience.
- Integrated video background functionality for a visually appealing application interface.
- Hasan
- Synchronized the buttons in the electron app to execute the python scripts for youtube and tiktok
- Streamlined the UI of the app
- Avery and Daksh
- Cleaned up files and refined certain aspects of the app.
- Recorded and edited final presentation video, ensuring a polished and professional overview of the projectβs key features and functionality.
- Conducted final testing and debugging of both frontend and backend systems to ensure seamless integration and reliable performance during the demonstration.
- Organized and streamlined the project repository, removing unnecessary files and updating documentation for clarity and future scalability.
This project is built using the following tools and frameworks:
- GitHub - Version control and project management.
- Node.js - Runs JavaScript in real-time on web app
- Chart.js - For real-time charting and data visualization.
- Electron.js - For cross-platform desktop app development.
- Arduino IDE - For coding and uploading firmware to the Arduino.
- Chromedriver - For chromium for youtube/tiktok functionalities
The project uses the following Python libraries. Install them using pip install
or include them in your requirements.txt
file:
selenium>=4.0.0
- For automated testing and interaction simulation.- `serial
- Bioamp EXG pill for biosignal capture
- Arduino board
Neuro-focus-Monitor/
βββ __pycache__
β βββ __pycache__/stress_monitor.cpython-312.pyc
βββ .vscode
β βββ settings.json
βββ ARDUINO
β βββ ARDUINO.ino
βββ my-electron-app/ # Main Electron app directory
β βββ public/ # Static files for React (used in Electron frontend)
β β βββ favicon.ico
β β βββ index.html # Entry point for the Electron-rendered React app
β β βββ logo192.png
β β βββ logo512.png
β β βββ manifest.json # Metadata for web app (optional for PWA)
β β βββ robots.txt
β βββ src/ # Source files for React app
β β βββ App.css
β β βββ App.js # React app main component
β β βββ App.test.js
β β βββ index.css
β β βββ index.js # React app entry point
β β βββ logo.svg
β β βββ reportWebVitals.js # Optional for performance tracking
β β βββ setupTests.js # Optional for React tests
β βββ main.js # Electron main process script
β βββ package.json # Dependencies and scripts for Electron app
β βββ README.md # Electron app-specific documentation
β βββ node_modules/ # Dependencies (git ignored)
βββ renderer/ # Electron renderer process
β βββ alert.mp3 # Sound file for alerts
β βββ file.txt # File tracking focus state
β βββ index.html # Electron-rendered HTML
β βββ preload.js # Preload script for IPC communication
β βββ renederer.js # Main script for Electron renderer logic
β βββ styles.css
βββ src/ # General assets used across the project
β βββ eeg-image.png # EEG visualization
β βββ focusBoost.mp4 # Background video for the app
β βββ tk-image.png # Icon for TikTok functionality
β βββ yt-image.png # Icon for YouTube functionality
βββ venv/ # Python virtual environment (should be git ignored)
βββ .gitignore # Ignore unnecessary files (e.g., __pycache__, node_modules)
βββ README.md # General project documentation
βββ chromedriver # ChromeDriver executable (permission adjusted)
βββ chromedriver.exe # Windows ChromeDriver executable
βββ main.js # Main Electron process for legacy setup (if needed)
βββ package.json # Legacy Electron dependencies and scripts (if needed)
βββ requirements.txt # Python dependencies
βββ stress_monitor.py # Python script for monitoring stress
βββ tiktok-nav.py # TikTok navigation automation script
βββ youtube-nav.py # YouTube navigation automation script
pip install -r requirements.txt
python stress_monitor.py
npm start
Make sure youβve downloaded ChromeDriver:
- Go to ChromeDriver Downloads.
- Download the version that matches your Chrome browser version (check chrome://settings/help in Chrome for the version).
- Extract the ChromeDriver executable.
- Avery Bettesworth - Computer Engineering Student
- Daksh Sethi - Software Engineering Student
- Hasan Khan - Computer Scientist and Psychology Student
- Hassan Farooq Mohammed - Computer Scientist
- Tatjana Golovin - Neuroscientist
- Varinder Singh - Psychology Graduate
- Use your own branch and pull request to main
- BioAmp EXG Pill Documentation (https://github.com/upsidedownlabs/BioAmp-EXG-Pill)
- Serial communication between Python and Arduino (https://projecthub.arduino.cc/ansh2919/serial-communication-between-python-and-arduino-663756)