Skip to content

Instantly share code, notes, and snippets.

@SunjunKim
Created July 12, 2022 06:28
Show Gist options
  • Save SunjunKim/c853e54e5237b1074780704704df4bc6 to your computer and use it in GitHub Desktop.
Save SunjunKim/c853e54e5237b1074780704704df4bc6 to your computer and use it in GitHub Desktop.
Processing sketch for keystroke reaction time measurement
void setup()
{
frameRate(1000);
size(1024,768);
textSize(50);
}
void draw()
{
int now=millis();
if(keyPressed)
{
background(255);
fill(0);
text(""+now, 500, 300);
}
else
{
background(0);
fill(255);
text(""+now, 500, 300);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment