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
10private:
11 uint8_t buzzerPin = 0;
12
13 uint32_t last_buzz = 0;
14public:
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
Definition: ArduinoBuzzer.h:9
Definition: BuzzerInterface.h:10