← All work
BCI / Human-computer interactionCourseworkClass team project

Blink. Flap. Repeat.

A class team project that turned an OpenBCI Cyton headset into a one-button controller for a pygame Flappy Bird. My part: EEG signal processing and game-control integration. The game above is a browser rebuild you can actually play.

Tap · Space · Blink to start

Ready. Flap to start.

Score
0
Best
0
State
ready
Input mode

Original hardware, not connected here: EEG prototype · OpenBCI Cyton + Python.

Action timeline

Inputs appear here as you play: source and what the game did.

  • Keyboard: focus the game, then Space / Up to flap, P to pause.
  • Touch: tap anywhere on the game.
  • Camera: choose the camera mode, enable it, keep eyes open to calibrate, then blink deliberately.

250 Hz

Sampling rate

Eight recorded EEG channels (run_blink.py)

0.8 s

Runtime window

200 samples, frontal channels 0 and 1

350 ms

Cooldown

After each detected blink

3

Archived runs

sub-37 / ses-01, 20 prompted trials per run

Implementation parameters from the repository, not performance results.

01 / Research question

Can one deliberate blink become a dependable button?

Can a deliberate eye blink, picked up by frontal EEG electrodes, be classified reliably enough in real time to act as a single game control?

02 / Experimental pipeline

From prompted blinks to a flap.

03 / Methods & evaluation

How the classifier would be judged.

Evaluation design (alternative pipeline)

scripts/train_blink_csp_lda.py defines a separate 1 s, 1–10 Hz CSP + LDA pipeline evaluated with leave-one-run-out cross-validation, reporting accuracy, balanced accuracy and a confusion matrix. It is not the default runtime path.

Labelling

Blink and rest windows are labelled from the recorded cue events. In the alternative training script the cue-to-sample mapping is approximate, which any reported score would need to account for.

What is not reported

The repository publishes no performance charts or metrics reports, so no accuracy, latency or user numbers are shown here.

Curated research navigator

AI Research Guide

Evidence-grounded answers drawn from the repository code. Curated, not generated — the live AI on this page is the camera blink demo.

04 / Limits

What this does not show.

  • Blinks at frontal electrodes are mostly ocular (eye-muscle) signals, not cognitive activity. Detecting a deliberate action is not mind-reading and says nothing about cognitive load.
  • Archived data covers three runs from one subject and session, so it cannot speak to how well this works for other people.
  • Cue-to-sample alignment in the alternative training script is approximate.
  • No published performance results yet — repository data audit in progress.

05 / Team & code

Credit where it's due.

  • Class team project; EEG signal processing and game-control integration by Diego Cordova. Classmates contributed to the wider project; individual roles are being confirmed.
  • Game code and sprites adapted from an MIT-licensed Flappy Bird implementation, Copyright (c) 2024 Simon Fei. Sprites here come from the repository's assets/sprites folder.
  • This browser game and camera demo are a portfolio rebuild; they do not run the Python model or read EEG.

Source: dcordovarodriguez/BCI_Project_FlappyBird @ 52dc31d8d922a17fed75f186b666dbdb8f472c8c · MIT License

More work

next