DeeEmm / DIY-Flow-Bench

Volumetric flow bench based on ESP32 and MAF sensor.
GNU General Public License v3.0
27 stars 10 forks source link

BME68X Pressure sensor integration #233

Open DeeEmm opened 1 week ago

DeeEmm commented 1 week ago

BME68X incorporated in to the code please.

Originally posted by @KirikauKiwi in https://github.com/DeeEmm/DIY-Flow-Bench/discussions/189#discussioncomment-11230280

DeeEmm commented 4 days ago

Started to take a quick peek at this.

First hurdle is always trying to find a good library.

Adafruit is most common, but I will not use their libraries in a project like this as it requires an additional framework. (bloatware)

DFRobot Library is also very bloaty

I previously tried using the Bosch Sensortechnic library for the BME280 but it had a lot of issues, so I am apprehensive about using it again

The author of the TinyBME library that is used currently, does not have an equivalent BME680 library, which is a shame as it is nice and cut down.

The Zanduino library looks fairly lightweight https://github.com/Zanduino/BME680/tree/master but is written for Arduino so may need porting

Similar story for Seeed, although this still needs trimming down as well https://github.com/Seeed-Studio/Seeed_Arduino_BME68x/tree/master

I've forked the Zanduino library and will see if I can get it working as it is the most lightweight.

https://github.com/DeeEmm/BME680

DeeEmm commented 3 days ago

Ok so I've got the library up and running but it's not converting values yet. Just need to figure out why.

I've also got a bit sidetracked from the Pitot stuff that I was originally looking at, so the BME680 stuff is on the pitot branch.

https://github.com/DeeEmm/DIY-Flow-Bench/tree/213-feature-requestgui-pitot-display-changes

Yeah, yeah, messy I know. Guess I should pay more attention lol.

New library call is in platformIO, so it should pull library from the Repo - https://github.com/DeeEmm/BME680 on first compile

I suspect that this might just be a typecast or conversion issue as the library uses integers, whereas we use doubles in code.

If anyone with a BME680 wants to take a look and see if they can get some data from it please feel free to dig in.

KirikauKiwi commented 2 days ago

I have my branch of the Pitot/BME68X setup, after uploading my pins.json and index.html, then rebooting. The serial monitor is hanging near the end of the "INPUT"

DIY Flow Bench
DIYFB Version: V2.0.RC.8 
Build: 24111801 
For help please visit the WIKI:
https://github.com/DeeEmm/DIY-Flow-Bench/wiki
Initialising File System 
Loading Configuration 
Loading Lift Data 
Loading Calibration Data 
PINS file Found: /PINS_ESP32_S3_DEV_KITC.json
Loading Pins Data 
Parsing Pins Data 
Defaulting to AP Mode 
Creating WiFi Access Point:  DIYFB  
Access Point IP address: 192.168.4.1 
Multicast: http://diyfb.local 
Initialising I/O 
Input MAF_PIN: 0
Input REF_PRESSURE_PIN: 0
Input DIFF_PRESSURE_PIN: 0
Input PITOT_PIN: 0
Input SERIAL0_RX_PIN: 44
Input SDA_PIN: 8
Input SCL_PIN: 9
Input SD_MISO_PIN: 0
Input SD_SCK_

The SD card is not defined, and my pins.json for my ESP32 S3 DEVKITC board has the pins for the SD card as -1.

When performing a rest on the board the serial monitor hangs at the same place each time, other than the length of the last lines output differs by one or two characters. e.g. Input SDSCK, Input SD_SCK_PIN:, Input SD_SCK_PIN: 0

I have also tried with the pins defined as my boards default SPI pins, with the same results in the serial monitor.


"SD_CS_PIN" : 10,
"SD_MOSI_PIN" : 11,
"SD_MISO_PIN" : 13,             
"SD_SCK_PIN" : 12,
DeeEmm commented 2 days ago

I eventually pulled the BME280 class files directly into the project so work on them locally, as updating the remote repo quickly became a PITA.

I managed to get the code to compile and loaded, but I do not get any output. I note that even if I manually send hardcoded values direct from classes 'getSensorData' method, I do not see those values in DIYFB. Kinda weird. I suspect that is it some kind of scope issue but haven't been able to find out what's happening.

I then tried to get the example working directly on the ESP32 without the DIYFB code, which should be pretty straightforwards, but was having a lot of dependency issues.

