PulseSensor_Amped_Arduino
PulseSensor_Amped_Arduino copied to clipboard
using Pulse Sensor with RFDuino/Simblee
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
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?
Still doesn't work only sending ever 20ms or 40ms
You are using the SerialOutput() function? Could that be doing something?
wave form for Serial.print every 50 ms
View post on imgur.com
i moved it to after the function that looks for heart rate, but it still doesn't work
I'll have time to set this up on my own simblee tomorrow and we'll figure it out
Awesome thanks!
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
Thank you so much!