Open finitespace opened 6 years ago
TODO: Update documentation.
Hi, THANKS A LOT!!!!
unfortunately I am getting a compilation error:
BME_280_I2C_SoftwareWire_Test.ino: In function ‘void setup()’:
BME_280_I2C_SoftwareWire_Test.ino:37:9: error: no match for ‘operator!’ (operand type is ‘TinyDebugSerial’)
BME_280_I2C_SoftwareWire_Test.ino:37:9: note: candidate is:
BME_280_I2C_SoftwareWire_Test.ino:37:9: note: operator!(bool)
However I am pretty sure that I cannot properly test it this way because I do not know how to connect the sensor directly to the raspberry and see no way to see the print output - I am using tinytx3 nodes - originally created by Nathan Chantrell and I need a RFM69CW module which sends the sensor data to a receiver which is connected to a raspberry pi. This way I can read the sensor data with a raspberry pi. I got a working Sketch for HTU21D sensor which I will change so that it sends the data of a BME280.
When I succeed to make it send the data I can post the working sketch.
At the moment my sketch gives me the following error: /root/sketchbook/libraries/BME280/BME280.cpp:31:18: fatal error: Wire.h: Datei oder Verzeichnis nicht gefunden
which surprises me since Wire.h should be in the path. However I am also not sure that it is right that the sketch is asking for Wire.h
@daniu-de, what compiler/settings are you using to compile this?
The first error is because the !Serial is not supported for TinyDebugSerial. You can probably just delete line 42.
Hi, hmmm ... not sure about the settings. I use arduino IDE set to attiny84 with 1Mhz
The #include Wire.h is also in BMEI2C.cpp and by commenting out this line I get:
/root/sketchbook/libraries/BME280/BME280I2C.cpp: In member function ‘virtual bool BME280I2C::WriteRegister(uint8_t, uint8_t)’: /root/sketchbook/libraries/BME280/BME280I2C.cpp:71:3: error: ‘Wire’ was not declared in this scope Wire.beginTransmission(m_settings.bme280Addr); ^ /root/sketchbook/libraries/BME280/BME280I2C.cpp: In member function ‘virtual bool BME280I2C::ReadRegister(uint8_t, uint8_t*, uint8_t)’: /root/sketchbook/libraries/BME280/BME280I2C.cpp:90:3: error: ‘Wire’ was not declared in this scope Wire.beginTransmission(m_settings.bme280Addr);
I have committed some changes that should fix the wire includes.
Hi,
sorry - I still got a problem:
BME_280_I2C_SoftwareWire_Test.ino: In function ‘void setup()’:
BME_280_I2C_SoftwareWire_Test.ino:37:9: error: no match for ‘operator!’ (operand type is ‘TinyDebugSerial’)
BME_280_I2C_SoftwareWire_Test.ino:37:9: note: candidate is:
BME_280_I2C_SoftwareWire_Test.ino:37:9: note: operator!(bool)
(that is your sketch)
mine shows the follwing error in this line: ->SoftwareWire softwareWire(SDA, SCK); BME280I2CSoftwareWire bme(softwareWire);
Error: /usr/share/arduino/Send_BME280_n.ino:104: undefined reference to `BME280I2CSoftwareWire::BME280I2CSoftwareWire(SoftwareWire&, BME280I2C::Settings const&)'
Another issue I am having with my own sketch is:
/usr/lib/gcc/avr/4.9.2/../../../avr/bin/ld: Send_BME280_n.cpp.elf section .text' will not fit in region
text'
/usr/lib/gcc/avr/4.9.2/../../../avr/bin/ld: region `text' overflowed by 1408 bytes
Is it possible that BME280 like that uses up a bit much memory?
Sketch uses 3308 bytes (40%) of program storage space. Maximum is 8192 bytes.
Global variables use 153 bytes (29%) of dynamic memory, leaving 359 bytes for local variables. Maximum is 512 bytes.
I was able to compile the example for Attiny84 after commenting out the Serial calls.
Attiny does not support the "Serial" library, so those calls will have to be removed.
Error: /usr/share/arduino/Send_BME280_n.ino:104: undefined reference to `BME280I2CSoftwareWire::BME280I2CSoftwareWire(SoftwareWire&, BME280I2C::Settings const&)'
Is because you need to modify the "Config.h" file to #define USING_SOFTWARE_WIRE 1
and make sure all other defines in the file are commented out.
Related issue # and issue behavior
A request was made to add SoftwareWire to the library. #79
Description of changes/fixes
Added BME280I2CSoftwareWire.h/cpp. Added Config.h
@mention a person to review
@daniu-de, please review the functionality of the new additions.
Steps to test
Uncomment line 32 in Config.h: #define USING_SOFTWARE_WIRE 1 Build and run the BME_280_I2C_SoftwareWire_Test.ino sketch on a live setup.
Any outstanding TODOs or known issues
Needs testing.