/// © MiroZ 2024 #ifndef __BME68X_h__ #define __BME68X_h__ #include #include struct GAS_MEASUREMENT { float resistance; }; struct BME_DATA { float humidity; uint16_t measurement_bitmask; uint8_t current_profile; // Track which profile is active struct GAS_MEASUREMENT measurement[10]; }; class Bme68x { protected: MyLibs::Bme68x * m_sensor = nullptr; TwoWire & m_bus; bool m_operational = false; // Profile management uint8_t m_current_profile = 0; // Profile definitions struct HeaterProfile { uint16_t temp_prof[10]; uint16_t mul_prof[10]; }; static const HeaterProfile profiles[8]; void switchToProfile(uint8_t profile_index); void switchToNextProfile(); public: Bme68x(TwoWire & bus); bool init(); bool read(struct BME_DATA * data); }; #endif