feat: started game design

This commit is contained in:
2021-12-10 17:15:22 +01:00
parent 94017d771c
commit 7e73a3fbd4
18 changed files with 351 additions and 146 deletions

View File

@@ -2,13 +2,31 @@
#include "Arduino.h"
#include "board.h"
#include "SerialDebug.h"
#include "sensor.h"
#include "audio.h"
#include "rfid.h"
#define HALLINTERVAL 100
#define HALLIDLETHRESHOLD 4
#define HALLIDLESAMPLES 4
#define HALLPLAYSAMPLES 8
#define TIMEOUT_IDLE 7000
typedef enum{
stateInit,
stateIdle,
stateScanning,
stateStartPlaying,
statePlaying,
stateStopPlaying,
stateStopped,
stateLAST
}GamneStates;
void initGame(void);
void handleGame(void);
bool hallIsIdle(void);
void handleHallSensor(void);