Trying to understand the error codes in Arduino IDE



  • Following is the screenshot of the error code I get using the supplied code for the mini weather station project.

    Try as I might I donot understand what the error is telling me.
    I am using 1.6.5 IDE on win 8.1 and have tried chrome also.

    It is part of the barometric pressure board BMP085

    I have h/w the components, but need the code on the promini

    I also cant find the reference to SealevelPressure in the code.

    The files are all in the sketchbooks file I find under Preferences tab
    #include <Adafruit_085.h>

    You can see the error code in screenshot

    Screenshot (58).png

    How do I deceifer this?


  • Hero Member

    How did you declare the bpm object? something like this:

    Adafruit_BMP085 bmp;
    

    And did you try to remove the altitude from the equation?

    float pressure = bmp.readSealevelPressure()  * 0.01;


  • @rvendrame I have something in the lines where the #include statements are found
    Adafruit_BMP085 bmp = Adafruit_BMP085();
    what ever that does
    by adding the first line nothing and the same result taking altitude out of the second line

    This is the copy of the error code from trying to compile

    Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Nano, ATmega328"

    Build options changed, rebuilding all

    Using library SPI in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI

    Using library MySensors in folder: C:\Users\Carolyn & Doug\Documents\Arduino\libraries\MySensors (legacy)

    Using library DHT in folder: C:\Users\Carolyn & Doug\Documents\Arduino\libraries\DHT (legacy)

    Using library BH1750 in folder: C:\Users\Carolyn & Doug\Documents\Arduino\libraries\BH1750 (legacy)

    Using library Wire in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire

    Using library Adafruit_BMP085 in folder: C:\Users\Carolyn & Doug\Documents\Arduino\libraries\Adafruit_BMP085 (legacy)

    C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -IC:\Users\Carolyn & Doug\Documents\Arduino\libraries\MySensors -IC:\Users\Carolyn & Doug\Documents\Arduino\libraries\DHT -IC:\Users\Carolyn & Doug\Documents\Arduino\libraries\BH1750 -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire -IC:\Users\Carolyn & Doug\Documents\Arduino\libraries\Adafruit_BMP085 C:\Users\CAROLY~1\AppData\Local\Temp\build4008044324059414343.tmp\mini_weather_sat__3.cpp -o C:\Users\CAROLY~1\AppData\Local\Temp\build4008044324059414343.tmp\mini_weather_sat__3.cpp.o

    mini_weather_sat__3.ino: In function 'void loop()':
    mini_weather_sat__3.ino:102:28: error: 'class Adafruit_BMP085' has no member named 'readSealevelPressure'
    'class Adafruit_BMP085' has no member named 'readSealevelPressure'


  • Hero Member

    Looking into the source code at github, it looks it expects a float and returns a 'int32_t':

    int32_t Adafruit_BMP085::readSealevelPressure(float altitude_meters) {
      float pressure = readPressure();
      return (int32_t)(pressure / pow(1.0-altitude_meters/44330, 5.255));  
    } 
    

    so try something like that (NOT TESTED):

      float altitude = 12345.0  //  <<< Replace with correct altitude
    
      int32_t pressure; 
    
    
      void loop() {  
      .... 
    
    
          pressure = readSealevelPressure( altitude );  
    
          Serial.println( pressure );


  • @rvendrame I am glad you found something and I know you are suggesting something but this old goat is lost, am I to put this second box of code into the sketch somewhere, and it looks as though it would go in setup before the loop?

    still v slow with code...... int32_t is given a float in meters by me, finds float pressure then does a calculation to send somewhere else?

    Not to worried about how code works just would like the error to go away but all this will help with the knowledge base.



  • @rvendrame Looking again I see second part of the code would be put into the loop segment .?


  • Hero Member

    The first block is just a declaration of the code from Adafruit_BPM085, you don't need it (it is already there in some include).

    Both float and int32_t lines can go just before the loop() line.

    The final two lines should be placed inside the loop() routine.



  • @rvendrame you gave me an idea

    I went to github and found the Adafruit-BMP085-library and downloaded the zip file >put the zipped file into my sketch file overwriting the existing .

    There may have been a revision or there was corruption but it does now seem to compile.

    I do THANK YOU for your help in this problem and ultimate resolution!

    My troubleshooting skills got a small bit better but I will try the fix on the original to see if that solves it also.


  • Hero Member

    Thx, I am glad you made it work.



  • @rvendrame code is now inside the promini and the quest goes on!
    Thx doug


  • Hero Member

    I guess you've used the v2 library although the v1 is the one commonly provided today
    https://learn.adafruit.com/bmp085/using-the-bmp085-api-v2

    @hek The BMP085 has been discontinued by BOSCH and replaced with the BMP180 which is smaller and less expensive but is identical in terms of wiring and software!


Log in to reply
 

Suggested Topics

  • 3
  • 2
  • 8
  • 6
  • 5

58
Online

11.4k
Users

11.1k
Topics

112.7k
Posts