At which point I parked it as it was taking the branch I was working on too far off topic. So I've merged this changes back into Dev so that I can now create a dedicated branch for this issue.

The branch contains all of the changes that I made to integrate the 680 into the code, you will just need to adjust the configuration.h file to enable the BME680 and set temp / baro / relh to BME680.

Rather than uncommenting the library call, I have found that it is easier to copy the DeeEmm_BME680.cpp/h files into the main project directory and work on them locally.

DeeEmm commented 2 days ago

BTW. I updated the changes that I've made to the library which are mostly just code tidying so that it is readable (I mean seriously who minifies source code lol)

I was in the process of commenting out the SPI stuff to simplify the code, but did not finish, so this might (probably has) broken the code.

Just uncomment the commented out SPI stuff which is easy enough to spot.

Code is very similar to BME280. Each measurement requires getting values from a bunch of registers - these are defined at top of main file. Those register values are then 'decoded' to generate final values. Not particularly tricky but lots of number crunching so difficult to follow.

We can assume that the number crunching part is okay, it's just how the generated values are accessed from code external to the library.

It should be...

It seems to be failing on the last part, but could also be any other part. Kinda hard to determine as there are no error messages.

Best bet might be to try and get the example working and then go from there, but I was having trouble setting up my environment to get the example to compile. I had a bunch of issues with project paths. (a local environment issue not necessarily a project issue).

All of those changes are pushed to the library, so feel free to hack on those to get it working, or if it works for you let me know how 😆

KirikauKiwi commented 2 days ago

With this DEV branch,

