2019-08-02 21:48:36 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-08-06 18:50:11 +00:00
|
|
|
#include <Arduino.h>
|
|
|
|
#include "config.h"
|
2019-08-02 21:48:36 +00:00
|
|
|
#include "player.h"
|
2019-08-06 18:50:11 +00:00
|
|
|
#include <MFRC522.h>
|
2019-08-02 21:48:36 +00:00
|
|
|
|
|
|
|
class Controller {
|
|
|
|
private:
|
2019-08-06 18:50:11 +00:00
|
|
|
MFRC522* _rfid;
|
|
|
|
bool _rfid_enabled = true;
|
|
|
|
void _check_rfid();
|
|
|
|
void _check_serial();
|
2019-08-02 21:48:36 +00:00
|
|
|
Player* _player;
|
2019-08-08 03:31:27 +00:00
|
|
|
unsigned long _last_rfid_scan_at = 0;
|
2019-08-02 21:48:36 +00:00
|
|
|
public:
|
2019-08-06 18:50:11 +00:00
|
|
|
Controller(Player* p);
|
|
|
|
void loop();
|
2019-08-02 21:48:36 +00:00
|
|
|
};
|