BMP180tiny

The BMP180TINY is a library for working with the BOSCH BMP180 atmospheric pressure sensor and ATtiny85/Tinusaur. It uses the USITWIX library for the TWI / I2C communication between the micro-controller and the sensor.

BMP180 digital barometric pressure sensor Bosch SensortecThe BMP180 sensor allows you to measure atmospheric pressure as well as temperature. The communication is don by I2C interface. The measurements could be used for various purposes including calculating the altitude by taking the atmospheric pressure and temperature with quite good accuracy.

The BMP180TINY library requires USITWIX library to work.

The BMP180TINY exposes several useful functions:

  • uint8_t bmp180_read_reg8(uint8_t reg_addr);
  • uint16_t bmp180_read_reg16(uint8_t reg_addr);
  • void bmp180_write_reg8(uint8_t reg_addr, uint8_t reg_data);
  • uint8_t bmp180_init(void);
  • uint16_t bmp180_read_temp_raw(void);
  • uint16_t bmp180_read_temp10x(void);
  • uint8_t bmp180_read_temp(void);
  • uint32_t bmp180_read_pres_raw(void);
  • int32_t bmp180_read_pres(void);
  • int32_t bmp180_read_alt_x(void);

The easiest way to learn how the library works is to try the example source code at “bmp180tiny_test1” folder.

The source code is available at https://bitbucket.org/tinusaur/bmp180tiny.