This commit is contained in:
Stephan Mühl
2023-03-22 12:15:18 +01:00
committed by GitHub
parent 3e12414a87
commit adb5102869
203 changed files with 35010 additions and 0 deletions

36
src/PeripheryManager.h Normal file
View File

@@ -0,0 +1,36 @@
#ifndef PeripheryManager_h
#define PeripheryManager_h
#include <Arduino.h>
#include <EasyButton.h>
#include "Adafruit_SHT31.h"
class PeripheryManager_
{
private:
PeripheryManager_() = default;
void checkAlarms();
const int BatReadings = 10;
uint16_t TotalBatReadings[10];
int readIndex = 0;
uint16_t total = 0;
uint16_t average = 0;
const int LDRReadings = 30;
uint16_t TotalLDRReadings[30];
int sampleIndex = 0;
unsigned long previousMillis = 0;
const unsigned long interval = 1000;
public:
static PeripheryManager_ &getInstance();
void setup();
void tick();
void playBootSound();
void playFromFile(String file);
bool isPlaying();
void stopSound();
};
extern PeripheryManager_ &PeripheryManager;
#endif