Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
BMP180 Class Reference
Library for interfacing with BMP180 Barometer. More...
#include <BMP180.h>
Public Member Functions | |
| BMP180 (PinName sdaPin, PinName sclPin) | |
| Create a BMP180 object connected to the specified I2C pins. | |
| void | init () |
| Initialise barometer - reads factory calibration data. | |
| Measurement | readValues () |
| Read current temperature and pressure values. | |
Detailed Description
Library for interfacing with BMP180 Barometer.
- See also:
- https://www.bosch-sensortec.com/en/homepage/products_3/environmental_sensors_1/bmp180_1/bmp180
- https://www.sparkfun.com/products/11824
Revision 1.0
- Date:
- March 2015
Example:
#include "mbed.h" #include "BMP180.h" BMP180 bmp180(p28,p27); // SDA, SCL Serial serial(USBTX,USBRX); int main() { // initiliase barometer bmp180.init(); Measurement measurement; // measurement structure declared in BMP180 class while(1) { // read values (T in Celsius and P in mb) and print over serial port measurement = bmp180.readValues(); serial.printf("T = %.2f C P = %.2f mb\n",measurement.temperature,measurement.pressure); wait(1.0); // short delau until next reading } }
Definition at line 86 of file BMP180.h.
Constructor & Destructor Documentation
| BMP180 | ( | PinName | sdaPin, |
| PinName | sclPin | ||
| ) |
Member Function Documentation
| void init | ( | ) |
Generated on Fri Jul 15 2022 18:45:55 by
1.7.2