Skip to content

Commit 15b8180

Browse files
add KY-006 buzzer
1 parent 33d7db7 commit 15b8180

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

KY006_Buzzer/KY006_Buzzer.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* Copyright (c) 2021, Collab
2+
* All rights reserved
3+
*/
4+
/*
5+
KY006_Buzzer.cpp - Control KY-006 passive piezo buzzer.
6+
*/
7+
8+
#include "KY006_Buzzer.h"
9+
10+
KY006_Buzzer::KY006_Buzzer(int buzzer_pin) {
11+
_buzzerPin = buzzer_pin;
12+
}
13+
14+
void KY006_Buzzer::begin() {
15+
}
16+
17+
void KY006_Buzzer::enable() {
18+
}
19+
20+
void KY006_Buzzer::disable() {
21+
}

KY006_Buzzer/KY006_Buzzer.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/* Copyright (c) 2021, Collab
2+
* All rights reserved
3+
*/
4+
/*
5+
KY006_Buzzer.h - Control KY-006 passive piezo buzzer.
6+
*/
7+
#ifndef KY006_Buzzer_h
8+
#define KY006_Buzzer_h
9+
10+
#include <Arduino.h>
11+
12+
class KY006_Buzzer
13+
{
14+
public:
15+
KY006_Buzzer(
16+
int buzzer_pin
17+
);
18+
void begin();
19+
void enable();
20+
void disable();
21+
22+
private:
23+
int _buzzerPin;
24+
};
25+
26+
#endif

0 commit comments

Comments
 (0)