Skip to content

Interfacing the Bosch Sensortec BMP280 pressure sensor with an STM32 using SPI and HAL

License

Notifications You must be signed in to change notification settings

lukas-th/BMP280_STM32

Repository files navigation

BMP280 for STM32

Interfacing the Bosch Sensortec BMP280 pressure sensor with an STM32 using SPI and HAL.

Usage

This repository was made for usage in this quadrocopter project (not yet public), which is utilizing a STM32 microcontroller to make a custom flight controller.

The quadrocopter project makes use of the HAL Drivers for STM32 and the STM32CubeMX code generator provided by ST to initialize hardware peripherals such as SPI. It is written in C++.

This repository provides a C++ Class called "BMP280" to interface the BMP280 pressure sensor. The constructor needs the HAL SPI handle as an argument.

There are 4 hardware dependent methods: spiReadWrite, spiCSNhigh, spiCSNlow and delay_ms. Adjust those to your project if necessary.

Code documentation

The code documentation is available here.

It is build automatically using doxygen and deployed to gh-pages on every push to the master branch.
documentation

About

Interfacing the Bosch Sensortec BMP280 pressure sensor with an STM32 using SPI and HAL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published