Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/franzbischoff/esp-idf-max32664-hub
MAX32664 Hub library for ESP-IDF
https://github.com/franzbischoff/esp-idf-max32664-hub
esp32 espressif max32664 maxim sensor
Last synced: about 2 months ago
JSON representation
MAX32664 Hub library for ESP-IDF
- Host: GitHub
- URL: https://github.com/franzbischoff/esp-idf-max32664-hub
- Owner: franzbischoff
- License: mit
- Created: 2022-11-03T02:00:57.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-23T23:52:31.000Z (about 1 year ago)
- Last Synced: 2024-05-01T15:37:53.641Z (8 months ago)
- Topics: esp32, espressif, max32664, maxim, sensor
- Language: C++
- Homepage: https://franzbischoff.github.io/esp-idf-max32664-hub/
- Size: 507 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SparkFun Pulse Oximeter and Heart Rate Sensor component for ESP-IDF
This is a modified version of the original from [Sparkfun](https://github.com/sparkfun/SparkFun_Bio_Sensor_Hub_Library)
Use it at your own risk.
---
![SparkFun Pulse Oximeter and Heart Rate Monitor](https://cdn.sparkfun.com/assets/parts/1/3/6/6/4/15219-SparkFun_Pulse_Oximeter_and_Heart_Rate_Sensor_-_MAX30101__Qwiic_-01.jpg)
[_SparkFun Pulse Oximeter and Heart Rate Monitor (SEN-15291)_](https://www.sparkfun.com/products/15219)
The sensor is an I²C based [biometric](https://en.wikipedia.org/wiki/Biometrics) sensor, utilizing two chips from
Maxim Integrated: the MAX32664 Bio Metric Sensor Hub and the MAX30101 Pulse Oximetry and Heart-Rate Module.## Documentation
- **[Hookup Guide](https://learn.sparkfun.com/tutorials/sparkfun-pulse-oximeter-and-heart-rate-monitor-hookup-guide)** -
Basic hookup guide for the SparkFun Pulse Oximeter and Heart Rate Sensor.## Products that use this library
- [SEN-15291](https://www.sparkfun.com/products/15219)- SparkFun Version 1.0
## License Information
This product is **open source**!
Various bits of the code have different licenses applied. Anything SparkFun wrote is beerware; if you see me (or any
other SparkFun employee) at the local and you've found our code helpful, please buy us a round!Please use, reuse, and modify these files as you see fit. Please maintain attribution to SparkFun Electronics and
release anything derivative under the same license.Distributed as-is; no warranty is given.
## How to Use
### From the ESP-IDF component registry
This component is available in the [ESP-IDF component registry](https://components.espressif.com/components/franzbischoff/max32664-hub).
1. To add this component to your project, run: `idf.py add-dependency "franzbischoff/max32664-hub^0.9.5"`
2. To create a project from the example, run: `idf.py create-project-from-example "franzbischoff/max32664-hub^0.9.5:basic"`
### From this repository
1. Clone this repository into your project's `components` folder.
2. Or, as a submodule: In your project, add this as a submodule to your `components/` directory.
```bash
git submodule add https://github.com/franzbischoff/esp-idf-max32664-hub
git submodule update --init --recursive
```The library can be configured via `idf.py menuconfig` under `Component config->MAX32664 I2C config`.
### Example
One of the original examples was modified and is in the `example/` directory.
## Tips, Tricks, and Gotchas
This code was mainly rewritten to use the i2c driver directly from ESP-IDF. The original code was using the Wire library
from Arduino. Since the time is short, I transcripted much of the Wire code, so this code can be further improved by
using the i2c functions even more directly (contributions are welcome).The Wire library uses semaphores everywhere, and I do not know if this is really needed here since the i2c driver may be
using semaphores itself. These code chunks are disabled by default but can be enabled by defining the macro
`CONFIG_ENABLE_HAL_LOCKS` in the component config.The example contained in this repository is minimal. It is advised to check the examples from the original Sparkfun's
repository. You may want to tweak the `Pulse Width` and `Sampling Rate` for your application, and different values may
require different delay times in the loop process.The initial readings may be preceded by a few warnings from the I2C driver. You can ignore them safely.
Wait for the sensor to start reading, and then you can try with your finger on the sensor. Be patient, as it may take a
few (lot) seconds to get the first readings. Try switching fingers if it takes too long, and don't press too hard.If you get lots of I2C timeout errors, check the power supply. You may need to use a separate 3.3V power supply for the
sensor.Finally, check if `CONFIG_FREERTOS_HZ` is set to 1000 in menuconfig. If not, set it to 1000!