Catalex code, integration with analog reading should trigger a sound to play..

I found this code and it was posted as a solution for a similar situation. Though, I don't know if this helps or how to even integrate this. :confused:

boolean alreadyRun = false;

void setup()
{
  Serial.begin(115200);
}

void loop()
{
  if (alreadyRun == false)
  {
    aFunction();
  }
  Serial.println("Still running loop()");
  delay(1000);
}

void aFunction()
{
  Serial.println("In a function");
  alreadyRun = true;
}