54 lines
816 B
C
Raw Permalink Normal View History

2023-08-04 19:34:51 +02:00
#ifndef PROGRAM_H
#define PROGRAM_H
2023-08-05 11:55:21 +02:00
#include <Arduino.h>
2023-08-11 20:57:50 +02:00
#include <ESP8266WiFi.h>
2023-10-21 19:14:00 +02:00
#include <NTPClient.h>
#include <WiFiUdp.h>
2023-08-05 11:55:21 +02:00
#include "DiscordAPI.h"
#include "SwitchableEncodeur.h"
2023-10-20 20:51:54 +02:00
#include "LedLib.h"
2023-08-05 11:55:21 +02:00
2023-08-04 19:34:51 +02:00
class Program {
public:
/**
* Program startup
*/
Program();
/**
* Program main loop
*/
void loop();
2023-08-05 11:55:21 +02:00
private:
/**
* Encoder object
*/
SwitchableEncodeur* encoder;
/**
* Old encoder position
*/
long oldPosition;
2023-08-05 11:55:21 +02:00
DiscordAPI* discord;
2023-10-20 20:51:54 +02:00
LedLib* ledLib;
2023-10-21 19:14:00 +02:00
WiFiUDP* ntpUDP;
NTPClient* timeClient;
2023-10-21 22:47:13 +02:00
ulong lastMillis;
2023-10-21 19:14:00 +02:00
/**
* @brief Send time to discord
* the start time is automaticly set to the current time
* @param[in] timeEnd LabOuest closing time
*/
void sendTime(String timeEnd);
2023-08-04 19:34:51 +02:00
};
#endif