35 lines
530 B
C
35 lines
530 B
C
#pragma once
|
|
|
|
#include "Arduino.h"
|
|
#include "board.h"
|
|
#include "sensor.h"
|
|
#include "audio.h"
|
|
#include "rfid.h"
|
|
#include "config.h"
|
|
#include "power.h"
|
|
|
|
#define TIMEOUT_IDLE 20000
|
|
#define TIMEOUT_ARMED 20000
|
|
|
|
typedef enum{
|
|
stateInit,
|
|
stateIdle,
|
|
stateScanning,
|
|
stateArmed,
|
|
stateStartPlaying,
|
|
statePlaying,
|
|
stateStopPlaying,
|
|
stateStopped,
|
|
stateLAST
|
|
}GameStates;
|
|
|
|
void initGame(void);
|
|
void handleGame(void);
|
|
bool hallIsIdle(void);
|
|
|
|
void handleHallSensor(void);
|
|
|
|
String StateToString(GameStates state);
|
|
|
|
|