54 lines
816 B
C++
54 lines
816 B
C++
#ifndef PROGRAM_H
|
|
#define PROGRAM_H
|
|
|
|
#include <Arduino.h>
|
|
#include <ESP8266WiFi.h>
|
|
#include <NTPClient.h>
|
|
#include <WiFiUdp.h>
|
|
|
|
#include "DiscordAPI.h"
|
|
#include "SwitchableEncodeur.h"
|
|
#include "LedLib.h"
|
|
|
|
|
|
|
|
class Program {
|
|
public:
|
|
/**
|
|
* Program startup
|
|
*/
|
|
Program();
|
|
|
|
/**
|
|
* Program main loop
|
|
*/
|
|
void loop();
|
|
private:
|
|
/**
|
|
* Encoder object
|
|
*/
|
|
SwitchableEncodeur* encoder;
|
|
|
|
/**
|
|
* Old encoder position
|
|
*/
|
|
long oldPosition;
|
|
|
|
DiscordAPI* discord;
|
|
|
|
LedLib* ledLib;
|
|
WiFiUDP* ntpUDP;
|
|
NTPClient* timeClient;
|
|
|
|
ulong lastMillis;
|
|
|
|
/**
|
|
* @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);
|
|
};
|
|
|
|
#endif
|