Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BMP280 Device Driver

Overview

This is a Linux kernel module for the BMP280 digital pressure and temperature sensor.
It exposes real-time temperature and pressure readings to userspace via the sysfs filesystem.


Features

  • Reads temperature and pressure from the BMP280 sensor using the I2C interface.
  • Exposes readings through a sysfs attribute for easy access from userspace.
  • Includes integer compensation (no floating-point math) as per the official Bosch datasheet.

BMP280 to Raspberry Pi 4 Pinout

BMP280 Pin Raspberry Pi 4 Connection
VCC 3.3V (pin 1)
GND Ground (pin 6)
SCL GPIO 3 (pin 5)
SDA GPIO 2 (pin 3)

Documentation


Installation

# 1. Build the kernel module
make

# 2. Insert the module
sudo insmod bmp280.ko

# 3. Instantiate the device
echo bmp280 0x76 | sudo tee /sys/bus/i2c/devices/i2c-1/new_device

# 4. Read temperature and pressure
cat /sys/bus/i2c/devices/1-0076/Bmp280-Calculations

Demonstration video

https://youtu.be/1EwXVq_9rCo

About

Kernel Module BMP 280 Device Driver implementation which allows users to obtain the resulting pressure and temperature measurements via sysfs

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages