Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

ceyhunsen/bmp180-stm32-driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

STM32 driver for BMP180 barometric pressure/temperature/altitude sensor. This driver lets you measure temperature, pressure, altitude and set custom sea pressure for calculating altitude for your needs.

Warning This project is abandoned. Although it still works for basic projects, it is a better idea to use Bosch's own driver.

Units

  • Temperature: Celsius
  • Pressure: Pascal
  • Altitude: Meter

Simple Usage

// Define bmp180_t struct instance
bmp180_t bmp180 = {.oversampling_setting = standart};

// Wait till initialization is complete
while (bmp180_init(&hi2c1, &bmp180));

// Get all the values
bmp180_get_all(&bmp180);
float temperature = bmp180.temperature;
int32_t pressure = bmp180.pressure;
float altitude = bmp180.altitude;

Documentation

Documentation is available online and it includes information for:

  • Adding to your project
  • Units
  • Usage
  • Hardware oversampling
  • Sea pressure
  • API reference

License

MIT License