Arduino BMP 180

Our weekly LIVE video chat. Every Wednesday at 8pm ET!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
fusée271
 
Posts: 4
Joined: Mon Mar 03, 2014 5:46 pm

Arduino BMP 180

Post by fusée271 »

Hello!

I have to make an altimetre in order to have the maximum altitude of a water rocket. I have bought an Arduino Uno and a BMP180. Now, I am trying to download the librairies so I can use them but it isn't going very well... I want to be sure that I downloaded the right librairies (the 4 which are in the following link : http://learn.adafruit.com/adafruit-10-d ... 0/software ) When I compile these in my Arduino program, it shows an error message. Where is my error and what can I do to make it work?

Thanks a lot for your precious help!

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Arduino BMP 180

Post by adafruit_support_rick »

What is the exact error message you're getting?
You may want to review our tutorial on installing arduino libraries:
http://learn.adafruit.com/adafruit-all- ... nstall-use

User avatar
fusée271
 
Posts: 4
Joined: Mon Mar 03, 2014 5:46 pm

Re: Arduino BMP 180

Post by fusée271 »

The error message is :
In file included from Adafruit_BMP085_U.cpp:27:
Adafruit_BMP085_U.h:94: error: expected class-name before '{' token
Adafruit_BMP085_U.h:103: error: 'sensors_event_t' has not been declared
Adafruit_BMP085_U.h:104: error: 'sensor_t' has not been declared
Adafruit_BMP085_U.cpp: In function 'void writeCommand(byte, byte)':
Adafruit_BMP085_U.cpp:45: error: 'Wire' was not declared in this scope
Adafruit_BMP085_U.cpp: In function 'void read8(byte, uint8_t*)':
Adafruit_BMP085_U.cpp:63: error: 'Wire' was not declared in this scope
Adafruit_BMP085_U.cpp: In function 'void read16(byte, uint16_t*)':
Adafruit_BMP085_U.cpp:86: error: 'Wire' was not declared in this scope
Adafruit_BMP085_U.cpp: In member function 'bool Adafruit_BMP085_Unified::begin(bmp085_mode_t)':
Adafruit_BMP085_U.cpp:234: error: 'Wire' was not declared in this scope
Adafruit_BMP085_U.cpp: At global scope:
Adafruit_BMP085_U.cpp:388: error: variable or field 'getSensor' declared void
Adafruit_BMP085_U.cpp:388: error: 'sensor_t' was not declared in this scope
Adafruit_BMP085_U.cpp:388: error: 'sensor' was not declared in this scope
Adafruit_BMP085_U.cpp:410: error: variable or field 'getEvent' declared void
Adafruit_BMP085_U.cpp:410: error: 'sensors_event_t' was not declared in this scope
Adafruit_BMP085_U.cpp:410: error: 'event' was not declared in this scope[/i]

I've alredy try to install the libraires one again but I'm afraid it still isn't working...

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Arduino BMP 180

Post by adafruit_support_rick »

Have you installed the Adafruit_Sensor library? It is required:
https://github.com/adafruit/Adafruit_Sensor

User avatar
fusée271
 
Posts: 4
Joined: Mon Mar 03, 2014 5:46 pm

Re: Arduino BMP 180

Post by fusée271 »

Yes I did but still nothing...
This is the new error mesage...:

sensorapi:30: error: 'Adafruit_BMP085_Unified' does not name a type
sensorapi.pde: In function 'void displaySensorDetails()':
sensorapi:40: error: 'sensor_t' was not declared in this scope
sensorapi:40: error: expected `;' before 'sensor'
sensorapi:41: error: 'bmp' was not declared in this scope
sensorapi:41: error: 'sensor' was not declared in this scope
sensorapi.pde: In function 'void setup()':
sensorapi:65: error: 'bmp' was not declared in this scope
sensorapi.pde: In function 'void loop()':
sensorapi:85: error: 'sensors_event_t' was not declared in this scope
sensorapi:85: error: expected `;' before 'event'
sensorapi:86: error: 'bmp' was not declared in this scope
sensorapi:86: error: 'event' was not declared in this scope
sensorapi:120: error: 'SENSORS_PRESSURE_SEALEVELHPA' was not declared in this scope

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Arduino BMP 180

Post by adafruit_support_rick »

Your code is looking for the Adafruit_BMP085 library and can't find it.
Did you download and install it in the correct location?

User avatar
fusée271
 
Posts: 4
Joined: Mon Mar 03, 2014 5:46 pm

Re: Arduino BMP 180

Post by fusée271 »

Yes, I think I did it correctly, in 'Documents', right?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Arduino BMP 180

Post by adafruit_support_rick »

Nope. It goes in your sketchbook folder, in a subfolder called "libraries"
Check out our tutorial on installing arduino libraries:
http://learn.adafruit.com/adafruit-all- ... nstall-use

Locked
Please be positive and constructive with your questions and comments.

Return to “Ask an Engineer! VIDEO CHAT (closed)”