Coder Social home page Coder Social logo

Comments (7)

finitespace avatar finitespace commented on June 13, 2024 1

Alright, I had committed the wrong file last night.

With a fresh checkout as of 10/10/2017 10:26am MST:

-Modify BME280I2C_BRZO.cpp line 35 add: #define USING_BRZO 1
-Open example BME280_BRZO_I2C_Test
-Run "Verify".

I am getting a successful compile.

from bme280.

finitespace avatar finitespace commented on June 13, 2024

from bme280.

aderusha avatar aderusha commented on June 13, 2024

In file BME280I2C_BRZO.cpp I've removed the #ifdef _BRZO_I2C_h at line 36 and the matching #endif at line 88. No other changes from the test procedure outlined above. Compiling the example file BME_280_BRZO_I2C_Test.ino now returns the following errors:

Archiving built core (caching) in: C:\Users\<user>\AppData\Local\Temp\arduino_cache_557126\core\core_esp8266_esp8266_nodemcuv2_CpuFrequency_80,UploadSpeed_115200,FlashSize_4M3M_8ee5fab911ac50cf47efcbc596507c23.a
sketch\BME_280_BRZO_I2C_Test.ino.cpp.o: In function `loop':

C:\arduino-1.8.4\portable\sketchbook\libraries\BME280\examples\BME_280_BRZO_I2C_Test/BME_280_BRZO_I2C_Test.ino:84: undefined reference to `BME280I2C_BRZO::BME280I2C_BRZO(BME280I2C_BRZO::Settings const&)'

sketch\BME_280_BRZO_I2C_Test.ino.cpp.o: In function `__static_initialization_and_destruction_0':

C:\arduino-1.8.4\portable\sketchbook\libraries\BME280\examples\BME_280_BRZO_I2C_Test/BME_280_BRZO_I2C_Test.ino:87: undefined reference to `BME280I2C_BRZO::BME280I2C_BRZO(BME280I2C_BRZO::Settings const&)'

sketch\BME_280_BRZO_I2C_Test.ino.cpp.o: In function `printBME280Data(Stream*)':

C:\arduino-1.8.4\portable\sketchbook\libraries\BME280\examples\BME_280_BRZO_I2C_Test/BME_280_BRZO_I2C_Test.ino:88: undefined reference to `BME280I2C_BRZO::begin()'

sketch\BME_280_BRZO_I2C_Test.ino.cpp.o: In function `setup':

C:\arduino-1.8.4\portable\sketchbook\libraries\BME280\examples\BME_280_BRZO_I2C_Test/BME_280_BRZO_I2C_Test.ino:51: undefined reference to `BME280I2C_BRZO::begin()'

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

from bme280.

finitespace avatar finitespace commented on June 13, 2024

Pull down the latest version and try again. I wasn't getting the same compile errors as you, but I did fix some things.

I was getting a bug with :
'#define SDA_PIN = D2
#define SCL_PIN = D1'
it wasn't liking D1 & D2. I don't have time to debug it now, but I will look at it tonight. You might be able to get it working now.

from bme280.

aderusha avatar aderusha commented on June 13, 2024

Still no go. Test procedure is now:

  • Unzip arduino-1.8.4 to C:\arduino
  • Create C:\arduino\portable
  • Add ESP8266 board manager URL, install ESP8266 board support, and select NodeMCU 1.0 (ESP-12E Module) from Board Manager
  • Install library Brzo I2C Version 1.31 from Library Manager
  • Install library BME280 from ZIP file downloaded ~ 11:00am GMT 2017-10-10
  • Open example BME280_BRZO_I2C_Test
  • Run "Verify" and the following error occurs:
Arduino: 1.8.4 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 115200, 4M (3M SPIFFS)"

In file included from C:\arduino\portable\sketchbook\libraries\BME280\examples\BME_280_BRZO_I2C_Test\BME_280_BRZO_I2C_Test.ino:32:0:

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:41:1: error: expected class-name before '{' token

 {

 ^

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:45:29: error: 'BME280I2C' has not been declared

    struct Settings : public BME280I2C::Settings

                             ^

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:45:40: error: expected '{' before 'Settings'

    struct Settings : public BME280I2C::Settings

                                        ^

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:66:13: error: 'Settings' does not name a type

       const Settings& settings = Settings());

             ^

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:66:43: error: ISO C++ forbids declaration of 'settings' with no type [-fpermissive]

       const Settings& settings = Settings());

                                           ^

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:60:4: error: invalid use of non-static data member 'BME280I2C_BRZO::Settings'

    };

    ^

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:66:34: error: from this location

       const Settings& settings = Settings());

                                  ^

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:48:7: error: 'OSR' was not declared in this scope

       OSR _tosr       = OSR_X1,

       ^

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:49:7: error: 'OSR' was not declared in this scope

       OSR _hosr       = OSR_X1,

       ^

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:50:7: error: 'OSR' was not declared in this scope

       OSR _posr       = OSR_X1,

       ^

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:51:7: error: 'Mode' was not declared in this scope

       Mode _mode      = Mode_Forced,

       ^

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:52:7: error: 'StandbyTime' was not declared in this scope

       StandbyTime _st = StandbyTime_1000ms,

       ^

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:53:7: error: 'Filter' was not declared in this scope

       Filter _filter  = Filter_Off,

       ^

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:54:7: error: 'SpiEnable' was not declared in this scope

       SpiEnable _se   = SpiEnable_False,

       ^

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:55:16: error: expected primary-expression before '_cr'

       uint16_t _cr    = 400

                ^

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:56:6: error: expression cannot be used as a function

      ): BME280I2C::Settings(_tosr, _hosr, _posr, _mode, _st, _filter, _se),

      ^

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:56:7: error: expected '}' before ':' token

      ): BME280I2C::Settings(_tosr, _hosr, _posr, _mode, _st, _filter, _se),

       ^

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:56:7: error: cannot convert '<brace-enclosed initializer list>' to 'int' in initialization

