Skip to content

Instantly share code, notes, and snippets.

@jaimedantas
Last active January 8, 2020 02:58
Show Gist options
  • Save jaimedantas/34114db2956de5b277da49845e808a2c to your computer and use it in GitHub Desktop.
Save jaimedantas/34114db2956de5b277da49845e808a2c to your computer and use it in GitHub Desktop.
Turn on function
void inicio(){
while(true){
Goertzel goertzel = Goertzel(4000, N, SAMPLING_FREQUENCY);
goertzel.sample(A0);
float ligar = goertzel.detect();
if(ligar>900){
digitalWrite(led2, LOW);
for (int i = 0; i < 8; i++)
{
lc.setRow(0,i,invader1a[i]);
}
delay(3000);
ligarAudio();
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment