Skip to content

Instantly share code, notes, and snippets.

@detik19
Created October 22, 2016 04:59
Show Gist options
  • Save detik19/4c351bd4fd08a0d942dcb5a8eea8bee5 to your computer and use it in GitHub Desktop.
Save detik19/4c351bd4fd08a0d942dcb5a8eea8bee5 to your computer and use it in GitHub Desktop.
Buzzer Multifunction
#include <TimerOne.h>
#include <Wire.h>
#include <MultiFuncShield.h>
void setup() {
// put your setup code here, to run once:
Timer1.initialize();
MFS.initialize(&Timer1); // initialize multi-function shield library
// NOTE beep control is performed in the background, i.e. beep() is non blocking.
// short beep for 200 milliseconds
MFS.beep();
delay(1000);
// 4 short beeps, repeated 3 times.
MFS.beep(5, // beep for 50 milliseconds
5, // silent for 50 milliseconds
4, // repeat above cycle 4 times
3, // loop 3 times
50 // wait 500 milliseconds between loop
);
}
void loop() {
// put your main code here, to run repeatedly:
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment