EyeLockIn: Anti-Doomscrolling device network
Inspiration
I have a major problem, I can't lock in. Like its so bad I've had to lock my phone in a box to try and get away from reels and it still didn't work. I imagine many people can relate, where its just so much easier to look at your phone than do some work. So I thought, why not make a tool to help me with that? Better than some Pomodoro timer or some other technique that doesn't hold you accountable. What could help with that? An AI that tracks your level of focus and shames you if you're not locked in of course.
What it does
This lead me to make EyeLockIn, a local network of devices that track your level of focus to help you maximize productivity. It uses your computer webcam to make sure you're looking at your screen and your phone's accelerometer to make sure you're not picking up your phone. Think of like a lockdown browser, except instead of preventing cheating and giving you an integrity violation, it bullys you into getting through the tasks you don't want to do. The Arduino has a button to help you silence alarms and start/stop sessions, as well as a screen to display fun animations relating to the current state. After every session, your data is uploaded to the cloud where you can view you session data like how long you were distracted for and an AI remark about your focus, as well as compare it to your previous sessions.
How we built it
We architected a distributed Edge-to-Cloud system:
- Server Engine: A Python Flask server acts as the brains, managing asynchronous threading, sensor lane monitoring, and CORS endpoints.
- Edge AI Perception: We utilized the MediaPipe Tasks API (Vision) for lightweight, real-time facial landmark detection directly on the PC, ensuring no video is sent to the cloud (Privacy First).
- Mobile Integration: We used Termux and its sensor APIs on an Android phone to create a wireless "Heartbeat Node" that polls the gravity sensor and triggers haptic feedback (
termux-vibrate) wirelessly. - Hardware Bridge: An Arduino handles physical interactions—displaying 2-frame 500ms LED animations based on the distraction type and acting as a physical "Snooze" button via Serial communication.
- Interactive AI: We implemented a local Ollama instance running the Phi-3 model. We engineered a "Decision Engine" in Python that calculates your focus percentage and dynamically prompts the LLM to either deliver a savage Roast or an encouraging Toast, ensuring high-quality, varied responses.
- Cloud Analytics: We used Supabase via REST API to persist session data, distraction counts, and AI roasts. The Web Dashboard fetches this data to populate a dynamic UI with CSS shimmer animations.
Challenges we ran into
Integrating multiple hardware devices wirelessly was a massive challenge.
- Cross-Modal Crosstalk: Our phone and webcam sensors were initially overwriting each other's grace periods. We had to architect a "Sensor Lane" strategy in our Python server to track triggers independently without blocking the main event loop.
- The Linux/Arduino Bridge: Communicating wirelessly between the PC and the Perception Hub (Arduino) was our first time navigating the bridge between a high-level Linux environment on the board and the real-time microcontroller logic. Synchronizing serial polling with the broader network architecture required careful buffer management and low-latency protocol design.
- Atomic Alarm Synchronization: We wanted the "Roast" to be part of the physical experience. Ensuring that the phone vibration, Arduino alarm, and AI evaluation from local Ollama all triggered at the exact same moment was a complex orchestration task. We had to implement a "State Blocking" logic that waits for the Edge AI to finish its calculation before unleashing the full multi-modal distraction alert.
Accomplishments that we're proud of
- Zero-Latency Feel: The UI feels incredibly snappy despite the heavy lifting happening in the background. The async AI generation with the shimmer-loading effect looks incredibly polished.
- The "FocusG" Persona: We managed to dial in the prompt engineering so that the AI's roasts are genuinely funny. Having the AI physically interact with your environment (by triggering PC sounds, Phone vibrations, and Arduino LEDs) makes it feel "alive."
- Robust State Machine: The core Python loop successfully juggles HTTP requests from the phone, Serial data from the Arduino, localized OpenCV frame processing, and async cloud patching without ever locking up.
What we learned
- Hardware and software sync is incredibly difficult. Adding physical feedback (LEDs, Vibrations) requires very deliberate asynchronous programming to avoid deadlocks.
- Designing an AI "Persona" requires you to restrict its freedom. We learned that giving an LLM an open-ended "Roast or Toast" prompt confused the edge models. By moving the binary decision logic to Python and explicitly telling the AI which persona to take, response quality skyrocketed.
What's next for Singleton
- Package everything into an Arduino so it could be put in a box and become a desktop item.
Log in or sign up for Devpost to join the conversation.