lorawan/sodaq_one/buzzer.ino

21 lines
266 B
Arduino
Raw Normal View History

2016-10-22 20:38:24 +00:00
#include <Arduino.h>
void setupBuzzer()
{
pinMode(BUZZER_PIN, OUTPUT);
}
void buzzerOn() {
digitalWrite(BUZZER_PIN, HIGH);
}
void buzzerOff() {
digitalWrite(BUZZER_PIN, LOW);
}
void buzz(int ms) {
buzzerOn();
delay(ms);
buzzerOff();
}