"MAJOR_VERSION" : "V2",
"MINOR_VERSION" : "0",
"BUILD_NUMBER" : "24111901",
"GUI_BUILD_NUMBER" : "24111702",
"RELEASE" : "V2.0.RC.8",
"DEV_BRANCH" : "https://github.com/DeeEmm/DIY-Flow-Bench/tree/DEV"
I am getting a lot of compile errors currently, with the new BME680 library. ``` libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:82:1: error: extra qualification 'BME680_Class::' on member 'BME680_Class' [-fpermissive] BME680_Class::BME680_Class() { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:82:1: error: 'BME680_Class::BME680_Class()' cannot be overloaded with 'BME680_Class::BME680_Class()' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:101:3: note: previous declaration 'BME680_Class::BME680_Class()' BME680_Class(); // Class constructor (unused) ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:88:1: error: extra qualification 'BME680_Class::' on member 'BME680_Class' [-fpermissive] BME680_Class::~BME680_Class() { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:88:1: error: 'BME680_Class::~BME680_Class()' cannot be overloaded with 'BME680_Class::~BME680_Class()' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:102:3: note: previous declaration 'BME680_Class::~BME680_Class()' ~BME680_Class(); // Class destructor (unused) ^ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:97:6: error: extra qualification 'BME680_Class::' on member 'begin' [-fpermissive] bool BME680_Class::begin() { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:97:6: error: 'bool BME680_Class::begin()' cannot be overloaded with 'bool BME680_Class::begin()' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:103:11: note: previous declaration 'bool BME680_Class::begin()' bool begin(); // Start using I2C Communications ^~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:106:6: error: extra qualification 'BME680_Class::' on member 'begin' [-fpermissive] bool BME680_Class::begin(const uint32_t i2cSpeed) { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:106:6: error: 'bool BME680_Class::begin(uint32_t)' cannot be overloaded with 'bool BME680_Class::begin(uint32_t)' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:104:11: note: previous declaration 'bool BME680_Class::begin(uint32_t)' bool begin(const uint32_t i2cSpeed); // I2C with a non-default speed ^~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:116:6: error: extra qualification 'BME680_Class::' on member 'begin' [-fpermissive] bool BME680_Class::begin(const uint32_t i2cSpeed, const uint8_t i2cAddress) { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:116:6: error: 'bool BME680_Class::begin(uint32_t, uint8_t)' cannot be overloaded with 'bool BME680_Class::begin(uint32_t, uint8_t)' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:106:11: note: previous declaration 'bool BME680_Class::begin(uint32_t, uint8_t)' bool begin(const uint32_t i2cSpeed, const uint8_t i2cAddress); // Set speed and I2C Addr. ^~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:142:6: error: extra qualification 'BME680_Class::' on member 'begin' [-fpermissive] bool BME680_Class::begin(const uint8_t chipSelect) { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:142:6: error: 'bool BME680_Class::begin(uint8_t)' cannot be overloaded with 'bool BME680_Class::begin(uint8_t)' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:105:11: note: previous declaration 'bool BME680_Class::begin(uint8_t)' bool begin(const uint8_t chipSelect); // Start using either I2C or HW-SPI ^~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:160:6: error: extra qualification 'BME680_Class::' on member 'begin' [-fpermissive] bool BME680_Class::begin(const uint8_t chipSelect, const uint8_t mosi, const uint8_t miso, ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:160:6: error: 'bool BME680_Class::begin(uint8_t, uint8_t, uint8_t, uint8_t)' cannot be overloaded with 'bool BME680_Class::begin(uint8_t, uint8_t, uint8_t, uint8_t)' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:107:11: note: previous declaration 'bool BME680_Class::begin(uint8_t, uint8_t, uint8_t, uint8_t)' bool begin(const uint8_t chipSelect, const uint8_t mosi, const uint8_t miso, const uint8_t sck); ^~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:182:6: error: extra qualification 'BME680_Class::' on member 'commonInitialization' [-fpermissive] bool BME680_Class::commonInitialization() { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:182:6: error: 'bool BME680_Class::commonInitialization()' cannot be overloaded with 'bool BME680_Class::commonInitialization()' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:118:12: note: previous declaration 'bool BME680_Class::commonInitialization()' bool commonInitialization(); ///< Common initialization code ^~~~~~~~~~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:208:9: error: extra qualification 'BME680_Class::' on member 'readByte' [-fpermissive] uint8_t BME680_Class::readByte(const uint8_t addr) const { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:208:9: error: 'uint8_t BME680_Class::readByte(uint8_t) const' cannot be overloaded with 'uint8_t BME680_Class::readByte(uint8_t) const' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:119:12: note: previous declaration 'uint8_t BME680_Class::readByte(uint8_t) const' uint8_t readByte(const uint8_t addr) const; ///< Read byte from register address ^~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:221:6: error: extra qualification 'BME680_Class::' on member 'reset' [-fpermissive] void BME680_Class::reset() { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:221:6: error: 'void BME680_Class::reset()' cannot be overloaded with 'void BME680_Class::reset()' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:113:11: note: previous declaration 'void BME680_Class::reset()' void reset(); // Reset the BME680 ^~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:237:6: error: extra qualification 'BME680_Class::' on member 'getCalibration' [-fpermissive] void BME680_Class::getCalibration() { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:237:6: error: 'void BME680_Class::getCalibration()' cannot be overloaded with 'void BME680_Class::getCalibration()' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:122:12: note: previous declaration 'void BME680_Class::getCalibration()' void getCalibration(); ///< Load calibration from registers ^~~~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:298:9: error: extra qualification 'BME680_Class::' on member 'setOversampling' [-fpermissive] uint8_t BME680_Class::setOversampling(const uint8_t sensor, const uint8_t sampling) const { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:298:9: error: 'uint8_t BME680_Class::setOversampling(uint8_t, uint8_t) const' cannot be overloaded with 'uint8_t BME680_Class::setOversampling(uint8_t, uint8_t) const' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:108:11: note: previous declaration 'uint8_t BME680_Class::setOversampling(uint8_t, uint8_t) const' uint8_t setOversampling(const uint8_t sensor, const uint8_t sampling = UINT8_MAX) const; // and return current value ^~~~~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:360:9: error: extra qualification 'BME680_Class::' on member 'setIIRFilter' [-fpermissive] uint8_t BME680_Class::setIIRFilter(const uint8_t iirFilterSetting) const { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:360:9: error: 'uint8_t BME680_Class::setIIRFilter(uint8_t) const' cannot be overloaded with 'uint8_t BME680_Class::setIIRFilter(uint8_t) const' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:110:11: note: previous declaration 'uint8_t BME680_Class::setIIRFilter(uint8_t) const' uint8_t setIIRFilter(const uint8_t iirFilterSetting = UINT8_MAX) const; // Set IIR Filter ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:379:9: error: extra qualification 'BME680_Class::' on member 'getSensorData' [-fpermissive] uint8_t BME680_Class::getSensorData(int32_t& temp, int32_t& hum, int32_t& press, int32_t& gas, ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:379:9: error: 'uint8_t BME680_Class::getSensorData(int32_t&, int32_t&, int32_t&, int32_t&, bool)' cannot be overloaded with 'uint8_t BME680_Class::getSensorData(int32_t&, int32_t&, int32_t&, int32_t&, bool)' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:111:11: note: previous declaration 'uint8_t BME680_Class::getSensorData(int32_t&, int32_t&, int32_t&, int32_t&, bool)' uint8_t getSensorData(int32_t &temp, int32_t &hum, int32_t &press, int32_t &gas, const bool waitSwitch = true); // ^~~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:396:9: error: extra qualification 'BME680_Class::' on member 'getI2CAddress' [-fpermissive] uint8_t BME680_Class::getI2CAddress() const { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:396:9: error: 'uint8_t BME680_Class::getI2CAddress() const' cannot be overloaded with 'uint8_t BME680_Class::getI2CAddress() const' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:112:11: note: previous declaration 'uint8_t BME680_Class::getI2CAddress() const' uint8_t getI2CAddress() const; // Return the I2C Address of the BME680 ^~~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:403:9: error: extra qualification 'BME680_Class::' on member 'readSensors' [-fpermissive] uint8_t BME680_Class::readSensors(const bool waitSwitch) { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:403:9: error: 'uint8_t BME680_Class::readSensors(bool)' cannot be overloaded with 'uint8_t BME680_Class::readSensors(bool)' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:120:12: note: previous declaration 'uint8_t BME680_Class::readSensors(bool)' uint8_t readSensors(const bool waitSwitch); ///< read the registers in one burst ^~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:506:6: error: extra qualification 'BME680_Class::' on member 'waitForReadings' [-fpermissive] void BME680_Class::waitForReadings() const { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:506:6: error: 'void BME680_Class::waitForReadings() const' cannot be overloaded with 'void BME680_Class::waitForReadings() const' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:121:12: note: previous declaration 'void BME680_Class::waitForReadings() const' void waitForReadings() const; ///< Wait for readings to finish ^~~~~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:512:6: error: extra qualification 'BME680_Class::' on member 'setGas' [-fpermissive] bool BME680_Class::setGas(uint16_t GasTemp, uint16_t GasMillis) const { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:512:6: error: 'bool BME680_Class::setGas(uint16_t, uint16_t) const' cannot be overloaded with 'bool BME680_Class::setGas(uint16_t, uint16_t) const' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:109:11: note: previous declaration 'bool BME680_Class::setGas(uint16_t, uint16_t) const' bool setGas(uint16_t GasTemp, uint16_t GasMillis) const; // Gas heating temperature and time ^~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:560:6: error: extra qualification 'BME680_Class::' on member 'measuring' [-fpermissive] bool BME680_Class::measuring() const { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:560:6: error: 'bool BME680_Class::measuring() const' cannot be overloaded with 'bool BME680_Class::measuring() const' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:114:11: note: previous declaration 'bool BME680_Class::measuring() const' bool measuring() const; ///< true if currently measuring ^~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:571:6: error: extra qualification 'BME680_Class::' on member 'triggerMeasurement' [-fpermissive] void BME680_Class::triggerMeasurement() const { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:571:6: error: 'void BME680_Class::triggerMeasurement() const' cannot be overloaded with 'void BME680_Class::triggerMeasurement() const' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:115:11: note: previous declaration 'void BME680_Class::triggerMeasurement() const' void triggerMeasurement() const; ///< trigger a measurement ^~~~~~~~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:578:1: error: expected '}' at end of input } // of method "triggerMeasurement()" ^ In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:94:20: note: to match this '{' class BME680_Class { ^ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp: In member function 'bool BME680_Class::begin(uint8_t)': libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:157:3: error: 'SPI' was not declared in this scope SPI.begin(); // Start hardware SPI ^~~ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:157:3: note: suggested alternative: 'HSPI' SPI.begin(); // Start hardware SPI ^~~ HSPI libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp: In member function 'void BME680_Class::getCalibration()': libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:252:50: error: no matching function for call to 'BME680_Class::getData(const uint8_t&, uint8_t [((BME680_Class*)this)->BME680_Class::BME680_COEFF_SIZE1])' getData(BME680_COEFF_START_ADDRESS1, coeff_arr1); // Split reading registers into 2 ^ In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:147:34: note: candidate: 'template uint8_t& BME680_Class::getData(uint8_t, T&) const' template uint8_t &getData(const uint8_t addr, T &value) const { ^~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:147:34: note: template argument deduction/substitution failed: libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:252:50: note: variable-sized array type 'uint8_t [((BME680_Class*)this)->BME680_Class::BME680_COEFF_SIZE1]' {aka 'unsigned char [((BME680_Class*)this)->BME680_Class::BME680_COEFF_SIZE1]'} is not a valid template argument getData(BME680_COEFF_START_ADDRESS1, coeff_arr1); // Split reading registers into 2 ^ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:253:50: error: no matching function for call to 'BME680_Class::getData(const uint8_t&, uint8_t [((BME680_Class*)this)->BME680_Class::BME680_COEFF_SIZE2])' getData(BME680_COEFF_START_ADDRESS2, coeff_arr2); // one 25 bytes and the other 16 ^ In file included from libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:8: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:147:34: note: candidate: 'template uint8_t& BME680_Class::getData(uint8_t, T&) const' template uint8_t &getData(const uint8_t addr, T &value) const { ^~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:147:34: note: template argument deduction/substitution failed: libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:253:50: note: variable-sized array type 'uint8_t [((BME680_Class*)this)->BME680_Class::BME680_COEFF_SIZE2]' {aka 'unsigned char [((BME680_Class*)this)->BME680_Class::BME680_COEFF_SIZE2]'} is not a valid template argument getData(BME680_COEFF_START_ADDRESS2, coeff_arr2); // one 25 bytes and the other 16 ^ libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp: At global scope: libdeps/esp32-s3/DeeEmm BME680/src/DDeeEmm_BME680.cpp:578:1: error: expected unqualified-id at end of input } // of method "triggerMeasurement()" ^ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:78:1: error: extra qualification 'BME680_Class::' on member 'BME680_Class' [-fpermissive] BME680_Class::BME680_Class() { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:78:1: error: 'BME680_Class::BME680_Class()' cannot be overloaded with 'BME680_Class::BME680_Class()' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:101:3: note: previous declaration 'BME680_Class::BME680_Class()' BME680_Class(); // Class constructor (unused) ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:83:1: error: extra qualification 'BME680_Class::' on member 'BME680_Class' [-fpermissive] BME680_Class::~BME680_Class() { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:83:1: error: 'BME680_Class::~BME680_Class()' cannot be overloaded with 'BME680_Class::~BME680_Class()' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:102:3: note: previous declaration 'BME680_Class::~BME680_Class()' ~BME680_Class(); // Class destructor (unused) ^ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:94:6: error: extra qualification 'BME680_Class::' on member 'begin' [-fpermissive] bool BME680_Class::begin() { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:94:6: error: 'bool BME680_Class::begin()' cannot be overloaded with 'bool BME680_Class::begin()' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:103:11: note: previous declaration 'bool BME680_Class::begin()' bool begin(); // Start using I2C Communications ^~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:100:6: error: extra qualification 'BME680_Class::' on member 'begin' [-fpermissive] bool BME680_Class::begin(const uint32_t i2cSpeed) { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:100:6: error: 'bool BME680_Class::begin(uint32_t)' cannot be overloaded with 'bool BME680_Class::begin(uint32_t)' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:104:11: note: previous declaration 'bool BME680_Class::begin(uint32_t)' bool begin(const uint32_t i2cSpeed); // I2C with a non-default speed ^~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:105:6: error: extra qualification 'BME680_Class::' on member 'begin' [-fpermissive] bool BME680_Class::begin(const uint32_t i2cSpeed, const uint8_t i2cAddress) { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:105:6: error: 'bool BME680_Class::begin(uint32_t, uint8_t)' cannot be overloaded with 'bool BME680_Class::begin(uint32_t, uint8_t)' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:106:11: note: previous declaration 'bool BME680_Class::begin(uint32_t, uint8_t)' bool begin(const uint32_t i2cSpeed, const uint8_t i2cAddress); // Set speed and I2C Addr. ^~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:127:6: error: extra qualification 'BME680_Class::' on member 'begin' [-fpermissive] bool BME680_Class::begin(const uint8_t chipSelect) { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:127:6: error: 'bool BME680_Class::begin(uint8_t)' cannot be overloaded with 'bool BME680_Class::begin(uint8_t)' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:105:11: note: previous declaration 'bool BME680_Class::begin(uint8_t)' bool begin(const uint8_t chipSelect); // Start using either I2C or HW-SPI ^~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:141:6: error: extra qualification 'BME680_Class::' on member 'begin' [-fpermissive] bool BME680_Class::begin(const uint8_t chipSelect, const uint8_t mosi, const uint8_t miso,const uint8_t sck) { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:141:6: error: 'bool BME680_Class::begin(uint8_t, uint8_t, uint8_t, uint8_t)' cannot be overloaded with 'bool BME680_Class::begin(uint8_t, uint8_t, uint8_t, uint8_t)' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:107:11: note: previous declaration 'bool BME680_Class::begin(uint8_t, uint8_t, uint8_t, uint8_t)' bool begin(const uint8_t chipSelect, const uint8_t mosi, const uint8_t miso, const uint8_t sck); ^~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:157:6: error: extra qualification 'BME680_Class::' on member 'commonInitialization' [-fpermissive] bool BME680_Class::commonInitialization() { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:157:6: error: 'bool BME680_Class::commonInitialization()' cannot be overloaded with 'bool BME680_Class::commonInitialization()' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:118:12: note: previous declaration 'bool BME680_Class::commonInitialization()' bool commonInitialization(); ///< Common initialization code ^~~~~~~~~~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:181:9: error: extra qualification 'BME680_Class::' on member 'readByte' [-fpermissive] uint8_t BME680_Class::readByte(const uint8_t addr) const { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:181:9: error: 'uint8_t BME680_Class::readByte(uint8_t) const' cannot be overloaded with 'uint8_t BME680_Class::readByte(uint8_t) const' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:119:12: note: previous declaration 'uint8_t BME680_Class::readByte(uint8_t) const' uint8_t readByte(const uint8_t addr) const; ///< Read byte from register address ^~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:190:6: error: extra qualification 'BME680_Class::' on member 'reset' [-fpermissive] void BME680_Class::reset() { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:190:6: error: 'void BME680_Class::reset()' cannot be overloaded with 'void BME680_Class::reset()' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:113:11: note: previous declaration 'void BME680_Class::reset()' void reset(); // Reset the BME680 ^~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:209:6: error: extra qualification 'BME680_Class::' on member 'getCalibration' [-fpermissive] void BME680_Class::getCalibration() { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:209:6: error: 'void BME680_Class::getCalibration()' cannot be overloaded with 'void BME680_Class::getCalibration()' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:122:12: note: previous declaration 'void BME680_Class::getCalibration()' void getCalibration(); ///< Load calibration from registers ^~~~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:268:9: error: extra qualification 'BME680_Class::' on member 'setOversampling' [-fpermissive] uint8_t BME680_Class::setOversampling(const uint8_t sensor, const uint8_t sampling) const { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:268:9: error: 'uint8_t BME680_Class::setOversampling(uint8_t, uint8_t) const' cannot be overloaded with 'uint8_t BME680_Class::setOversampling(uint8_t, uint8_t) const' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:108:11: note: previous declaration 'uint8_t BME680_Class::setOversampling(uint8_t, uint8_t) const' uint8_t setOversampling(const uint8_t sensor, const uint8_t sampling = UINT8_MAX) const; // and return current value ^~~~~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:329:9: error: extra qualification 'BME680_Class::' on member 'setIIRFilter' [-fpermissive] uint8_t BME680_Class::setIIRFilter(const uint8_t iirFilterSetting) const { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:329:9: error: 'uint8_t BME680_Class::setIIRFilter(uint8_t) const' cannot be overloaded with 'uint8_t BME680_Class::setIIRFilter(uint8_t) const' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:110:11: note: previous declaration 'uint8_t BME680_Class::setIIRFilter(uint8_t) const' uint8_t setIIRFilter(const uint8_t iirFilterSetting = UINT8_MAX) const; // Set IIR Filter ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:346:9: error: extra qualification 'BME680_Class::' on member 'getSensorData' [-fpermissive] uint8_t BME680_Class::getSensorData(int32_t& temp, int32_t& hum, int32_t& press, int32_t& gas, const bool waitSwitch) { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:346:9: error: 'uint8_t BME680_Class::getSensorData(int32_t&, int32_t&, int32_t&, int32_t&, bool)' cannot be overloaded with 'uint8_t BME680_Class::getSensorData(int32_t&, int32_t&, int32_t&, int32_t&, bool)' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:111:11: note: previous declaration 'uint8_t BME680_Class::getSensorData(int32_t&, int32_t&, int32_t&, int32_t&, bool)' uint8_t getSensorData(int32_t &temp, int32_t &hum, int32_t &press, int32_t &gas, const bool waitSwitch = true); // ^~~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:358:9: error: extra qualification 'BME680_Class::' on member 'getI2CAddress' [-fpermissive] uint8_t BME680_Class::getI2CAddress() const { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:358:9: error: 'uint8_t BME680_Class::getI2CAddress() const' cannot be overloaded with 'uint8_t BME680_Class::getI2CAddress() const' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:112:11: note: previous declaration 'uint8_t BME680_Class::getI2CAddress() const' uint8_t getI2CAddress() const; // Return the I2C Address of the BME680 ^~~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:368:9: error: extra qualification 'BME680_Class::' on member 'readSensors' [-fpermissive] uint8_t BME680_Class::readSensors(const bool waitSwitch) { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:368:9: error: 'uint8_t BME680_Class::readSensors(bool)' cannot be overloaded with 'uint8_t BME680_Class::readSensors(bool)' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:120:12: note: previous declaration 'uint8_t BME680_Class::readSensors(bool)' uint8_t readSensors(const bool waitSwitch); ///< read the registers in one burst ^~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:471:6: error: extra qualification 'BME680_Class::' on member 'waitForReadings' [-fpermissive] void BME680_Class::waitForReadings() const { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:471:6: error: 'void BME680_Class::waitForReadings() const' cannot be overloaded with 'void BME680_Class::waitForReadings() const' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:121:12: note: previous declaration 'void BME680_Class::waitForReadings() const' void waitForReadings() const; ///< Wait for readings to finish ^~~~~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:480:6: error: extra qualification 'BME680_Class::' on member 'setGas' [-fpermissive] bool BME680_Class::setGas(uint16_t GasTemp, uint16_t GasMillis) const { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:480:6: error: 'bool BME680_Class::setGas(uint16_t, uint16_t) const' cannot be overloaded with 'bool BME680_Class::setGas(uint16_t, uint16_t) const' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:109:11: note: previous declaration 'bool BME680_Class::setGas(uint16_t, uint16_t) const' bool setGas(uint16_t GasTemp, uint16_t GasMillis) const; // Gas heating temperature and time ^~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:525:6: error: extra qualification 'BME680_Class::' on member 'measuring' [-fpermissive] bool BME680_Class::measuring() const { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:525:6: error: 'bool BME680_Class::measuring() const' cannot be overloaded with 'bool BME680_Class::measuring() const' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:114:11: note: previous declaration 'bool BME680_Class::measuring() const' bool measuring() const; ///< true if currently measuring ^~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:533:6: error: extra qualification 'BME680_Class::' on member 'triggerMeasurement' [-fpermissive] void BME680_Class::triggerMeasurement() const { ^~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:533:6: error: 'void BME680_Class::triggerMeasurement() const' cannot be overloaded with 'void BME680_Class::triggerMeasurement() const' In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:115:11: note: previous declaration 'void BME680_Class::triggerMeasurement() const' void triggerMeasurement() const; ///< trigger a measurement ^~~~~~~~~~~~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:539:1: error: expected '}' at end of input } ^ In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:94:20: note: to match this '{' class BME680_Class { ^ In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:55, from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp: In member function 'bool BME680_Class::commonInitialization()': libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:161:13: error: 'SPI_Register' was not declared in this scope bitRead(SPI_Register, BME680_SPI_MEM_PAGE_POSITION)) { // Wrong mode for ID ^~~~~~~~~~~~ /Users/philipcottle/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:95:32: note: in definition of macro 'bitRead' #define bitRead(value, bit) (((value) >> (bit)) & 0x01) ^~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:161:13: note: suggested alternative: 'register' bitRead(SPI_Register, BME680_SPI_MEM_PAGE_POSITION)) { // Wrong mode for ID ^~~~~~~~~~~~ /Users/philipcottle/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:95:32: note: in definition of macro 'bitRead' #define bitRead(value, bit) (((value) >> (bit)) & 0x01) ^~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:168:16: error: 'SPI_Register' was not declared in this scope bitWrite(SPI_Register, BME680_SPI_MEM_PAGE_POSITION, 1); // Page "1" again ^~~~~~~~~~~~ /Users/philipcottle/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:96:30: note: in definition of macro 'bitSet' #define bitSet(value, bit) ((value) |= (1UL << (bit))) ^~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:168:7: note: in expansion of macro 'bitWrite' bitWrite(SPI_Register, BME680_SPI_MEM_PAGE_POSITION, 1); // Page "1" again ^~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:168:16: note: suggested alternative: 'register' bitWrite(SPI_Register, BME680_SPI_MEM_PAGE_POSITION, 1); // Page "1" again ^~~~~~~~~~~~ /Users/philipcottle/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:96:30: note: in definition of macro 'bitSet' #define bitSet(value, bit) ((value) |= (1UL << (bit))) ^~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:168:7: note: in expansion of macro 'bitWrite' bitWrite(SPI_Register, BME680_SPI_MEM_PAGE_POSITION, 1); // Page "1" again ^~~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp: In member function 'void BME680_Class::getCalibration()': libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:216:50: error: no matching function for call to 'BME680_Class::getData(const uint8_t&, uint8_t [((BME680_Class*)this)->BME680_Class::BME680_COEFF_SIZE1])' getData(BME680_COEFF_START_ADDRESS1, coeff_arr1); // Split reading registers into 2 ^ In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:147:34: note: candidate: 'template uint8_t& BME680_Class::getData(uint8_t, T&) const' template uint8_t &getData(const uint8_t addr, T &value) const { ^~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:147:34: note: template argument deduction/substitution failed: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:216:50: note: variable-sized array type 'uint8_t [((BME680_Class*)this)->BME680_Class::BME680_COEFF_SIZE1]' {aka 'unsigned char [((BME680_Class*)this)->BME680_Class::BME680_COEFF_SIZE1]'} is not a valid template argument getData(BME680_COEFF_START_ADDRESS1, coeff_arr1); // Split reading registers into 2 ^ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:217:50: error: no matching function for call to 'BME680_Class::getData(const uint8_t&, uint8_t [((BME680_Class*)this)->BME680_Class::BME680_COEFF_SIZE2])' getData(BME680_COEFF_START_ADDRESS2, coeff_arr2); // one 25 bytes and the other 16 ^ In file included from libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:1: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:147:34: note: candidate: 'template uint8_t& BME680_Class::getData(uint8_t, T&) const' template uint8_t &getData(const uint8_t addr, T &value) const { ^~~~~~~ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.h:147:34: note: template argument deduction/substitution failed: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:217:50: note: variable-sized array type 'uint8_t [((BME680_Class*)this)->BME680_Class::BME680_COEFF_SIZE2]' {aka 'unsigned char [((BME680_Class*)this)->BME680_Class::BME680_COEFF_SIZE2]'} is not a valid template argument getData(BME680_COEFF_START_ADDRESS2, coeff_arr2); // one 25 bytes and the other 16 ^ libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp: At global scope: libdeps/esp32-s3/DeeEmm BME680/src/DeeEmm_BME680.cpp:539:1: error: expected unqualified-id at end of input } ^ Compiling .pio/build/esp32-s3/libc5c/ESPmDNS/ESPmDNS.cpp.o *** [.pio/build/esp32-s3/lib242/DeeEmm BME680/DDeeEmm_BME680.cpp.o] Error 1 *** [.pio/build/esp32-s3/lib242/DeeEmm BME680/DeeEmm_BME680.cpp.o] Error 1 ========================================= [FAILED] Took 32.11 seconds ========================================= ```
DeeEmm commented 2 days ago

Yes I think this is as a result of the changes I made to the library whilst testing.

I was trying to get the example in the library to compile and run stand-alone.

KirikauKiwi commented 2 days ago

Thinking that this is probably best moved to a V3 update in conjunction with considering the Reverse Flow implementation and the requirement of adding an additional Temp or BME280/68X sensor for the pressure and temp changes that are likely to occur depending on the type of air pumps used.

DeeEmm commented 2 days ago

The DIYFB code part is actually done. It's just the library part that needs to work. I suspect that its not too far away from working, just need to finish what I started. 😆

DeeEmm commented 2 days ago

OK. some progress...

Screenshot 2024-11-20 at 11 36 59 pm

I have the example project compiling and running. It is however reporting nonsense. But it is a step in the right direction.

Had to re-jig the project layout, add a platformIO.ini file and some other stuff so that it would compile as a stand alone project uner VScode / plstormIO, so not too sure if it will now work as a library. Figured that I would get the example working first and then sort out the library aspect after.

DeeEmm commented 1 day ago

Ok so sorted the project paths out. Library can now be included in code and also built as a standalone project using the default I2CDemo

Now to get it working