Giter VIP home page Giter VIP logo

Comments (3)

pkourany avatar pkourany commented on June 21, 2024

@tandroutsou, I didn't write the original code, I only adapted it for the Particle devices. You might want to explore the PulseSensor site for more information.

from pulsesensor_spark.

tandroutsou avatar tandroutsou commented on June 21, 2024

@pkourany thanks for your answer! Do you think that the following part should also be adapted (2048 instead of 512)? Because in the other places these values have been changed.
if (N > 2500){ // if 2.5 seconds go by without a beat
thresh = 512; // set thresh default
P = 512; // set P default
T = 512; // set T default
lastBeatTime = sampleCounter; // bring the lastBeatTime up to date
firstBeat = true; // set these to avoid noise
secondBeat = false; // when we get the heartbeat back
}

from pulsesensor_spark.

pkourany avatar pkourany commented on June 21, 2024

@tandroutsou, I believe setting the values to 2048 at the start is meant to cause the algorithm to fire and eventually get to the (N > 2500) statement which then resets the values to 512.

You may want to adjust the values up or down from 512 to see how the sensor responds. I am not sure why the code would not work after not using the sensor for some time. What else is your code doing?

One thing you might want to consider is using a MAX30102 pulse-oximeter sensor. It uses I2C and there are libraries available for the Particle devices in the Web IDE and Workbench and CLI.

from pulsesensor_spark.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.