diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-06-26 17:40:36 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-06-26 17:40:36 +0200 |
commit | 2a0270f3ba6eb993fb39ed3564f626d724156654 (patch) | |
tree | d8d310eb35768f84d25453eae4b8cd4721bd8ddf /shared/consts.h | |
parent | 55fe6aaeee49894dc07516f0c4e21f692b2950fe (diff) |
implement battery measurement and target area switching
Diffstat (limited to 'shared/consts.h')
-rw-r--r-- | shared/consts.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/shared/consts.h b/shared/consts.h index 9c2358f..b6be4a4 100644 --- a/shared/consts.h +++ b/shared/consts.h @@ -52,3 +52,14 @@ #define W2_BATTERY_PIN 6 /** side-facing distance sensor pinout */ #define W2_SIDE_SENSOR_PIN 7 + +/** battery voltage measurement sample count */ +#define W2_BATTERY_SAMPLES 10 +/** battery full voltage (millivolts) */ +#define W2_BATTERY_FULL 4500 +/** battery empty voltage (millivolts) */ +#define W2_BATTERY_EMPTY 3300 +/** battery measurement interval (milliseconds) */ +#define W2_BATTERY_MEAS_FREQ 10e3 +/** battery low level percentage (target charging station) */ +#define W2_BATTERY_PERCENTAGE_LOW 30 |