Skip to content

Releases: n-elia/MAX30102-MicroPython-driver

v0.5.1

18 May 20:31

Choose a tag to compare

This release modernizes the project's distribution pipeline. No changes to the driver itself.

What's new

  • Precompiled .mpy install path. On MicroPython v1.23+, you can now install bytecode-compiled artifacts for faster import and lower RAM footprint at load time: mpremote mip install github:n-elia/MAX30102-MicroPython-driver/package_mpy.json
  • The .mpy files are built automatically by CI on every release and attached as release assets. They target the current .mpy v6.3 ABI.
  • Source mip install still works as before for any MicroPython version that supports mip (v1.19+): mpremote mip install github:n-elia/MAX30102-MicroPython-driver

What's removed

  • PyPI distribution dropped. The pip install micropython-max30102 path is no longer maintained; the last PyPI version is v0.4.2. MicroPython's official package manager is mip, and PyPI added little value for a device-only library. setup.py and the legacy sdist_upip.py have been removed from the repo.
  • upip install path dropped from the README. upip was deprecated in favor of mip in MicroPython v1.20.

v0.5.0

18 May 20:05
324835d

Choose a tag to compare

This release bundles bug fixes plus example and documentation updates.
Two changes are breaking: please read carefully before upgrading.

Breaking changes

  • set_pulse_amplitude_it() renamed to set_pulse_amplitude_ir(). The old name was a typo; LED2 is the IR LED. No backwards-compatible alias is provided. Callers using the old name must update.
  • fifo_bytes_to_int() bit-shift direction fixed. The previous implementation shifted in the wrong direction, silently corrupting raw readings whenever pulse_width != 0. The new formula is (value & 0x3FFFF) >> (3 - pulse_width), which matches the MAX30102 datasheet's left-justified FIFO layout. Raw sample magnitudes will change for the same physical input: downstream calibration (SpO2 thresholds, HR algorithm tuning, etc.) may need to be re-checked.

Other changes

  • check() now drains the full sensor FIFO per call instead of returning after the first sample. Code polling check() in a tight loop should drain the storage queue with a while sensor.available(): loop instead of if sensor.available():, otherwise samples will accumulate between polls. The bundled examples (examples/basic_usage/main.py and examples/heart_rate/main.py) have been updated to use the new pattern.

Upgrade checklist

  • Replace any call to set_pulse_amplitude_it(...) with set_pulse_amplitude_ir(...).
  • If you build on raw red/IR/green magnitudes (peak detection, fixed thresholds, SpO2 lookup tables), re-verify them as the absolute values change when pulse_width != 0.
  • Replace if sensor.available(): with while sensor.available(): in your polling loop.

Credits

Thanks to @sakluk for spotting and fixing all three issues in #26.

v0.4.2

12 Mar 19:08
16604ae

Choose a tag to compare

What's Changed

  • Add module pre-compile to fix some import errors by @n-elia in #19
  • Updates the examples adding HR monitor by @n-elia in #23
  • Release v0.4.2 by @n-elia in #24

Full Changelog: v0.4.1...v0.4.2

v0.4.1

03 Dec 23:28
3d318fe

Choose a tag to compare

Changelog:

  • Changed the module files organization.
  • Added support to mip package manager (see here).

v0.4.0

04 Jul 09:31
9272688

Choose a tag to compare

Changelog:

  • According to some best practices discussed here, some changes have been made.
    • Removed the I2C scan at instantiation time, so that the sensor object could be instantiated even if the sensor
      is not available at the moment.
    • Removed the part ID checks at instantiation time, so that the user may skip them saving time.
  • The example has been updated, and default values now provide better results.

v0.3.6

13 Jun 15:06

Choose a tag to compare

Changelog:

  • The library now performs a I2C scan to check if the sensor is connected. This prevents unexpected I2C errors with some boards (such as Raspberry Pi Pico).

v0.3.5

24 May 13:10

Choose a tag to compare

Changelog:

  • A SoftI2C instance is now required by the constructor.
  • The constructor now raises RuntimeError when the sensor is not found on I2C bus.
  • The example has been updated to intercept the errors thrown by the constructor.
  • The example has been updated to estimate real acquisition frequency with a precision of 1 microsecond.
  • The readme has been re-organized to improve readability.

v0.3.4

16 Mar 23:23
eeb3bee

Choose a tag to compare

Changelog:

  • The package has been refactored to be compliant to PEP standards.

v0.3.3

15 Mar 19:21

Choose a tag to compare

This release makes the module available to download from PyPi repository.

v0.3

04 May 14:48

Choose a tag to compare

The driver repository is now clean :)
The driver works as expected when used as explained in the readme file. I tested it with a TinyPico board (based on ESP32-D4).