WorldFamousElectronics / PulseSensorPlayground

A PulseSensor library (for Arduino) that collects our most popular projects in one place.
https://PulseSensor.com
MIT License
200 stars 97 forks source link

Do we need to set THRESHOLD twice when we use 2 pulsesensors at once? #152

Closed Lotushu closed 12 months ago

Lotushu commented 2 years ago

The code sets threshold by using pulseSensor.setThreshold(THRESHOLD). But I found out that it doesn't work for the second pulsesensor (pin A1, not A0). It continues to output data whatever threshold I set. So need I to use pulseSensor.setThreshold(THRESHOLD, 0) and pulseSensor.setThreshold(THRESHOLD, 1) to set two thresholds separately?

biomurph commented 2 years ago

@Lotushu Yes, you appear to be correct. This is a bug in the multiple Pulse Sensor scenario. I'll see what it will take to fix it.

biomurph commented 12 months ago

PulseSenor Playground Library supports multiple PulseSensors and each has it's own parameters to set.