C:\arduino\portable\sketchbook\libraries\BME280\src/BME280I2C_BRZO.h:56:7: error: expected ';' before ':' token

BME_280_BRZO_I2C_Test:41: error: call to 'BME280I2C_BRZO::BME280I2C_BRZO(const int&)' uses the default argument for parameter 1, which is not yet defined

 BME280I2C_BRZO bme;   // Default : forced mode, standby time = 1000 ms

                ^

C:\arduino\portable\sketchbook\libraries\BME280\examples\BME_280_BRZO_I2C_Test\BME_280_BRZO_I2C_Test.ino: In function 'void setup()':

BME_280_BRZO_I2C_Test:36: error: expected primary-expression before '=' token

 #define SDA_PIN = D2

                 ^

C:\arduino\portable\sketchbook\libraries\BME280\examples\BME_280_BRZO_I2C_Test\BME_280_BRZO_I2C_Test.ino:53:19: note: in expansion of macro 'SDA_PIN'

    brzo_i2c_setup(SDA_PIN,SCL_PIN,I2C_ACK_TIMEOUT);

                   ^

BME_280_BRZO_I2C_Test:37: error: expected primary-expression before '=' token

 #define SCL_PIN = D1

                 ^

C:\arduino\portable\sketchbook\libraries\BME280\examples\BME_280_BRZO_I2C_Test\BME_280_BRZO_I2C_Test.ino:53:27: note: in expansion of macro 'SCL_PIN'

    brzo_i2c_setup(SDA_PIN,SCL_PIN,I2C_ACK_TIMEOUT);

                           ^

BME_280_BRZO_I2C_Test:55: error: 'class BME280I2C_BRZO' has no member named 'begin'

    while(!bme.begin())

               ^

C:\arduino\portable\sketchbook\libraries\BME280\examples\BME_280_BRZO_I2C_Test\BME_280_BRZO_I2C_Test.ino: In function 'void printBME280Data(Stream*)':

BME_280_BRZO_I2C_Test:77: error: 'BME280' has not been declared

    BME280::TempUnit tempUnit(BME280::TempUnit_Celcius);

    ^

BME_280_BRZO_I2C_Test:77: error: expected ';' before 'tempUnit'

    BME280::TempUnit tempUnit(BME280::TempUnit_Celcius);

                     ^

BME_280_BRZO_I2C_Test:78: error: 'BME280' has not been declared

    BME280::PresUnit presUnit(BME280::PresUnit_Pa);

    ^

BME_280_BRZO_I2C_Test:78: error: expected ';' before 'presUnit'

    BME280::PresUnit presUnit(BME280::PresUnit_Pa);

                     ^

BME_280_BRZO_I2C_Test:80: error: 'class BME280I2C_BRZO' has no member named 'read'

    bme.read(pres, temp, hum, tempUnit, presUnit);

        ^

BME_280_BRZO_I2C_Test:80: error: 'tempUnit' was not declared in this scope

    bme.read(pres, temp, hum, tempUnit, presUnit);

                              ^

BME_280_BRZO_I2C_Test:80: error: 'presUnit' was not declared in this scope

    bme.read(pres, temp, hum, tempUnit, presUnit);

                                        ^

BME_280_BRZO_I2C_Test:84: error: 'BME280' was not declared in this scope

    client->print("°"+ String(tempUnit == BME280::TempUnit_Celcius ? 'C' :'F'));

                                           ^

exit status 1
call to 'BME280I2C_BRZO::BME280I2C_BRZO(const int&)' uses the default argument for parameter 1, which is not yet defined

from bme280.

aderusha avatar aderusha commented on June 13, 2024

Confirmed working! The example file now compiles with the instructions you've provided and I am now able to successfully read data from a test BME280 device connected to D1/D2 on a Wemos D1 mini. Thank you so much for your work on this and the crazy-fast turnaround on squashing bugs, I really appreciate it!

from bme280.

finitespace avatar finitespace commented on June 13, 2024

Outlined in #36.

from bme280.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.