Comments (7)
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.
from bme280.
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.
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.
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.
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.
Outlined in #36.
from bme280.
Related Issues (20)
- Filter is only applied to temperature and pressure HOT 3
- STM32F103C8 - bme.begin (); - program stops HOT 3
- BME280 v3.0 not work with u8g2 and display HX1230_SW_SPI HOT 3
- The question of the wind chill HOT 3
- non void function without return value HOT 1
- Propose License Change to LGPL/MIT HOT 28
- AbsoluteHumidity and HeatIndex environment calculations missing HOT 1
- Implement CI HOT 1
- Change Wire hard code over to passed in wire instance in I2C class
- BME280 no humidity :( HOT 1
- BME680 integration HOT 1
- SPI.h is inculed althought BME280Spi is not in use HOT 1
- non-void-return issue in 3.0.0 HOT 6
- ESP32 boot loop when calling bme.begin() HOT 3
- I2C to USB
- delete
- delete HOT 1
- Latest commits do not show on Platformio. Tries to revert to "some 3.0.0" version
- Compiler warning when deleting a BME280I2C object
- Normal mode not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bme280.