MRAS
Multi Rocket Avionics System
Loading...
Searching...
No Matches
ArduinoBuzzer.h
1
// Written by Nikilesh Ramesh -- 09/03/2023
2
3
#ifndef BUZZERINTERFACESYSTEM_H
4
#define BUZZERINTERFACESYSTEM_H
5
6
#include "Subsystem.h"
7
#include "BuzzerInterface.h"
8
9
class
ArduinoBuzzer
:
public
BuzzerInterface
{
10
private
:
11
uint8_t buzzerPin = 0;
12
13
uint32_t last_buzz = 0;
14
public
:
15
ArduinoBuzzer
(uint8_t
id
, uint8_t pin) :
BuzzerInterface
(
id
) {
16
buzzerPin = pin;
17
};
18
19
int8_t setup()
override
;
20
21
int8_t loop()
override
;
22
23
void
_buzzer(uint16_t frequency, uint32_t duration,
bool
block)
override
;
24
25
SUBSYSTEM_NO_MESSAGE_HANDLER;
26
27
SUBSYSTEM_NAME(
"Buzzer"
);
28
};
29
30
31
#endif
ArduinoBuzzer
Definition:
ArduinoBuzzer.h:9
BuzzerInterface
Definition:
BuzzerInterface.h:10
lib
shared_arduino
ArduinoBuzzer.h
Generated by
1.9.6