Giter VIP home page Giter VIP logo

Comments (11)

biomurph avatar biomurph commented on May 12, 2024 1

I think I have a mega2650around here somewhere. I'll see if I can replicate your problem.

from pulsesensorplayground.

biomurph avatar biomurph commented on May 12, 2024

We don't yet support use of interrupts on the Mega. You will need to run the BPM_Alternative code example. If all you want is BPM on the serial port, then you will need to add a variable at the top of the sketch

int myBPM;

Then modify part of the code in the loop to be something like this

if (pulseSensor.sawStartOfBeat()) { myBPM = pulsesensor.getBeatsPerMinute(); Serial.print("BPM: "); Serial.println(myBPM); }

from pulsesensorplayground.

bhavindave9 avatar bhavindave9 commented on May 12, 2024

so can we expect the support for Mega anytime soon? would love to get my hand dirty on.

from pulsesensorplayground.

bhavindave9 avatar bhavindave9 commented on May 12, 2024

I checked the arduino mega 2560 data sheet .Everything (timer section that we are using) is same as uno.
so what is the problem here? how we can use this existing code on mega using interrupts . would really appreciate if you can help .

from pulsesensorplayground.

biomurph avatar biomurph commented on May 12, 2024

Thanks for your encouragement re the mega!
We are working to expand the boards that can use interrupts. Right now, you can get good sample timing with the BPM_Alternative example. If you need tight sample timing, you can try the old interrupt code found here
https://github.com/WorldFamousElectronics/PulseSensor_Amped_Arduino
It targers the same timer as the UNO. Give it a shot and let us know what happens. We will take your results and mod our playground library

from pulsesensorplayground.

bhavindave9 avatar bhavindave9 commented on May 12, 2024

I will definitely try it and will let you know the results

from pulsesensorplayground.

chumvan avatar chumvan commented on May 12, 2024

I have the same issue, did you fix this?

If I set #define USE_ARDUINO_INTERRUPTS true :
I can run the program without error but it return nothing on the monitor and plotter

If I set #define USE_ARDUINO_INTERRUPTS false :
The program just return straight lines which means it can not measure anything.

I tried to return raw value from the sensor, it was fine so there is no problem with the sensor.
If I want to use functions in PulseSensorPlayground.h to get BPM, how should I do it? I tried to figure something in PulseSensorPlayground.h and PulseSensorPlayground.cpp but it's too hard for me.

from pulsesensorplayground.

luto65 avatar luto65 commented on May 12, 2024

I have also a MEGA and still having the same problem

from pulsesensorplayground.

biomurph avatar biomurph commented on May 12, 2024

I will be able to fix the issue this week.

from pulsesensorplayground.

biomurph avatar biomurph commented on May 12, 2024

@luto65 @VANHUUTHANHTRUNG @bhavindave9

The latest release of PulseSensor Playground supports Arduino MEGA boards. Please let us know if you run into any bugs. I've tested it with and without including the Servo library, though have not used with servo on MEGA.
You can update your library through the Arduino Library manager. Latest is version 1.4.13

from pulsesensorplayground.

luto65 avatar luto65 commented on May 12, 2024

I tried it today and unfortunately does not work still.
Bildschirmfoto 2019-05-05 um 21 38 22 as you can see here the green line (the sensor) does not change ...

from pulsesensorplayground.

Related Issues (20)

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.