33 lines
1.2 KiB
C++
33 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
//#define _HW_V_20
|
|
|
|
// HX711 load cell
|
|
#ifdef PLATFORM_ESP32
|
|
|
|
#ifdef _HW_V_20
|
|
const int CONFIG_SCALE_DOUT_PIN = 23;
|
|
const int CONFIG_SCALE_SCK_PIN = 22;
|
|
#else
|
|
const int CONFIG_SCALE_DOUT_PIN = 22;
|
|
const int CONFIG_SCALE_SCK_PIN = 23;
|
|
#endif
|
|
|
|
#else
|
|
const int CONFIG_SCALE_DOUT_PIN = D2;
|
|
const int CONFIG_SCALE_SCK_PIN = D3;
|
|
#endif
|
|
const uint8_t CONFIG_MEASUREMENT_AVG_COUNT = 1; // number of measurements in normal phase
|
|
const uint8_t CONFIG_TARE_AVG_COUNT = 6; // number of measurements in tare-phase (to find 0 )
|
|
const int CONFIG_MEASURE_DELAY = 100; // interval in ms between measurements
|
|
//const int CONFIG_VALUE_DIVIDER = 8; // uint32 measurements are divided by this factor, before stored in uint16_t
|
|
const int CONFIG_VALUE_DIVIDER = 128; // uint32 measurements are divided by this factor, before stored in uint16_t
|
|
|
|
const uint32_t CONFIG_SESSION_CHUNK_SIZE = 1024; //1024*8 - 16 * sizeof(uint32_t);
|
|
|
|
const uint32_t CONFIG_SESSION_MAX_LENGTH_HOURS = 1;
|
|
const uint32_t CONFIG_SESSION_MAX_SIZE = CONFIG_SESSION_MAX_LENGTH_HOURS * 3600 * (1000 / CONFIG_MEASURE_DELAY) * sizeof(uint16_t);
|
|
|
|
const char *CONFIG_DATA_PATH = "/dat"; |