35 lines
642 B
C
35 lines
642 B
C
#pragma once
|
|
|
|
#include "Arduino.h"
|
|
#include "ADS1X15.h"
|
|
#include "Battery.h"
|
|
#include "board.h"
|
|
#include "led.h"
|
|
#include "AS5600.h"
|
|
#include "Wire.h"
|
|
#include "audio.h"
|
|
|
|
#define ADSINTERVAL 100
|
|
#define VBATTINTERVALL 15000
|
|
#define VBATTMEASPRECHARGE 500
|
|
#define LOWBATTPERIOD 30000
|
|
|
|
#define HALLINTERVAL 100
|
|
#define HALLTHRESHOLD 5
|
|
|
|
void initSensor(void);
|
|
void handleBatterySensor(void);
|
|
void handleHallSensor(void);
|
|
|
|
uint16_t getHall( void );
|
|
bool hallIsIdle(void);
|
|
uint16_t getvbatt(uint8_t dummy);
|
|
bool getSensorInitStatus(void);
|
|
|
|
bool CheckBattery(void);
|
|
bool getLowBatt(void);
|
|
void readsensor(void);
|
|
|
|
|
|
|