Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

BME280 driver using custom PIO instead of I2C Wire #67

Open
Labels
designVisual design, UI/UX, themes, logos, and graphic assets enhancementNew feature or request

Description

Context

The current BME280 driver (src/sensors/BME280Driver.h) uses the RP2040's hardware I2C peripheral via Wire/Wire1. This has two limitations:

  1. GPIO constraints — Hardware I2C0/I2C1 only work on specific GPIO pairs (I2C0: 0/1, 4/5, 8/9, 12/13, 16/17, 20/21; I2C1: 2/3, 6/7, 10/11, 14/15, 18/19, 26/27). A PIO-based implementation would work on any GPIO 0-15, keeping the universal slot promise.
  2. Library dependency — Uses <Wire.h> which pulls in the Arduino I2C stack. A custom PIO driver would be self-contained and potentially smaller.

Proposal

Implement a PIO-based I2C bit-bang driver for BME280 that:

  • Works on any GPIO pair (not just hardware I2C pins)
  • Follows the existing driver pattern (async state machine like DS18B20/DHT22)
  • Uses the same compensation formulas already implemented
  • Has no external library dependency

References

Acceptance

  • Compiles with SIMUT_SENSOR_BME280=1
  • BME280 detected and read on any GPIO 0-15 pair
  • No <Wire.h> dependency
  • Async reads work alongside DS18B20/DHT22 without blocking
  • Flash cost ≤ current driver (~7 KB)

Metadata

Metadata

Assignees

No one assigned

    Labels

    designVisual design, UI/UX, themes, logos, and graphic assets enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /