PulseSensor_Amped_Arduino icon indicating copy to clipboard operation
PulseSensor_Amped_Arduino copied to clipboard

using Pulse Sensor with RFDuino/Simblee

Open shadow85926 opened this issue 9 years ago • 9 comments

Will not work after replacing timing code to work with an ARM Cortex M0 by replacing timer with delay().

(Will be running this off of battery later) Photo: http://files.gandi.ws/gandi70414/image/img_20160406_111909.jpg

Timer_Interrupt_Notes.txt AllSerialHandling.txt Interrupt.txt PulseSensorAmped_Arduino_1dot4.txt

shadow85926 avatar Apr 06 '16 17:04 shadow85926

In your Interrupt.ino file you are trying to do a Serial.print every sample (500Hz!) Instead, try using a modulo on the sample counter or something to dial that down. Maybe that will help?

biomurph avatar Apr 06 '16 17:04 biomurph

Still doesn't work only sending ever 20ms or 40ms

shadow85926 avatar Apr 06 '16 18:04 shadow85926

You are using the SerialOutput() function? Could that be doing something?

biomurph avatar Apr 06 '16 18:04 biomurph

wave form for Serial.print every 50 ms

View post on imgur.com

shadow85926 avatar Apr 06 '16 18:04 shadow85926

i moved it to after the function that looks for heart rate, but it still doesn't work

shadow85926 avatar Apr 06 '16 19:04 shadow85926

I'll have time to set this up on my own simblee tomorrow and we'll figure it out

biomurph avatar Apr 06 '16 21:04 biomurph

Awesome thanks!

shadow85926 avatar Apr 06 '16 22:04 shadow85926

Ok, it looks like I've found your problem. At least with your latest version on the git. You have a delay(20); in there from my original code. That was causing the software to not find any heartbeats. I took that out, and also made a couple of adjustments and have it working on Simblee with our Processing visualizer! Yay!

I forked your code, and made changes here https://github.com/biomurph/SimbleeArduinoCode It uses a millis() timer to send serial data, and a micros() timer to sample the sensor.

Cheers

biomurph avatar Apr 07 '16 20:04 biomurph

Thank you so much!

shadow85926 avatar Apr 08 '16 15:04 shadow85926