active-LOW with internal pull-up) static const gpio_num_t LIGHT_BARRIER_PIN = GPIO_NUM_4; // BME280/BMP280 I2C (default SDA=21, SCL=22 on most ESP32 boards) // Address is auto-detected (0x76 or 0x77) // Expected pendulum half-period in ms (1 s pendulum → ~500 ms per crossing) static const uint32_t NOMINAL_HALF_PERIOD_MS = 500; // Debounce time for light barrier in µs static const uint32_t DEBOUNCE_US = 50000; // 50 ms // Aggregation interval in seconds static const uint32_t AGGREGATION_INTERVAL_S = 60; // Data-log file on LittleFS static const char *DATA_FILE = "/pendulum_log.csv";
in
„Datenlogger Pendeluhr“
·
Mikrocontroller und Digitale Elektronik
·