22 lines
387 B
C++
22 lines
387 B
C++
#pragma once
|
|
|
|
#include <Arduino.h>
|
|
#include "config.h"
|
|
#include "player.h"
|
|
#include <MFRC522.h>
|
|
|
|
class Controller {
|
|
private:
|
|
MFRC522* _rfid;
|
|
bool _rfid_enabled = true;
|
|
void _check_rfid();
|
|
void _check_serial();
|
|
uint32_t _get_rfid_card_uid();
|
|
uint32_t _last_rfid_card_uid = 0;
|
|
Player* _player;
|
|
unsigned long _last_rfid_scan_at = 0;
|
|
public:
|
|
Controller(Player* p);
|
|
void loop();
|
|
};
|