Skip to content

Instantly share code, notes, and snippets.

@blister
Last active January 20, 2019 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blister/fa467eecf785acfff1d11f745b05e7db to your computer and use it in GitHub Desktop.
Save blister/fa467eecf785acfff1d11f745b05e7db to your computer and use it in GitHub Desktop.
void playNote(int note, int duration, float rest) {
digitalWrite(led, HIGH);
tone(buzzer, note, duration);
delay((duration * rest)/2);
digitalWrite(led, LOW);
delay((duration * rest)/2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment